]> git.zerfleddert.de Git - rsbs2/blob - rsb-lz.c
64a1a471bde322ea43d6d68781dfa200f8fe56c3
[rsbs2] / rsb-lz.c
1 /* TODO: IMPLEMET THIS! */
2 /* Probably very broken lzw implementation by Agilent:
3 *
4 * 59684: e92d43f8 push {r3, r4, r5, r6, r7, r8, r9, r14}
5 * 59688: eb000000 bl 0x59690
6 * 5968c: e8bd83f8 pop {r3, r4, r5, r6, r7, r8, r9, r15}
7 * 59690: e3a08001 mov r8, #1 ; 0x1
8 * 59694: e3a034c0 mov r3, #-1073741824 ; 0xc0000000
9 * 59698: e1500003 cmp r0, r3
10 * 5969c: da000022 ble 0x5972c
11 * 596a0: e3a03020 mov r3, #32 ; 0x20
12 * 596a4: e7b34000 ldr r4, [r3, r0]!
13 * 596a8: e3a08002 mov r8, #2 ; 0x2
14 * 596ac: e5935004 ldr r5, [r3, #4]
15 * 596b0: e1550002 cmp r5, r2
16 * 596b4: 1a00001c bne 0x5972c
17 * 596b8: e3a08003 mov r8, #3 ; 0x3
18 * 596bc: e1510004 cmp r1, r4
19 * 596c0: 23b05000 movscs r5, #0 ; 0x0
20 * 596c4: 33b05001 movscc r5, #1 ; 0x1
21 * 596c8: 1a000017 bne 0x5972c
22 * 596cc: e3a08004 mov r8, #4 ; 0x4
23 * 596d0: e1a03000 mov r3, r0
24 * 596d4: e0804004 add r4, r0, r4
25 * 596d8: e3e05000 mvn r5, #0 ; 0x0
26 * 596dc: e59f7050 ldr r7, [pc, #80] ; 0x59734
27 * 596e0: e1530004 cmp r3, r4
28 * 596e4: 2a00000c bcs 0x5971c
29 * 596e8: e3c39003 bic r9, r3, #3 ; 0x3
30 * 596ec: e5996000 ldr r6, [r9]
31 * 596f0: e2039003 and r9, r3, #3 ; 0x3
32 * 596f4: e1a09189 lsl r9, r9, #3
33 * 596f8: e1a06936 lsr r6, r6, r9
34 * 596fc: e0255c06 eor r5, r5, r6, lsl #24
35 * 59700: e3a06008 mov r6, #8 ; 0x8
36 * 59704: e1b05085 lsls r5, r5, #1
37 * 59708: 20255007 eorcs r5, r5, r7
38 * 5970c: e2566001 subs r6, r6, #1 ; 0x1
39 * 59710: 1afffffb bne 0x59704
40 * 59714: e2833001 add r3, r3, #1 ; 0x1
41 * 59718: eafffff0 b 0x596e0
42 * 5971c: e1e05005 mvn r5, r5
43 * 59720: e5943000 ldr r3, [r4]
44 * 59724: e0533005 subs r3, r3, r5
45 * 59728: 03a08000 moveq r8, #0 ; 0x0
46 * 5972c: e1a00008 mov r0, r8
47 * 59730: e1a0f00e mov r15, r14
48 * 59734: 04c11db7 strbeq r1, [r1], #3511
49 * 59738: e10f1000 mrs r1, CPSR
50 * 5973c: e3c12080 bic r2, r1, #128 ; 0x80
51 * 59740: e3500001 cmp r0, #1 ; 0x1
52 * 59744: 23822080 orrcs r2, r2, #128 ; 0x80
53 * 59748: e129f002 msr CPSR_fc, r2
54 * 5974c: e1b01c81 lsls r1, r1, #25
55 * 59750: e3a00000 mov r0, #0 ; 0x0
56 * 59754: 23a00001 movcs r0, #1 ; 0x1
57 * 59758: e1a0f00e mov r15, r14
58 * 5975c: e10f1000 mrs r1, CPSR
59 * 59760: e3a02001 mov r2, #1 ; 0x1
60 * 59764: e00203e1 and r0, r2, r1, ror #7
61 * 59768: e1a0f00e mov r15, r14
62 * 5976c: ee151f70 mrc 15, 0, r1, cr5, cr0, {3}
63 * 59770: e3a02001 mov r2, #1 ; 0x1
64 * 59774: e0020261 and r0, r2, r1, ror #4
65 * 59778: e1a0f00e mov r15, r14
66 * 5977c: e3a00000 mov r0, #0 ; 0x0
67 * 59780: ee070f16 mcr 15, 0, r0, cr7, cr6, {0}
68 * 59784: e1a0f00e mov r15, r14
69 * 59788: e92d0300 push {r8, r9}
70 * 5978c: e3a00001 mov r0, #1 ; 0x1
71 * 59790: e59f83bc ldr r8, [pc, #956] ; 0x59b54
72 * 59794: e5880000 str r0, [r8]
73 * 59798: e3a0000a mov r0, #10 ; 0xa
74 * 5979c: e59f83b4 ldr r8, [pc, #948] ; 0x59b58
75 * 597a0: e5880000 str r0, [r8]
76 * 597a4: e3a00004 mov r0, #4 ; 0x4
77 * 597a8: e59f83ac ldr r8, [pc, #940] ; 0x59b5c
78 * 597ac: e5880000 str r0, [r8]
79 * 597b0: e59f93a8 ldr r9, [pc, #936] ; 0x59b60
80 * 597b4: e5990000 ldr r0, [r9]
81 * 597b8: e3800001 orr r0, r0, #1 ; 0x1
82 * 597bc: e59f839c ldr r8, [pc, #924] ; 0x59b60
83 * 597c0: e5880000 str r0, [r8]
84 * 597c4: eafffffe b 0x597c4
85 * 597c8: e92d4370 push {r4, r5, r6, r8, r9, r14}
86 * 597cc: e1a06000 mov r6, r0
87 * 597d0: e3a05000 mov r5, #0 ; 0x0
88 * 597d4: e5960000 ldr r0, [r6]
89 * 597d8: e5961004 ldr r1, [r6, #4]
90 * 597dc: e1500001 cmp r0, r1
91 * 597e0: 2a000006 bcs 0x59800
92 * 597e4: e5960000 ldr r0, [r6]
93 * 597e8: e5d05000 ldrb r5, [r0]
94 * 597ec: e5960000 ldr r0, [r6]
95 * 597f0: e2800001 add r0, r0, #1 ; 0x1
96 * 597f4: e5860000 str r0, [r6]
97 * 597f8: e1a00005 mov r0, r5
98 * 597fc: ea000001 b 0x59808
99 * 59800: ebffffe0 bl 0x59788
100 * 59804: e1a00005 mov r0, r5
101 * 59808: e8bd8370 pop {r4, r5, r6, r8, r9, r15}
102 * 5980c: e92d43f0 push {r4, r5, r6, r7, r8, r9, r14}
103 * 59810: e1a07000 mov r7, r0
104 * 59814: e1a06001 mov r6, r1
105 * 59818: e5961000 ldr r1, [r6]
106 * 5981c: e5962004 ldr r2, [r6, #4]
107 * 59820: e1510002 cmp r1, r2
108 * 59824: 2a000005 bcs 0x59840
109 * 59828: e5961000 ldr r1, [r6]
110 * 5982c: e5c17000 strb r7, [r1]
111 * 59830: e5961000 ldr r1, [r6]
112 * 59834: e2811001 add r1, r1, #1 ; 0x1
113 * 59838: e5861000 str r1, [r6]
114 * 5983c: ea000000 b 0x59844
115 * 59840: ebffffd0 bl 0x59788
116 * 59844: e8bd83f0 pop {r4, r5, r6, r7, r8, r9, r15}
117 * 59848: e92d4370 push {r4, r5, r6, r8, r9, r14}
118 * 5984c: e1a06000 mov r6, r0
119 * 59850: e5d61008 ldrb r1, [r6, #8]
120 * 59854: e3510080 cmp r1, #128 ; 0x80
121 * 59858: 1a000002 bne 0x59868
122 * 5985c: e1a00006 mov r0, r6
123 * 59860: ebffffd8 bl 0x597c8
124 * 59864: e5c60009 strb r0, [r6, #9]
125 * 59868: e5d61008 ldrb r1, [r6, #8]
126 * 5986c: e5d62009 ldrb r2, [r6, #9]
127 * 59870: e0011002 and r1, r1, r2
128 * 59874: e20110ff and r1, r1, #255 ; 0xff
129 * 59878: e1a05001 mov r5, r1
130 * 5987c: e5d61008 ldrb r1, [r6, #8]
131 * 59880: e1a010a1 lsr r1, r1, #1
132 * 59884: e5c61008 strb r1, [r6, #8]
133 * 59888: e5d61008 ldrb r1, [r6, #8]
134 * 5988c: e3510000 cmp r1, #0 ; 0x0
135 * 59890: 1a000001 bne 0x5989c
136 * 59894: e3a01080 mov r1, #128 ; 0x80
137 * 59898: e5c61008 strb r1, [r6, #8]
138 * 5989c: e3550000 cmp r5, #0 ; 0x0
139 * 598a0: 0a000001 beq 0x598ac
140 * 598a4: e3a00001 mov r0, #1 ; 0x1
141 * 598a8: ea000000 b 0x598b0
142 * 598ac: e3a00000 mov r0, #0 ; 0x0
143 * 598b0: e8bd8370 pop {r4, r5, r6, r8, r9, r15}
144 * 598b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, r10, r11, r14}
145 * 598b8: e1a0b000 mov r11, r0
146 * 598bc: e1a0a001 mov r10, r1
147 * 598c0: e24a1001 sub r1, r10, #1 ; 0x1
148 * 598c4: e3a02001 mov r2, #1 ; 0x1
149 * 598c8: e1a06112 lsl r6, r2, r1
150 * 598cc: e3a07000 mov r7, #0 ; 0x0
151 * 598d0: ea000015 b 0x5992c
152 * 598d4: e5db1008 ldrb r1, [r11, #8]
153 * 598d8: e3510080 cmp r1, #128 ; 0x80
154 * 598dc: 1a000003 bne 0x598f0
155 * 598e0: e1a0000b mov r0, r11
156 * 598e4: ebffffb7 bl 0x597c8
157 * 598e8: e1a01000 mov r1, r0
158 * 598ec: e5cb1009 strb r1, [r11, #9]
159 * 598f0: e5db1008 ldrb r1, [r11, #8]
160 * 598f4: e5db2009 ldrb r2, [r11, #9]
161 * 598f8: e0011002 and r1, r1, r2
162 * 598fc: e3510000 cmp r1, #0 ; 0x0
163 * 59900: 0a000000 beq 0x59908
164 * 59904: e1877006 orr r7, r7, r6
165 * 59908: e1a060a6 lsr r6, r6, #1
166 * 5990c: e5db2008 ldrb r2, [r11, #8]
167 * 59910: e1a020a2 lsr r2, r2, #1
168 * 59914: e5cb2008 strb r2, [r11, #8]
169 * 59918: e5db1008 ldrb r1, [r11, #8]
170 * 5991c: e3510000 cmp r1, #0 ; 0x0
171 * 59920: 1a000001 bne 0x5992c
172 * 59924: e3a01080 mov r1, #128 ; 0x80
173 * 59928: e5cb1008 strb r1, [r11, #8]
174 * 5992c: e3560000 cmp r6, #0 ; 0x0
175 * 59930: 1affffe7 bne 0x598d4
176 * 59934: e1a00007 mov r0, r7
177 * 59938: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, r10, r11, r15}
178 * 5993c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, r10, r11, r14}
179 * 59940: e24dd004 sub r13, r13, #4 ; 0x4
180 * 59944: e1a0a000 mov r10, r0
181 * 59948: e58d1000 str r1, [r13]
182 * 5994c: e3a05001 mov r5, #1 ; 0x1
183 * 59950: e1a0000a mov r0, r10
184 * 59954: ebffffbb bl 0x59848
185 * 59958: e1a02000 mov r2, r0
186 * 5995c: e3520000 cmp r2, #0 ; 0x0
187 * 59960: 0a00000f beq 0x599a4
188 * 59964: e1a0000a mov r0, r10
189 * 59968: e3a01008 mov r1, #8 ; 0x8
190 * 5996c: ebffffd0 bl 0x598b4
191 * 59970: e20020ff and r2, r0, #255 ; 0xff
192 * 59974: e1a04002 mov r4, r2
193 * 59978: e59d1000 ldr r1, [r13]
194 * 5997c: e1a00004 mov r0, r4
195 * 59980: ebffffa1 bl 0x5980c
196 * 59984: e59f21d8 ldr r2, [pc, #472] ; 0x59b64
197 * 59988: e0852002 add r2, r5, r2
198 * 5998c: e5c24000 strb r4, [r2]
199 * 59990: e2852001 add r2, r5, #1 ; 0x1
200 * 59994: e1a02b02 lsl r2, r2, #22
201 * 59998: e1a02b22 lsr r2, r2, #22
202 * 5999c: e1a05002 mov r5, r2
203 * 599a0: eaffffea b 0x59950
204 * 599a4: e1a0000a mov r0, r10
205 * 599a8: e3a0100a mov r1, #10 ; 0xa
206 * 599ac: ebffffc0 bl 0x598b4
207 * 599b0: e1a02000 mov r2, r0
208 * 599b4: e1a0b002 mov r11, r2
209 * 599b8: e35b0000 cmp r11, #0 ; 0x0
210 * 599bc: 0a00001b beq 0x59a30
211 * 599c0: e1a0000a mov r0, r10
212 * 599c4: e3a01004 mov r1, #4 ; 0x4
213 * 599c8: ebffffb9 bl 0x598b4
214 * 599cc: e1a02000 mov r2, r0
215 * 599d0: e1a07002 mov r7, r2
216 * 599d4: e2877001 add r7, r7, #1 ; 0x1
217 * 599d8: e3a06000 mov r6, #0 ; 0x0
218 * 599dc: ea000010 b 0x59a24
219 * 599e0: e086200b add r2, r6, r11
220 * 599e4: e1a02b02 lsl r2, r2, #22
221 * 599e8: e1a02b22 lsr r2, r2, #22
222 * 599ec: e59f3170 ldr r3, [pc, #368] ; 0x59b64
223 * 599f0: e0822003 add r2, r2, r3
224 * 599f4: e5d24000 ldrb r4, [r2]
225 * 599f8: e59d1000 ldr r1, [r13]
226 * 599fc: e1a00004 mov r0, r4
227 * 59a00: ebffff81 bl 0x5980c
228 * 59a04: e59f2158 ldr r2, [pc, #344] ; 0x59b64
229 * 59a08: e0852002 add r2, r5, r2
230 * 59a0c: e5c24000 strb r4, [r2]
231 * 59a10: e2852001 add r2, r5, #1 ; 0x1
232 * 59a14: e1a02b02 lsl r2, r2, #22
233 * 59a18: e1a02b22 lsr r2, r2, #22
234 * 59a1c: e1a05002 mov r5, r2
235 * 59a20: e2866001 add r6, r6, #1 ; 0x1
236 * 59a24: e1560007 cmp r6, r7
237 * 59a28: daffffec ble 0x599e0
238 * 59a2c: eaffffc7 b 0x59950
239 * 59a30: e28dd004 add r13, r13, #4 ; 0x4
240 * 59a34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, r10, r11, r15}
241 * 59a38: e92d4ff0 push {r4, r5, r6, r7, r8, r9, r10, r11, r14}
242 * 59a3c: e1a07000 mov r7, r0
243 * 59a40: e1a0a001 mov r10, r1
244 * 59a44: e1a0b002 mov r11, r2
245 * 59a48: ebfffeae bl 0x59508
246 * 59a4c: e3a03033 mov r3, #51 ; 0x33
247 * 59a50: e3a0203f mov r2, #63 ; 0x3f
248 * 59a54: e3a01000 mov r1, #0 ; 0x0
249 * 59a58: e3a00000 mov r0, #0 ; 0x0
250 * 59a5c: ebfffec5 bl 0x59578
251 * 59a60: e59f3100 ldr r3, [pc, #256] ; 0x59b68
252 * 59a64: e3a02033 mov r2, #51 ; 0x33
253 * 59a68: e3a01540 mov r1, #268435456 ; 0x10000000
254 * 59a6c: e3a00004 mov r0, #4 ; 0x4
255 * 59a70: ebfffec0 bl 0x59578
256 * 59a74: e59f30f0 ldr r3, [pc, #240] ; 0x59b6c
257 * 59a78: e3a0201b mov r2, #27 ; 0x1b
258 * 59a7c: e3a01550 mov r1, #335544320 ; 0x14000000
259 * 59a80: e3a00005 mov r0, #5 ; 0x5
260 * 59a84: ebfffebb bl 0x59578
261 * 59a88: e3a03033 mov r3, #51 ; 0x33
262 * 59a8c: e3a0203b mov r2, #59 ; 0x3b
263 * 59a90: e3a014c0 mov r1, #-1073741824 ; 0xc0000000
264 * 59a94: e3a00007 mov r0, #7 ; 0x7
265 * 59a98: ebfffeb6 bl 0x59578
266 * 59a9c: e59f00cc ldr r0, [pc, #204] ; 0x59b70
267 * 59aa0: ebfffeae bl 0x59560
268 * 59aa4: e59b5000 ldr r5, [r11]
269 * 59aa8: e59f20c4 ldr r2, [pc, #196] ; 0x59b74
270 * 59aac: e1550002 cmp r5, r2
271 * 59ab0: 0a000000 beq 0x59ab8
272 * 59ab4: ebffff33 bl 0x59788
273 * 59ab8: e28b3004 add r3, r11, #4 ; 0x4
274 * 59abc: e5935000 ldr r5, [r3]
275 * 59ac0: e0853007 add r3, r5, r7
276 * 59ac4: e153000a cmp r3, r10
277 * 59ac8: 3a000000 bcc 0x59ad0
278 * 59acc: ebffff2d bl 0x59788
279 * 59ad0: e28b2008 add r2, r11, #8 ; 0x8
280 * 59ad4: e59f809c ldr r8, [pc, #156] ; 0x59b78
281 * 59ad8: e5882000 str r2, [r8]
282 * 59adc: e085200b add r2, r5, r11
283 * 59ae0: e59f8090 ldr r8, [pc, #144] ; 0x59b78
284 * 59ae4: e5882004 str r2, [r8, #4]
285 * 59ae8: e3a02000 mov r2, #0 ; 0x0
286 * 59aec: e59f8084 ldr r8, [pc, #132] ; 0x59b78
287 * 59af0: e5c82009 strb r2, [r8, #9]
288 * 59af4: e3a02080 mov r2, #128 ; 0x80
289 * 59af8: e59f8078 ldr r8, [pc, #120] ; 0x59b78
290 * 59afc: e5c82008 strb r2, [r8, #8]
291 * 59b00: e59f8074 ldr r8, [pc, #116] ; 0x59b7c
292 * 59b04: e5887000 str r7, [r8]
293 * 59b08: e0853007 add r3, r5, r7
294 * 59b0c: e59f8068 ldr r8, [pc, #104] ; 0x59b7c
295 * 59b10: e5883004 str r3, [r8, #4]
296 * 59b14: e59f1060 ldr r1, [pc, #96] ; 0x59b7c
297 * 59b18: e59f0058 ldr r0, [pc, #88] ; 0x59b78
298 * 59b1c: ebffff86 bl 0x5993c
299 * 59b20: e2873020 add r3, r7, #32 ; 0x20
300 * 59b24: e5935000 ldr r5, [r3]
301 * 59b28: e59f2050 ldr r2, [pc, #80] ; 0x59b80
302 * 59b2c: e1a01005 mov r1, r5
303 * 59b30: e1a00007 mov r0, r7
304 * 59b34: ebfffed2 bl 0x59684
305 * 59b38: e1a01000 mov r1, r0
306 * 59b3c: e1a04001 mov r4, r1
307 * 59b40: e3540000 cmp r4, #0 ; 0x0
308 * 59b44: 0a000000 beq 0x59b4c
309 * 59b48: ebffff0e bl 0x59788
310 * 59b4c: ebfffe6d bl 0x59508
311 * 59b50: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, r10, r11, r15}
312 * 59b54: c00b003c andgt r0, r11, r12, lsr r0
313 * 59b58: c00b0038 andgt r0, r11, r8, lsr r0
314 * 59b5c: c00b0034 andgt r0, r11, r4, lsr r0
315 * 59b60: c00b0030 andgt r0, r11, r0, lsr r0
316 * 59b64: 14000418 strne r0, [r0], #-1048
317 * 59b68: 00000366 andeq r0, r0, r6, ror #6
318 * 59b6c: 00000733 andeq r0, r0, r3, lsr r7
319 * 59b70: 00001005 andeq r1, r0, r5
320 * 59b74: 6110beef tstvs r0, r15, ror #29 <- LZW Header...
321 * 59b78: 14000404 strne r0, [r0], #-1028
322 * 59b7c: 14000410 strne r0, [r0], #-1040
323 * 59b80: 46335053 undefined
324 */
Impressum, Datenschutz