
%define _ret -2
%define _i -4
%define _n -6
%define _off -8
%define _num -20
%define temp1 -22
%define _str 4

_atoi:
	push bp
	mov bp,sp
	sub sp,word 20
	push word 0
	push 4
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	push 10000
	pop dx
	pop di
	mov [di],dx
	push dx
	pop ax
	push word 0
	push 3
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	push 1000
	pop dx
	pop di
	mov [di],dx
	push dx
	pop ax
	push word 0
	push 2
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	push 100
	pop dx
	pop di
	mov [di],dx
	push dx
	pop ax
	push word 0
	push 1
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	push 10
	pop dx
	pop di
	mov [di],dx
	push dx
	pop ax
	push word 0
	push 0
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	push 1
	pop dx
	pop di
	mov [di],dx
	push dx
	pop ax
	push 0
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	push word [bp+_str]
	call _strlen
	add sp,word 2
	push ax
	pop ax
	mov [bp+_n],ax
	push ax
	pop ax
	push word [bp+_n]
	push 1
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop ax
	mov [bp+_off],ax
	push ax
	pop ax
	push 0
	pop ax
	mov [bp+_i],ax
	push ax
.L9:	
	push word [bp+_i]
	push word [bp+_n]
	pop bx
	pop dx
	cmp dx,bx
	jl .L10
	push 0
	jmp .L11
.L10:	
	push 1
.L11:	
	pop ax
	cmp ax,word 0
	je .L8
	sub sp,word 2
	push word 0
	push word [bp+_i]
	pop bx
	pop dx
	add bx,dx
	push bx
	mov bx,[bp+_str]
	pop dx
	push bx
	add bx,dx
	push bx
	pop bx
	mov al,[bx]
	cpush al
	pop word [bp+temp1]
	mov ax,'0'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L13
	jmp .L12
.L13:	
	mov ax,'1'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L14
	push word [bp+_ret]
	push 1
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L14:	
	mov ax,'2'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L15
	push word [bp+_ret]
	push 2
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L15:	
	mov ax,'3'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L16
	push word [bp+_ret]
	push 3
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L16:	
	mov ax,'4'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L17
	push word [bp+_ret]
	push 4
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L17:	
	mov ax,'5'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L18
	push word [bp+_ret]
	push 5
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L18:	
	mov ax,'6'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L19
	push word [bp+_ret]
	push 6
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L19:	
	mov ax,'7'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L20
	push word [bp+_ret]
	push 7
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L20:	
	mov ax,'8'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L21
	push word [bp+_ret]
	push 8
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L21:	
	mov ax,'9'
	mov bx,word [bp+temp1]
	cmp ax,bx
	jne .L22
	push word [bp+_ret]
	push 9
	push word 0
	push word [bp+_off]
	push word [bp+_i]
	pop bx
	pop dx
	sub dx,bx
	push dx
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_num]
	pop dx
	imul dx,word 2
	add bx,dx
	push bx
	pop bx
	mov dx,[bx]
	push dx
	pop bx
	pop dx
	imul bx,dx
	push bx
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	jmp .L12
.L22:	
.L12:	
	inc word [bp+_i]
	push word [bp+_i]
	pop ax
	jmp .L9
.L8:	
	push word [bp+_ret]
	pop ax
	leave
	ret
%undef _ret
%undef _i
%undef _n
%undef _off
%undef _num
%undef temp1
%undef _str

%define _ch 4

_is_digit:
	push bp
	mov bp,sp
	sub sp,word 0
	push word [bp+_ch]
	push word '0'
	pop bx
	pop dx
	cmp dx,bx
	jge .L1
	push 0
	jmp .L2
.L1:	
	push 1
.L2:	
	push word [bp+_ch]
	push word '9'
	pop bx
	pop dx
	cmp dx,bx
	jle .L3
	push 0
	jmp .L4
.L3:	
	push 1
.L4:	
	pop bx
	pop ax
	and ax,bx
	push ax
	pop ax
	cmp ax,word 0
	je .L5
	sub sp,word 0
	push 1
	pop ax
	leave
	ret
	jmp .L0
.L5:	
.L0:	
	push 0
	pop ax
	leave
	ret
%undef _ch

%define _ret -2
%define _n -4
%define _byte_array -14
%define _buffer -24
%define _index -26
%define _number 4

_print_short:
	push bp
	mov bp,sp
	sub sp,word 26
	push 0
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	push word 0
	push 0
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '0'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 1
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '1'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 2
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '2'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 3
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '3'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 4
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '4'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 5
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '5'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 6
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '6'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 7
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '7'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 8
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '8'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word 0
	push 9
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word '9'
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	push word [bp+_number]
	push 0
	pop bx
	pop dx
	cmp dx,bx
	je .L49
	push 0
	jmp .L50
.L49:	
	push 1
.L50:	
	pop ax
	cmp ax,word 0
	je .L51
	sub sp,word 0
	push word '0'
	call _putc
	add sp,word 2
	push ax
	pop ax
	jmp .L48
.L51:	
.L48:	
	push 0
	pop ax
	mov [bp+_index],ax
	push ax
	pop ax
.L53:	
	push word [bp+_number]
	pop ax
	cmp ax,word 0
	je .L52
	sub sp,word 0
	push word [bp+_number]
	push 10
	pop bx
	pop ax
	xor dx,dx
	idiv bx
	push dx
	pop ax
	mov [bp+_n],ax
	push ax
	pop ax
	push word [bp+_number]
	push 10
	pop bx
	pop ax
	xor dx,dx
	idiv bx
	push ax
	pop ax
	mov [bp+_number],ax
	push ax
	pop ax
	push word 0
	push word [bp+_index]
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_buffer]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word 0
	push word [bp+_n]
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_byte_array]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	pop bx
	mov al,[bx]
	cpush al
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	inc word [bp+_index]
	push word [bp+_index]
	pop ax
	jmp .L53
.L52:	
	dec word [bp+_index]
	push word [bp+_index]
	pop ax
.L55:	
	push word [bp+_index]
	push 0
	pop bx
	pop dx
	cmp dx,bx
	jge .L56
	push 0
	jmp .L57
.L56:	
	push 1
.L57:	
	pop ax
	cmp ax,word 0
	je .L54
	sub sp,word 0
	push word 0
	push word [bp+_index]
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_buffer]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	pop bx
	mov al,[bx]
	cpush al
	call _putc
	add sp,word 2
	push ax
	pop ax
	dec word [bp+_index]
	push word [bp+_index]
	pop ax
	jmp .L55
.L54:	
	push word [bp+_ret]
	pop ax
	leave
	ret
%undef _ret
%undef _n
%undef _byte_array
%undef _buffer
%undef _index
%undef _number

%define _ptr -2
%define _ptr0 -4
%define _ptr1 -6
%define _i -8
%define _j -10
%define _ret -12
%define _fmt 4

_printf:
	push bp
	mov bp,sp
	sub sp,word 12
	push 0
	pop ax
	mov [bp+_ret],ax
	push ax
	pop ax
	push word [bp+_fmt]
	pop ax
	mov [bp+_ptr],ax
	push ax
	pop ax
	push 2
	pop ax
	mov [bp+_i],ax
	push ax
	pop ax
.L59:	
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	cpop al
	cmp al,byte 0
	je .L58
	sub sp,word 0
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	push word '%'
	pop bx
	pop dx
	cmp dx,bx
	je .L61
	push 0
	jmp .L62
.L61:	
	push 1
.L62:	
	pop ax
	cmp ax,word 0
	je .L63
	sub sp,word 0
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	push word '%'
	pop bx
	pop dx
	cmp dx,bx
	je .L65
	push 0
	jmp .L66
.L65:	
	push 1
.L66:	
	pop ax
	cmp ax,word 0
	je .L67
	sub sp,word 0
	push word '%'
	call _putc
	add sp,word 2
	push ax
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	jmp .L64
.L67:	
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	push word 'x'
	pop bx
	pop dx
	cmp dx,bx
	je .L68
	push 0
	jmp .L69
.L68:	
	push 1
.L69:	
	pop ax
	cmp ax,word 0
	je .L70
	sub sp,word 0
	lea ax,[bp+_fmt]
	push ax
	push word [bp+_i]
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ptr0],ax
	push ax
	pop ax
	push bp
	mov ax,[bp+_ptr0]
	mov bp,ax
	mov dx,[bp]
	pop bp
	push dx
	call _tohex
	add sp,word 2
	push 2
	mov bx,[bp+_i]
	pop dx
	add bx,dx
	push bx
	pop ax
	mov [bp+_i],ax
	push ax
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	jmp .L64
.L70:	
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	push word 'd'
	pop bx
	pop dx
	cmp dx,bx
	je .L71
	push 0
	jmp .L72
.L71:	
	push 1
.L72:	
	pop ax
	cmp ax,word 0
	je .L73
	sub sp,word 0
	lea ax,[bp+_fmt]
	push ax
	push word [bp+_i]
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ptr0],ax
	push ax
	pop ax
	push bp
	mov ax,[bp+_ptr0]
	mov bp,ax
	mov dx,[bp]
	pop bp
	push dx
	call _print_short
	add sp,word 2
	push ax
	pop ax
	push 2
	mov bx,[bp+_i]
	pop dx
	add bx,dx
	push bx
	pop ax
	mov [bp+_i],ax
	push ax
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	jmp .L64
.L73:	
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	push word 's'
	pop bx
	pop dx
	cmp dx,bx
	je .L74
	push 0
	jmp .L75
.L74:	
	push 1
.L75:	
	pop ax
	cmp ax,word 0
	je .L76
	sub sp,word 0
	lea ax,[bp+_fmt]
	push ax
	push word [bp+_i]
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ptr0],ax
	push ax
	pop ax
	push bp
	mov ax,[bp+_ptr0]
	mov bp,ax
	mov dx,[bp]
	pop bp
	push dx
	pop ax
	mov [bp+_ptr1],ax
	push ax
	pop ax
.L78:	
	mov di,[bp+_ptr1]
	mov al,[di]
	cpush al
	cpop al
	cmp al,byte 0
	je .L77
	sub sp,word 0
	mov di,[bp+_ptr1]
	mov al,[di]
	cpush al
	call _putc
	add sp,word 2
	push ax
	pop ax
	inc word [bp+_ptr1]
	push word [bp+_ptr1]
	pop ax
	jmp .L78
.L77:	
	push 2
	mov bx,[bp+_i]
	pop dx
	add bx,dx
	push bx
	pop ax
	mov [bp+_i],ax
	push ax
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	jmp .L64
.L76:	
	sub sp,word 0
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
.L64:	
	jmp .L60
.L63:	
	sub sp,word 0
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	call _putc
	add sp,word 2
	push ax
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
.L60:	
	jmp .L59
.L58:	
	push 0
	pop ax
	leave
	ret
%undef _ptr
%undef _ptr0
%undef _ptr1
%undef _i
%undef _j
%undef _ret
%undef _fmt

%define _ptr -2
%define _p -4
%define _temp -6
%define _buffer -106
%define _offset -108
%define _ch -110
%define _count -112
%define _fmt 4

_scanf:
	push bp
	mov bp,sp
	sub sp,word 112
	push 0
	pop ax
	mov [bp+_offset],ax
	push ax
	pop ax
	push 2
	pop ax
	mov [bp+_count],ax
	push ax
	pop ax
	lea ax,[bp+_fmt]
	push ax
	push word [bp+_count]
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ptr],ax
	push ax
	pop ax
	push word [bp+_fmt]
	pop ax
	mov [bp+_p],ax
	push ax
.L24:	
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	cpop al
	cmp al,byte 0
	je .L23
	sub sp,word 0
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	push word '%'
	pop bx
	pop dx
	cmp dx,bx
	je .L26
	push 0
	jmp .L27
.L26:	
	push 1
.L27:	
	pop ax
	cmp ax,word 0
	je .L28
	sub sp,word 0
	inc word [bp+_p]
	push word [bp+_p]
	pop ax
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	push word 'd'
	pop bx
	pop dx
	cmp dx,bx
	je .L30
	push 0
	jmp .L31
.L30:	
	push 1
.L31:	
	pop ax
	cmp ax,word 0
	je .L32
	sub sp,word 0
	push bp
	mov ax,[bp+_ptr]
	mov bp,ax
	mov dx,[bp]
	pop bp
	push dx
	pop ax
	mov [bp+_temp],ax
	push ax
	pop ax
	call _getch
	push ax
	pop ax
	mov [bp+_ch],ax
	push ax
	pop ax
	push word [bp+_ch]
	call _putc
	add sp,word 2
	push ax
	pop ax
	push 0
	pop ax
	mov [bp+_offset],ax
	push ax
	pop ax
.L34:	
	push word [bp+_ch]
	call _is_digit
	add sp,word 2
	push ax
	push word [bp+_ch]
	push word 13
	pop bx
	pop dx
	cmp dx,bx
	jne .L35
	push 0
	jmp .L36
.L35:	
	push 1
.L36:	
	push word [bp+_ch]
	push word 10
	pop bx
	pop dx
	cmp dx,bx
	jne .L37
	push 0
	jmp .L38
.L37:	
	push 1
.L38:	
	pop bx
	pop ax
	and ax,bx
	push ax
	pop bx
	pop ax
	and ax,bx
	push ax
	pop ax
	cmp ax,word 0
	je .L33
	sub sp,word 0
	push word 0
	push word [bp+_offset]
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_buffer]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word [bp+_ch]
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	inc word [bp+_offset]
	push word [bp+_offset]
	pop ax
	call _getch
	push ax
	pop ax
	mov [bp+_ch],ax
	push ax
	pop ax
	push word [bp+_ch]
	call _putc
	add sp,word 2
	push ax
	pop ax
	jmp .L34
.L33:	
	push word 0
	push word [bp+_offset]
	pop bx
	pop dx
	add bx,dx
	push bx
	lea bx,[bp+_buffer]
	pop dx
	imul dx,word 1
	add bx,dx
	push bx
	push word 0
	cpop al
	pop di
	mov [di],al
	cpush al
	pop ax
	lea ax,[bp+_buffer]
	push ax
	call _atoi
	add sp,word 2
	push ax
	pop ax
	mov di,[bp+_temp]
	mov [di],ax
	push ax
	pop ax
	push word [bp+_count]
	push 2
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_count],ax
	push ax
	pop ax
	lea ax,[bp+_fmt]
	push ax
	push word [bp+_count]
	pop bx
	pop dx
	add dx,bx
	push dx
	pop ax
	mov [bp+_ptr],ax
	push ax
	pop ax
	jmp .L29
.L32:	
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	push word 'f'
	pop bx
	pop dx
	cmp dx,bx
	je .L39
	push 0
	jmp .L40
.L39:	
	push 1
.L40:	
	pop ax
	cmp ax,word 0
	je .L41
	sub sp,word 0
	nop
	jmp .L29
.L41:	
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	push word 's'
	pop bx
	pop dx
	cmp dx,bx
	je .L42
	push 0
	jmp .L43
.L42:	
	push 1
.L43:	
	pop ax
	cmp ax,word 0
	je .L44
	sub sp,word 0
	nop
	jmp .L29
.L44:	
	mov di,[bp+_p]
	mov al,[di]
	cpush al
	push word 'c'
	pop bx
	pop dx
	cmp dx,bx
	je .L45
	push 0
	jmp .L46
.L45:	
	push 1
.L46:	
	pop ax
	cmp ax,word 0
	je .L47
	sub sp,word 0
	nop
	jmp .L29
.L47:	
.L29:	
	jmp .L25
.L28:	
	sub sp,word 0
	nop
.L25:	
	inc word [bp+_p]
	push word [bp+_p]
	pop ax
	jmp .L24
.L23:	
	push 0
	pop ax
	leave
	ret
%undef _ptr
%undef _p
%undef _temp
%undef _buffer
%undef _offset
%undef _ch
%undef _count
%undef _fmt

%define _a 4
%define _b 6

_strcpy:
	push bp
	mov bp,sp
	sub sp,word 0
.L80:	
	mov di,[bp+_b]
	mov al,[di]
	cpush al
	cpop al
	mov di,[bp+_a]
	mov [di],al
	cpush al
	cpop al
	cmp al,byte 0
	je .L79
	sub sp,word 0
	inc word [bp+_a]
	push word [bp+_a]
	pop ax
	inc word [bp+_b]
	push word [bp+_b]
	pop ax
	jmp .L80
.L79:	
	leave
	ret

%undef _a
%undef _b

%define _n -2
%define _ptr 4

_strlen:
	push bp
	mov bp,sp
	sub sp,word 2
	push 0
	pop ax
	mov [bp+_n],ax
	push ax
	pop ax
.L7:	
	mov di,[bp+_ptr]
	mov al,[di]
	cpush al
	cpop al
	cmp al,byte 0
	je .L6
	sub sp,word 0
	inc word [bp+_n]
	push word [bp+_n]
	pop ax
	inc word [bp+_ptr]
	push word [bp+_ptr]
	pop ax
	jmp .L7
.L6:	
	push word [bp+_n]
	pop ax
	leave
	ret
%undef _n
%undef _ptr
