home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 January
/
Chip_2001-01_cd1.bin
/
tema
/
mysql
/
mysql-3.23.28g-win-source.exe
/
mysys
/
debug
/
array.asm
Wrap
Assembly Source File
|
2000-05-30
|
22KB
|
964 lines
TITLE M:\MYSQL-3.23\mysys\array.c
.386P
include listing.inc
if @Version gt 510
.model FLAT
else
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
_DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
_DATA ENDS
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
_BSS SEGMENT DWORD USE32 PUBLIC 'BSS'
_BSS ENDS
$$SYMBOLS SEGMENT BYTE USE32 'DEBSYM'
$$SYMBOLS ENDS
$$TYPES SEGMENT BYTE USE32 'DEBTYP'
$$TYPES ENDS
_TLS SEGMENT DWORD USE32 PUBLIC 'TLS'
_TLS ENDS
; COMDAT ??_C@_0BM@KBJE@m?3?2mysql?93?423?2mysys?2array?4c?$AA@
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
; COMDAT ??_C@_0BD@GCMA@init_dynamic_array?$AA@
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
; COMDAT ?__LINE__Var@?1??init_dynamic_array@@9@9
_DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
_DATA ENDS
; COMDAT ??_C@_07EANM@warning?$AA@
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
; COMDAT ??_C@_0CH@JLMH@To?5big?5array?5idx?3?5?$CFd?0?5array?5size@
CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
CONST ENDS
; COMDAT ?__LINE__Var@?1??get_dynamic@@9@9
_DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
_DATA ENDS
; COMDAT _init_dynamic_array
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _insert_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _alloc_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _pop_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _set_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _get_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _delete_dynamic
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _delete_dynamic_element
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
; COMDAT _freeze_size
_TEXT SEGMENT PARA USE32 PUBLIC 'CODE'
_TEXT ENDS
FLAT GROUP _DATA, CONST, _BSS
ASSUME CS: FLAT, DS: FLAT, SS: FLAT
endif
PUBLIC _init_dynamic_array
PUBLIC ?__LINE__Var@?1??init_dynamic_array@@9@9 ; __LINE__Var
PUBLIC ??_C@_0BM@KBJE@m?3?2mysql?93?423?2mysys?2array?4c?$AA@ ; `string'
PUBLIC ??_C@_0BD@GCMA@init_dynamic_array?$AA@ ; `string'
EXTRN _my_malloc:NEAR
EXTRN __db_enter_:NEAR
EXTRN __db_return_:NEAR
; COMDAT ?__LINE__Var@?1??init_dynamic_array@@9@9
; File m:\mysql-3.23\mysys\array.c
_DATA SEGMENT
?__LINE__Var@?1??init_dynamic_array@@9@9 DW 014H ; __LINE__Var
_DATA ENDS
; COMDAT ??_C@_0BM@KBJE@m?3?2mysql?93?423?2mysys?2array?4c?$AA@
CONST SEGMENT
??_C@_0BM@KBJE@m?3?2mysql?93?423?2mysys?2array?4c?$AA@ DB 'm:\mysql-3.23\'
DB 'mysys\array.c', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BD@GCMA@init_dynamic_array?$AA@
CONST SEGMENT
??_C@_0BD@GCMA@init_dynamic_array?$AA@ DB 'init_dynamic_array', 00H ; `string'
CONST ENDS
; COMDAT _init_dynamic_array
_TEXT SEGMENT
_array$ = 8
_element_size$ = 12
_init_alloc$ = 16
_alloc_increment$ = 20
__db_func_$ = -4
__db_file_$ = -8
__db_level_$ = -12
__db_framep_$ = -16
_init_dynamic_array PROC NEAR ; COMDAT
; 20 : {
push ebp
mov ebp, esp
sub esp, 84 ; 00000054H
push ebx
push esi
push edi
; 21 : DBUG_ENTER("init_dynamic_array");
lea eax, DWORD PTR __db_framep_$[ebp]
push eax
lea ecx, DWORD PTR __db_level_$[ebp]
push ecx
lea edx, DWORD PTR __db_file_$[ebp]
push edx
lea eax, DWORD PTR __db_func_$[ebp]
push eax
movsx ecx, WORD PTR ?__LINE__Var@?1??init_dynamic_array@@9@9 ; __LINE__Var
add ecx, 1
push ecx
push OFFSET FLAT:??_C@_0BM@KBJE@m?3?2mysql?93?423?2mysys?2array?4c?$AA@ ; `string'
push OFFSET FLAT:??_C@_0BD@GCMA@init_dynamic_array?$AA@ ; `string'
call __db_enter_
add esp, 28 ; 0000001cH
; 22 : if (!alloc_increment)
cmp DWORD PTR _alloc_increment$[ebp], 0
jne SHORT $L67298
; 24 : alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16);
mov eax, 8184 ; 00001ff8H
xor edx, edx
div DWORD PTR _element_size$[ebp]
cmp eax, 16 ; 00000010H
jbe SHORT $L67389
mov eax, 8184 ; 00001ff8H
xor edx, edx
div DWORD PTR _element_size$[ebp]
mov DWORD PTR -20+[ebp], eax
jmp SHORT $L67390
$L67389:
mov DWORD PTR -20+[ebp], 16 ; 00000010H
$L67390:
mov edx, DWORD PTR -20+[ebp]
mov DWORD PTR _alloc_increment$[ebp], edx
; 25 : if (init_alloc > 8 && alloc_increment > init_alloc * 2)
cmp DWORD PTR _init_alloc$[ebp], 8
jbe SHORT $L67298
mov eax, DWORD PTR _init_alloc$[ebp]
shl eax, 1
cmp DWORD PTR _alloc_increment$[ebp], eax
jbe SHORT $L67298
; 26 : alloc_increment=init_alloc*2;
mov ecx, DWORD PTR _init_alloc$[ebp]
shl ecx, 1
mov DWORD PTR _alloc_increment$[ebp], ecx
$L67298:
; 28 :
; 29 : if (!init_alloc)
cmp DWORD PTR _init_alloc$[ebp], 0
jne SHORT $L67299
; 30 : init_alloc=alloc_increment;
mov edx, DWORD PTR _alloc_increment$[ebp]
mov DWORD PTR _init_alloc$[ebp], edx
$L67299:
; 31 : array->elements=0;
mov eax, DWORD PTR _array$[ebp]
mov DWORD PTR [eax+4], 0
; 32 : array->max_element=init_alloc;
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _init_alloc$[ebp]
mov DWORD PTR [ecx+8], edx
; 33 : array->alloc_increment=alloc_increment;
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _alloc_increment$[ebp]
mov DWORD PTR [eax+12], ecx
; 34 : array->size_of_element=element_size;
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _element_size$[ebp]
mov DWORD PTR [edx+16], eax
; 35 : if (!(array->buffer=(char*) my_malloc(element_size*init_alloc,MYF(MY_WME))))
push 16 ; 00000010H
mov ecx, DWORD PTR _element_size$[ebp]
imul ecx, DWORD PTR _init_alloc$[ebp]
push ecx
call _my_malloc
add esp, 8
mov edx, DWORD PTR _array$[ebp]
mov DWORD PTR [edx], eax
mov eax, DWORD PTR _array$[ebp]
cmp DWORD PTR [eax], 0
jne SHORT $L67302
; 37 : array->max_element=0;
mov ecx, DWORD PTR _array$[ebp]
mov DWORD PTR [ecx+8], 0
; 38 : DBUG_RETURN(TRUE);
lea edx, DWORD PTR __db_level_$[ebp]
push edx
lea eax, DWORD PTR __db_file_$[ebp]
push eax
lea ecx, DWORD PTR __db_func_$[ebp]
push ecx
movsx edx, WORD PTR ?__LINE__Var@?1??init_dynamic_array@@9@9 ; __LINE__Var
add edx, 18 ; 00000012H
push edx
call __db_return_
add esp, 16 ; 00000010H
mov al, 1
jmp SHORT $L67289
$L67302:
; 40 : DBUG_RETURN(FALSE);
lea eax, DWORD PTR __db_level_$[ebp]
push eax
lea ecx, DWORD PTR __db_file_$[ebp]
push ecx
lea edx, DWORD PTR __db_func_$[ebp]
push edx
movsx eax, WORD PTR ?__LINE__Var@?1??init_dynamic_array@@9@9 ; __LINE__Var
add eax, 20 ; 00000014H
push eax
call __db_return_
add esp, 16 ; 00000010H
xor al, al
$L67289:
; 41 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_init_dynamic_array ENDP
_TEXT ENDS
PUBLIC _insert_dynamic
PUBLIC _alloc_dynamic
EXTRN _memcpy:NEAR
; COMDAT _insert_dynamic
_TEXT SEGMENT
_array$ = 8
_element$ = 12
_buffer$ = -4
_insert_dynamic PROC NEAR ; COMDAT
; 45 : {
push ebp
mov ebp, esp
sub esp, 68 ; 00000044H
push ebx
push esi
push edi
; 46 : gptr buffer;
; 47 : if (array->elements == array->max_element)
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [eax+4]
cmp edx, DWORD PTR [ecx+8]
jne SHORT $L67309
; 49 : if (!(buffer=alloc_dynamic(array)))
mov eax, DWORD PTR _array$[ebp]
push eax
call _alloc_dynamic
add esp, 4
mov DWORD PTR _buffer$[ebp], eax
cmp DWORD PTR _buffer$[ebp], 0
jne SHORT $L67310
; 50 : return TRUE;
mov al, 1
jmp SHORT $L67307
$L67310:
; 52 : else
jmp SHORT $L67311
$L67309:
; 54 : buffer=array->buffer+(array->elements * array->size_of_element);
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [ecx+4]
imul eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx]
add edx, eax
mov DWORD PTR _buffer$[ebp], edx
; 55 : array->elements++;
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+4]
add ecx, 1
mov edx, DWORD PTR _array$[ebp]
mov DWORD PTR [edx+4], ecx
$L67311:
; 57 : memcpy(buffer,element,(size_t) array->size_of_element);
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
mov edx, DWORD PTR _element$[ebp]
push edx
mov eax, DWORD PTR _buffer$[ebp]
push eax
call _memcpy
add esp, 12 ; 0000000cH
; 58 : return FALSE;
xor al, al
$L67307:
; 59 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_insert_dynamic ENDP
_TEXT ENDS
EXTRN _my_realloc:NEAR
; COMDAT _alloc_dynamic
_TEXT SEGMENT
_array$ = 8
_new_ptr$67317 = -4
_alloc_dynamic PROC NEAR ; COMDAT
; 65 : {
push ebp
mov ebp, esp
sub esp, 68 ; 00000044H
push ebx
push esi
push edi
; 66 : if (array->elements == array->max_element)
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [eax+4]
cmp edx, DWORD PTR [ecx+8]
jne SHORT $L67316
; 68 : char *new_ptr;
; 69 : if (!(new_ptr=(char*) my_realloc(array->buffer,(array->max_element+
; 70 : array->alloc_increment)*
; 71 : array->size_of_element,
; 72 : MYF(MY_WME | MY_ALLOW_ZERO_PTR))))
push 80 ; 00000050H
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+8]
mov edx, DWORD PTR _array$[ebp]
add ecx, DWORD PTR [edx+12]
mov eax, DWORD PTR _array$[ebp]
imul ecx, DWORD PTR [eax+16]
push ecx
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx]
push edx
call _my_realloc
add esp, 12 ; 0000000cH
mov DWORD PTR _new_ptr$67317[ebp], eax
cmp DWORD PTR _new_ptr$67317[ebp], 0
jne SHORT $L67320
; 73 : return 0;
xor eax, eax
jmp SHORT $L67315
$L67320:
; 74 : array->buffer=new_ptr;
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _new_ptr$67317[ebp]
mov DWORD PTR [eax], ecx
; 75 : array->max_element+=array->alloc_increment;
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [edx+8]
mov ecx, DWORD PTR _array$[ebp]
add eax, DWORD PTR [ecx+12]
mov edx, DWORD PTR _array$[ebp]
mov DWORD PTR [edx+8], eax
$L67316:
; 77 : return array->buffer+(array->elements++ * array->size_of_element);
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [eax+4]
imul edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [eax]
add eax, edx
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+4]
add edx, 1
mov ecx, DWORD PTR _array$[ebp]
mov DWORD PTR [ecx+4], edx
$L67315:
; 78 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_alloc_dynamic ENDP
_TEXT ENDS
PUBLIC _pop_dynamic
; COMDAT _pop_dynamic
_TEXT SEGMENT
_array$ = 8
_pop_dynamic PROC NEAR ; COMDAT
; 84 : {
push ebp
mov ebp, esp
sub esp, 64 ; 00000040H
push ebx
push esi
push edi
; 85 : if (array->elements)
mov eax, DWORD PTR _array$[ebp]
cmp DWORD PTR [eax+4], 0
je SHORT $L67324
; 86 : return array->buffer+(--array->elements * array->size_of_element);
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+4]
sub edx, 1
mov eax, DWORD PTR _array$[ebp]
mov DWORD PTR [eax+4], edx
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [ecx+4]
imul eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx]
add eax, edx
jmp SHORT $L67323
$L67324:
; 87 : return 0;
xor eax, eax
$L67323:
; 88 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_pop_dynamic ENDP
_TEXT ENDS
PUBLIC _set_dynamic
EXTRN _memset:NEAR
; COMDAT _set_dynamic
_TEXT SEGMENT
_array$ = 8
_element$ = 12
_idx$ = 16
_size$67334 = -4
_new_ptr$67335 = -8
_set_dynamic PROC NEAR ; COMDAT
; 92 : {
push ebp
mov ebp, esp
sub esp, 72 ; 00000048H
push ebx
push esi
push edi
; 93 : if (idx >= array->elements)
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _idx$[ebp]
cmp ecx, DWORD PTR [eax+4]
jb $L67332
; 95 : if (idx >= array->max_element)
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _idx$[ebp]
cmp eax, DWORD PTR [edx+8]
jb SHORT $L67333
; 97 : uint size;
; 98 : char *new_ptr;
; 99 : size=(idx+array->alloc_increment)/array->alloc_increment;
mov ecx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _idx$[ebp]
add eax, DWORD PTR [ecx+12]
mov ecx, DWORD PTR _array$[ebp]
xor edx, edx
div DWORD PTR [ecx+12]
mov DWORD PTR _size$67334[ebp], eax
; 100 : size*= array->alloc_increment;
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _size$67334[ebp]
imul eax, DWORD PTR [edx+12]
mov DWORD PTR _size$67334[ebp], eax
; 101 : if (!(new_ptr=(char*) my_realloc(array->buffer,size*
; 102 : array->size_of_element,
; 103 : MYF(MY_WME | MY_ALLOW_ZERO_PTR))))
push 80 ; 00000050H
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _size$67334[ebp]
imul edx, DWORD PTR [ecx+16]
push edx
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax]
push ecx
call _my_realloc
add esp, 12 ; 0000000cH
mov DWORD PTR _new_ptr$67335[ebp], eax
cmp DWORD PTR _new_ptr$67335[ebp], 0
jne SHORT $L67338
; 104 : return TRUE;
mov al, 1
jmp SHORT $L67331
$L67338:
; 105 : array->buffer=new_ptr;
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _new_ptr$67335[ebp]
mov DWORD PTR [edx], eax
; 106 : array->max_element=size;
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _size$67334[ebp]
mov DWORD PTR [ecx+8], edx
$L67333:
; 108 : bzero((gptr) (array->buffer+array->elements*array->size_of_element),
; 109 : (idx - array->elements)*array->size_of_element);
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _idx$[ebp]
sub ecx, DWORD PTR [eax+4]
mov edx, DWORD PTR _array$[ebp]
imul ecx, DWORD PTR [edx+16]
push ecx
push 0
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [eax+4]
imul edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax]
add ecx, edx
push ecx
call _memset
add esp, 12 ; 0000000cH
; 110 : array->elements=idx+1;
mov edx, DWORD PTR _idx$[ebp]
add edx, 1
mov eax, DWORD PTR _array$[ebp]
mov DWORD PTR [eax+4], edx
$L67332:
; 112 : memcpy(array->buffer+(idx * array->size_of_element),element,
; 113 : (size_t) array->size_of_element);
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+16]
push edx
mov eax, DWORD PTR _element$[ebp]
push eax
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _idx$[ebp]
imul edx, DWORD PTR [ecx+16]
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax]
add ecx, edx
push ecx
call _memcpy
add esp, 12 ; 0000000cH
; 114 : return FALSE;
xor al, al
$L67331:
; 115 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_set_dynamic ENDP
_TEXT ENDS
PUBLIC _get_dynamic
PUBLIC ?__LINE__Var@?1??get_dynamic@@9@9 ; __LINE__Var
PUBLIC ??_C@_07EANM@warning?$AA@ ; `string'
PUBLIC ??_C@_0CH@JLMH@To?5big?5array?5idx?3?5?$CFd?0?5array?5size@ ; `string'
EXTRN __db_on_:DWORD
EXTRN __db_pargs_:NEAR
EXTRN __db_doprnt_:NEAR
; COMDAT ?__LINE__Var@?1??get_dynamic@@9@9
; File m:\mysql-3.23\mysys\array.c
_DATA SEGMENT
?__LINE__Var@?1??get_dynamic@@9@9 DW 077H ; __LINE__Var
_DATA ENDS
; COMDAT ??_C@_07EANM@warning?$AA@
CONST SEGMENT
??_C@_07EANM@warning?$AA@ DB 'warning', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CH@JLMH@To?5big?5array?5idx?3?5?$CFd?0?5array?5size@
CONST SEGMENT
??_C@_0CH@JLMH@To?5big?5array?5idx?3?5?$CFd?0?5array?5size@ DB 'To big ar'
DB 'ray idx: %d, array size is %d', 00H ; `string'
CONST ENDS
; COMDAT _get_dynamic
_TEXT SEGMENT
_array$ = 8
_element$ = 12
_idx$ = 16
_get_dynamic PROC NEAR ; COMDAT
; 119 : {
push ebp
mov ebp, esp
sub esp, 64 ; 00000040H
push ebx
push esi
push edi
; 120 : if (idx >= array->elements)
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _idx$[ebp]
cmp ecx, DWORD PTR [eax+4]
jb SHORT $L67348
; 123 : idx,array->elements));
cmp DWORD PTR __db_on_, 0
je SHORT $L67350
push OFFSET FLAT:??_C@_07EANM@warning?$AA@ ; `string'
movsx edx, WORD PTR ?__LINE__Var@?1??get_dynamic@@9@9 ; __LINE__Var
add edx, 4
push edx
call __db_pargs_
add esp, 8
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+4]
push ecx
mov edx, DWORD PTR _idx$[ebp]
push edx
push OFFSET FLAT:??_C@_0CH@JLMH@To?5big?5array?5idx?3?5?$CFd?0?5array?5size@ ; `string'
call __db_doprnt_
add esp, 12 ; 0000000cH
$L67350:
; 124 : bzero(element,array->size_of_element);
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
push 0
mov edx, DWORD PTR _element$[ebp]
push edx
call _memset
add esp, 12 ; 0000000cH
; 125 : return;
jmp SHORT $L67347
$L67348:
; 127 : memcpy(element,array->buffer+idx*array->size_of_element,
; 128 : (size_t) array->size_of_element);
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+16]
push ecx
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR _idx$[ebp]
imul eax, DWORD PTR [edx+16]
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx]
add edx, eax
push edx
mov eax, DWORD PTR _element$[ebp]
push eax
call _memcpy
add esp, 12 ; 0000000cH
$L67347:
; 129 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_get_dynamic ENDP
_TEXT ENDS
PUBLIC _delete_dynamic
EXTRN _my_no_flags_free:NEAR
; COMDAT _delete_dynamic
_TEXT SEGMENT
_array$ = 8
_delete_dynamic PROC NEAR ; COMDAT
; 133 : {
push ebp
mov ebp, esp
sub esp, 64 ; 00000040H
push ebx
push esi
push edi
; 134 : if (array->buffer)
mov eax, DWORD PTR _array$[ebp]
cmp DWORD PTR [eax], 0
je SHORT $L67357
; 136 : my_free(array->buffer,MYF(MY_WME));
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx]
push edx
call _my_no_flags_free
add esp, 4
; 137 : array->buffer=0;
mov eax, DWORD PTR _array$[ebp]
mov DWORD PTR [eax], 0
; 138 : array->elements=array->max_element=0;
mov ecx, DWORD PTR _array$[ebp]
mov DWORD PTR [ecx+8], 0
mov edx, DWORD PTR _array$[ebp]
mov DWORD PTR [edx+4], 0
$L67357:
; 140 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_delete_dynamic ENDP
_TEXT ENDS
PUBLIC _delete_dynamic_element
EXTRN _memmove:NEAR
; COMDAT _delete_dynamic_element
_TEXT SEGMENT
_array$ = 8
_idx$ = 12
_ptr$ = -4
_delete_dynamic_element PROC NEAR ; COMDAT
; 144 : {
push ebp
mov ebp, esp
sub esp, 68 ; 00000044H
push ebx
push esi
push edi
; 145 : char *ptr=array->buffer+array->size_of_element*idx;
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax+16]
imul ecx, DWORD PTR _idx$[ebp]
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [edx]
add eax, ecx
mov DWORD PTR _ptr$[ebp], eax
; 146 : array->elements--;
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+4]
sub edx, 1
mov eax, DWORD PTR _array$[ebp]
mov DWORD PTR [eax+4], edx
; 147 : memmove(ptr,ptr+array->size_of_element,
; 148 : (array->elements-idx)*array->size_of_element);
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+4]
sub edx, DWORD PTR _idx$[ebp]
mov eax, DWORD PTR _array$[ebp]
imul edx, DWORD PTR [eax+16]
push edx
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _ptr$[ebp]
add edx, DWORD PTR [ecx+16]
push edx
mov eax, DWORD PTR _ptr$[ebp]
push eax
call _memmove
add esp, 12 ; 0000000cH
; 149 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_delete_dynamic_element ENDP
_TEXT ENDS
PUBLIC _freeze_size
; COMDAT _freeze_size
_TEXT SEGMENT
_array$ = 8
_elements$ = -4
_freeze_size PROC NEAR ; COMDAT
; 153 : {
push ebp
mov ebp, esp
sub esp, 72 ; 00000048H
push ebx
push esi
push edi
; 154 : uint elements=max(array->elements,1);
mov eax, DWORD PTR _array$[ebp]
cmp DWORD PTR [eax+4], 1
jbe SHORT $L67407
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR [ecx+4]
mov DWORD PTR -8+[ebp], edx
jmp SHORT $L67408
$L67407:
mov DWORD PTR -8+[ebp], 1
$L67408:
mov eax, DWORD PTR -8+[ebp]
mov DWORD PTR _elements$[ebp], eax
; 155 :
; 156 : if (array->buffer && array->max_element != elements)
mov ecx, DWORD PTR _array$[ebp]
cmp DWORD PTR [ecx], 0
je SHORT $L67368
mov edx, DWORD PTR _array$[ebp]
mov eax, DWORD PTR [edx+8]
cmp eax, DWORD PTR _elements$[ebp]
je SHORT $L67368
; 158 : array->buffer=(char*) my_realloc(array->buffer,
; 159 : elements*array->size_of_element,
; 160 : MYF(MY_WME));
push 16 ; 00000010H
mov ecx, DWORD PTR _array$[ebp]
mov edx, DWORD PTR _elements$[ebp]
imul edx, DWORD PTR [ecx+16]
push edx
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR [eax]
push ecx
call _my_realloc
add esp, 12 ; 0000000cH
mov edx, DWORD PTR _array$[ebp]
mov DWORD PTR [edx], eax
; 161 : array->max_element=elements;
mov eax, DWORD PTR _array$[ebp]
mov ecx, DWORD PTR _elements$[ebp]
mov DWORD PTR [eax+8], ecx
$L67368:
; 163 : }
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
_freeze_size ENDP
_TEXT ENDS
END