⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fec.s.980624a

📁 当前很多文章多提到的lugi的reed-solomon编码的源代码
💻 980624A
📖 第 1 页 / 共 2 页
字号:
.globl _invert_vdm	.type	 _invert_vdm,@function_invert_vdm:	pushl %ebp	movl %esp,%ebp	subl $32,%esp	pushl %edi	pushl %esi	pushl %ebx	movl 12(%ebp),%esi	cmpl $1,%esi	je L197	pushl $LC19	pushl %esi	call _my_malloc	movl %eax,-8(%ebp)	pushl $LC19	pushl %esi	call _my_malloc	movl %eax,-4(%ebp)	pushl $LC19	pushl %esi	call _my_malloc	movl %eax,-12(%ebp)	movl $1,%ecx	xorl %edx,%edx	addl $24,%esp	cmpl %esi,%edx	jge L167	.align 2,0x90L169:	movl -8(%ebp),%ebx	movb $0,(%edx,%ebx)	movl 8(%ebp),%edi	movb (%ecx,%edi),%al	movl -12(%ebp),%ebx	movb %al,(%edx,%ebx)	incl %edx	addl %esi,%ecx	cmpl %esi,%edx	jl L169L167:	movl -12(%ebp),%edi	movb (%edi),%al	movl -8(%ebp),%ebx	movb %al,-1(%ebx,%esi)	movl $1,%edx	cmpl %esi,%edx	jge L172	leal -1(%esi),%edi	movl %edi,-32(%ebp)	.align 2,0x90L174:	movl -12(%ebp),%ebx	movb (%edx,%ebx),%bl	movb %bl,-20(%ebp)	movl %esi,%ecx	subl %edx,%ecx	cmpl %ecx,-32(%ebp)	jle L176	movzbl %bl,%eax	sall $8,%eax	addl $_gf_mul_table,%eax	movl %eax,-28(%ebp)	.align 2,0x90L178:	movl -8(%ebp),%edi	movzbl 1(%edi,%ecx),%eax	movl -28(%ebp),%ebx	movb (%eax,%ebx),%al	xorb %al,(%ecx,%edi)	incl %ecx	cmpl %ecx,-32(%ebp)	jg L178L176:	movb -20(%ebp),%bl	movl -8(%ebp),%edi	xorb %bl,-1(%edi,%esi)	incl %edx	cmpl %esi,%edx	jl L174L172:	movl $0,-32(%ebp)	cmpl %esi,-32(%ebp)	jge L182	.align 2,0x90L184:	movl -12(%ebp),%ebx	movl -32(%ebp),%edi	movb (%edi,%ebx),%al	movb $1,-16(%ebp)	movl -4(%ebp),%ebx	movb $1,-1(%ebx,%esi)	leal -2(%esi),%edx	testl %edx,%edx	jl L186	andl $255,%eax	sall $8,%eax	leal _gf_mul_table(%eax),%ecx	.align 2,0x90L188:	movl -4(%ebp),%edi	movzbl 1(%edi,%edx),%eax	movl -8(%ebp),%ebx	movb 1(%ebx,%edx),%bl	xorb (%eax,%ecx),%bl	movb %bl,(%edx,%edi)	movzbl -16(%ebp),%eax	movb (%eax,%ecx),%al	xorb (%edx,%edi),%al	movb %al,-16(%ebp)	decl %edx	jns L188L186:	movl $0,-28(%ebp)	cmpl %esi,-28(%ebp)	jge L183	movzbl -16(%ebp),%edi	movl %edi,-24(%ebp)	.align 2,0x90L193:	movl -28(%ebp),%ecx	imull %esi,%ecx	addl -32(%ebp),%ecx	movl -24(%ebp),%ebx	movzbl _inverse(%ebx),%eax	sall $8,%eax	movl -4(%ebp),%edi	movl -28(%ebp),%ebx	movzbl (%ebx,%edi),%edx	movb _gf_mul_table(%edx,%eax),%al	movl 8(%ebp),%edi	movb %al,(%ecx,%edi)	incl %ebx	movl %ebx,-28(%ebp)	cmpl %esi,%ebx	jl L193L183:	incl -32(%ebp)	cmpl %esi,-32(%ebp)	jl L184L182:	pushl -8(%ebp)	call _free	pushl -4(%ebp)	call _free	pushl -12(%ebp)	call _freeL197:	xorl %eax,%eax	leal -44(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe7:	.size	 _invert_vdm,Lfe7-_invert_vdm.data	.align 2	.type	 _fec_initialized,@object	.size	 _fec_initialized,4_fec_initialized:	.long 0.text	.align 2	.type	 _init_fec,@function_init_fec:	pushl %ebp	movl %esp,%ebp	call _generate_gf	call _init_mul_table	movl $1,_fec_initialized	leave	retLfe8:	.size	 _init_fec,Lfe8-_init_fecLC25:	.ascii "bad parameters to fec_free\12\0"	.align 2.globl _fec_free	.type	 _fec_free,@function_fec_free:	pushl %ebp	movl %esp,%ebp	pushl %ebx	movl 8(%ebp),%ebx	testl %ebx,%ebx	je L201	movl 8(%ebx),%eax	xorl $-20181524,%eax	xorl 4(%ebx),%eax	xorl 12(%ebx),%eax	cmpl %eax,(%ebx)	je L200L201:	pushl $LC25	pushl $___sF+176	call _fprintf	jmp L199	.align 2,0x90L200:	pushl 12(%ebx)	call _free	pushl %ebx	call _freeL199:	movl -4(%ebp),%ebx	leave	retLfe9:	.size	 _fec_free,Lfe9-_fec_freeLC26:	.ascii "Invalid parameters k %d n %d GF_SIZE %d\12\0"LC27:	.ascii "new_code\0"	.align 2.globl _fec_new	.type	 _fec_new,@function_fec_new:	pushl %ebp	movl %esp,%ebp	subl $16,%esp	pushl %edi	pushl %esi	pushl %ebx	movl 8(%ebp),%edi	cmpl $0,_fec_initialized	jne L203	call _init_fecL203:	cmpl $256,%edi	jg L205	cmpl $256,12(%ebp)	jg L205	cmpl %edi,12(%ebp)	jge L204L205:	pushl $255	pushl 12(%ebp)	pushl %edi	pushl $LC26	pushl $___sF+176	call _fprintf	xorl %eax,%eax	jmp L231	.align 2,0x90L204:	pushl $LC27	pushl $16	call _my_malloc	movl %eax,-8(%ebp)	movl %edi,4(%eax)	movl 12(%ebp),%esi	movl -8(%ebp),%edx	movl %esi,8(%edx)	pushl $LC19	movl 12(%ebp),%ebx	imull %edi,%ebx	pushl %ebx	call _my_malloc	movl -8(%ebp),%edx	movl %eax,12(%edx)	movl 12(%ebp),%eax	xorl $-20181524,%eax	xorl %edi,%eax	movl -8(%ebp),%edx	xorl 12(%edx),%eax	movl %eax,(%edx)	pushl $LC19	pushl %ebx	call _my_malloc	movl %eax,-4(%ebp)	movb $1,(%eax)	movl $1,%ecx	addl $24,%esp	cmpl %edi,%ecx	jge L207	.align 2,0x90L209:	movl -4(%ebp),%esi	movb $0,(%ecx,%esi)	incl %ecx	cmpl %edi,%ecx	jl L209L207:	movl -4(%ebp),%edx	addl %edi,%edx	movl %edx,-16(%ebp)	xorl %ebx,%ebx	movl 12(%ebp),%eax	decl %eax	cmpl %eax,%ebx	jge L212	movl 12(%ebp),%esi	decl %esi	movl %esi,-12(%ebp)	.align 2,0x90L214:	xorl %ecx,%ecx	cmpl %edi,%ecx	jge L213	.align 2,0x90L218:	movl %ebx,%eax	imull %ecx,%eax	cmpl $254,%eax	jle L221	.align 2,0x90L222:	addl $-255,%eax	movl %eax,%edx	sarl $8,%edx	andl $255,%eax	addl %edx,%eax	cmpl $254,%eax	jg L222L221:	andl $255,%eax	movb _gf_exp(%eax),%al	movl -16(%ebp),%edx	movb %al,(%ecx,%edx)	incl %ecx	cmpl %edi,%ecx	jl L218L213:	incl %ebx	addl %edi,-16(%ebp)	cmpl %ebx,-12(%ebp)	jg L214L212:	pushl %edi	pushl -4(%ebp)	call _invert_vdm	pushl %edi	pushl %edi	movl 12(%ebp),%eax	subl %edi,%eax	pushl %eax	movl %edi,%ebx	imull %edi,%ebx	movl %ebx,%eax	movl -8(%ebp),%esi	addl 12(%esi),%eax	pushl %eax	pushl -4(%ebp)	movl -4(%ebp),%eax	addl %ebx,%eax	pushl %eax	call _matmul	addl $32,%esp	pushl %ebx	pushl 12(%esi)	call _bzero	movl 12(%esi),%edx	movl %edx,-16(%ebp)	xorl %ecx,%ecx	addl $8,%esp	cmpl %edi,%ecx	jge L227	leal 1(%edi),%eax	.align 2,0x90L229:	movl -16(%ebp),%esi	movb $1,(%esi)	incl %ecx	addl %eax,%esi	movl %esi,-16(%ebp)	cmpl %edi,%ecx	jl L229L227:	pushl -4(%ebp)	call _free	movl -8(%ebp),%eaxL231:	leal -28(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe10:	.size	 _fec_new,Lfe10-_fec_newLC28:	.ascii "Invalid index %d (max %d)\12\0"	.align 2.globl _fec_encode	.type	 _fec_encode,@function_fec_encode:	pushl %ebp	movl %esp,%ebp	pushl %edi	pushl %esi	pushl %ebx	movl 8(%ebp),%ebx	movl 20(%ebp),%edx	movl 4(%ebx),%edi	cmpl %edi,%edx	jge L234	pushl 24(%ebp)	pushl 16(%ebp)	movl 12(%ebp),%ecx	pushl (%ecx,%edx,4)	call _bcopy	jmp L235	.align 2,0x90L234:	cmpl %edx,8(%ebx)	jle L236	movl %edx,%eax	imull %edi,%eax	movl %eax,%esi	addl 12(%ebx),%esi	pushl 24(%ebp)	pushl 16(%ebp)	call _bzero	xorl %ebx,%ebx	addl $8,%esp	cmpl %edi,%ebx	jge L235	.align 2,0x90L240:	cmpb $0,(%ebx,%esi)	je L239	pushl 24(%ebp)	movzbl (%ebx,%esi),%eax	pushl %eax	movl 12(%ebp),%ecx	pushl (%ecx,%ebx,4)	pushl 16(%ebp)	call _addmul1	addl $16,%espL239:	incl %ebx	cmpl %edi,%ebx	jl L240	jmp L235	.align 2,0x90L236:	movl 8(%ebx),%eax	decl %eax	pushl %eax	pushl %edx	pushl $LC28	pushl $___sF+176	call _fprintfL235:	leal -12(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe11:	.size	 _fec_encode,Lfe11-_fec_encode	.align 2	.type	 _shuffle,@function_shuffle:	pushl %ebp	movl %esp,%ebp	pushl %edi	pushl %esi	pushl %ebx	movl 8(%ebp),%edi	movl 12(%ebp),%esi	xorl %ecx,%ecxL255:	cmpl %ecx,16(%ebp)	jle L246	movl 16(%ebp),%edx	cmpl %edx,(%esi,%ecx,4)	jge L250	cmpl %ecx,(%esi,%ecx,4)	jne L249L250:	incl %ecx	jmp L255	.align 2,0x90L249:	movl (%esi,%ecx,4),%ebx	cmpl %ebx,(%esi,%ebx,4)	jne L252	movl $1,%eax	jmp L254	.align 2,0x90L252:	movl (%esi,%ecx,4),%edx	movl (%esi,%ebx,4),%eax	movl %eax,(%esi,%ecx,4)	movl %edx,(%esi,%ebx,4)	movl (%edi,%ecx,4),%edx	movl (%edi,%ebx,4),%eax	movl %eax,(%edi,%ecx,4)	movl %edx,(%edi,%ebx,4)	jmp L255	.align 2,0x90L246:	xorl %eax,%eaxL254:	leal -12(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe12:	.size	 _shuffle,Lfe12-_shuffleLC29:	.ascii "decode: invalid index %d (max %d)\12\0"	.align 2	.type	 _build_decode_matrix,@function_build_decode_matrix:	pushl %ebp	movl %esp,%ebp	subl $4,%esp	pushl %edi	pushl %esi	pushl %ebx	movl 8(%ebp),%ecx	movl 4(%ecx),%esi	pushl $LC19	movl %esi,%eax	imull %esi,%eax	pushl %eax	call _my_malloc	movl %eax,-4(%ebp)	xorl %ebx,%ebx	movl -4(%ebp),%edi	addl $8,%esp	cmpl %esi,%ebx	jge L258	.align 2,0x90L260:	movl 16(%ebp),%ecx	cmpl %esi,(%ecx,%ebx,4)	jge L261	pushl %esi	pushl %edi	call _bzero	movb $1,(%ebx,%edi)	addl $8,%esp	jmp L259	.align 2,0x90L261:	movl 16(%ebp),%ecx	movl (%ecx,%ebx,4),%edx	movl 8(%ebp),%ecx	cmpl %edx,8(%ecx)	jg L263	movl 8(%ecx),%eax	decl %eax	pushl %eax	pushl %edx	pushl $LC29	pushl $___sF+176	call _fprintf	pushl -4(%ebp)	call _free	xorl %eax,%eax	jmp L267	.align 2,0x90L263:	pushl %esi	pushl %edi	movl %esi,%eax	movl 16(%ebp),%ecx	imull (%ecx,%ebx,4),%eax	movl 8(%ebp),%ecx	addl 12(%ecx),%eax	pushl %eax	call _bcopy	addl $12,%espL259:	incl %ebx	addl %esi,%edi	cmpl %esi,%ebx	jl L260L258:	pushl %esi	pushl -4(%ebp)	call _invert_mat	addl $8,%esp	testl %eax,%eax	je L266	pushl -4(%ebp)	call _free	movl $0,-4(%ebp)L266:	movl -4(%ebp),%eaxL267:	leal -16(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe13:	.size	 _build_decode_matrix,Lfe13-_build_decode_matrixLC30:	.ascii "new pkt pointers\0"LC31:	.ascii "new pkt buffer\0"	.align 2.globl _fec_decode	.type	 _fec_decode,@function_fec_decode:	pushl %ebp	movl %esp,%ebp	subl $12,%esp	pushl %edi	pushl %esi	pushl %ebx	movl 8(%ebp),%ebx	movl 4(%ebx),%edi	pushl %edi	pushl 16(%ebp)	pushl 12(%ebp)	call _shuffle	addl $12,%esp	testl %eax,%eax	jne L291	pushl 16(%ebp)	pushl 12(%ebp)	pushl %ebx	call _build_decode_matrix	movl %eax,-4(%ebp)	addl $12,%esp	testl %eax,%eax	jne L271L291:	movl $1,%eax	jmp L290	.align 2,0x90L271:	pushl $LC30	leal 0(,%edi,4),%eax	pushl %eax	call _my_malloc	movl %eax,-8(%ebp)	xorl %esi,%esi	addl $8,%esp	cmpl %edi,%esi	jge L273	.align 2,0x90L275:	movl 16(%ebp),%edx	cmpl %edi,(%edx,%esi,4)	jl L274	pushl $LC31	pushl 20(%ebp)	call _my_malloc	movl -8(%ebp),%edx	movl %eax,(%edx,%esi,4)	pushl 20(%ebp)	pushl %eax	call _bzero	xorl %ebx,%ebx	addl $16,%esp	cmpl %edi,%ebx	jge L274	movl %esi,%edx	imull %edi,%edx	movl %edx,-12(%ebp)	.align 2,0x90L280:	movl -12(%ebp),%eax	addl %ebx,%eax	movl -4(%ebp),%edx	cmpb $0,(%eax,%edx)	je L279	pushl 20(%ebp)	movzbl (%eax,%edx),%eax	pushl %eax	movl 12(%ebp),%edx	pushl (%edx,%ebx,4)	movl -8(%ebp),%edx	pushl (%edx,%esi,4)	call _addmul1	addl $16,%espL279:	incl %ebx	cmpl %edi,%ebx	jl L280L274:	incl %esi	cmpl %edi,%esi	jl L275L273:	xorl %esi,%esi	cmpl %edi,%esi	jge L285	.align 2,0x90L287:	movl 16(%ebp),%edx	cmpl %edi,(%edx,%esi,4)	jl L286	pushl 20(%ebp)	movl 12(%ebp),%edx	pushl (%edx,%esi,4)	movl -8(%ebp),%edx	pushl (%edx,%esi,4)	call _bcopy	movl -8(%ebp),%edx	pushl (%edx,%esi,4)	call _free	addl $16,%espL286:	incl %esi	cmpl %edi,%esi	jl L287L285:	pushl -8(%ebp)	call _free	pushl -4(%ebp)	call _free	xorl %eax,%eaxL290:	leal -24(%ebp),%esp	popl %ebx	popl %esi	popl %edi	leave	retLfe14:	.size	 _fec_decode,Lfe14-_fec_decode.lcomm _gf_exp,512.lcomm _gf_log,1024.lcomm _inverse,256.lcomm _gf_mul_table,65536

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -