WhyCan Forum(哇酷开发者社区)
• 板块
• 换一批
• 精华
• 首页
• 搜索
• 注册
• 登录
[必应] [ ] 搜索
您尚未登录。
• 主题: 活跃中 | 无回复
• 首页
• » 全志 SOC
• » 全志D1芯片之终极探索
页次: 1
分享链接 / 只看楼主
楼主 # 2021-05-23 10:37:28 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
全志D1芯片之终极探索
开这帖子,估计就是为了扒光这颗芯片的内裤。
先来点初步研究成果,这个芯片里面的RISCV核玄铁906只能算通房丫鬟,正室还是ARM,估
计是双核cortex-a7,当然还带有一个hifi dsp,这个是第三方的不公开,也不值得研究。
这个芯片算异构系统,总共4个核,2个cortex-a7(可能是一个,但一定存在),一个
riscv-64,一个dsp。
初步确认的马甲有,D1, T1033, R528-RV, ...
V, T, R, F系列都会有马甲,静候风暴吧,这是一个什么钱都能挣到的马甲,同志们,努
力研究吧,会有惊喜的。
离线
楼主 #1 2021-05-23 10:55:16 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
关于DSP,关注Tensilica 这家公司,应该会有答案
离线
楼主 #2 2021-05-23 11:20:46 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
cat /proc/cpuinfo
processor : 0
hart : 0
isa : rv64imafdcvu
mmu : sv39
RISCV核支持的扩展,以及mmu信息
离线
楼主 #3 2021-05-23 13:51:24 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
正室是可以被关禁闭的。
=> md.l 0x02001504 1
02001504: 80000000 ....
=> md.l 0x02001500 2
02001500: 00000300 80000000 ........
=> md.l 0x02001504 1
02001504: 80000000 ....
=> mw.l 0x02001504 0x000016aa
=> md.l 0x02001504 1
02001504: 00000000 ....
=>
02001508: 00000000 ....
=> md.l 0x02001504 1
02001504: 00000000 ....
=> md.l 0x02001504 1
02001504: 00000000 ....
离线
楼主 #4 2021-05-23 15:18:07 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
opensbi太恶心了,程序都不給跳转,一跳转就指令异常,直接干掉这个,影响我开发引导
程序
离线
楼主 #5 2021-05-23 15:21:00 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
修改boot0干掉opensbi,修改uboot,增加go指令,借助fastboot,顺利启动xboot
=> go 0x41000800
## Starting application at 0x41000800 ...
OOOO _ _
_ _ | |___ _____ _____ _| |_
\ \/ /| _ | _ | _ |_ _| (C) 2007-2021
) ( | |_| | |_| | |_| | | |____JIANJUN.JIANG__
/_/\_\|_____|_____|_____| |_____________________|
V3.0.0 (May 23 2021 - 15:15:37) - [nezha][Nezha Based On Allwinner D1 SOC]
[ 0.000000] Probe device 'blk-romdisk.0' with blk-romdisk
[ 0.000010] Probe device 'xin24m' with clk-fixed
[ 0.000020] Probe device 'xin10m' with clk-fixed
[ 0.000030] Probe device 'xin32k' with clk-fixed
[ 0.000040] Probe device 'uart0' with clk-link
[ 0.000050] Probe device 'uart1' with clk-link
[ 0.000060] Probe device 'uart2' with clk-link
[ 0.000070] Probe device 'uart3' with clk-link
[ 0.000080] Probe device 'uart4' with clk-link
[ 0.000090] Probe device 'uart5' with clk-link
[ 0.000100] Probe device 'uart-16550.0' with uart-16550
[ 0.000110] Probe device 'uart-16550.1' with uart-16550
[ 0.000120] Probe device 'uart-16550.2' with uart-16550
[ 0.000130] Probe device 'uart-16550.3' with uart-16550
[ 0.000140] Probe device 'uart-16550.4' with uart-16550
[ 0.000150] Probe device 'uart-16550.5' with uart-16550
[ 0.000160] Probe device 'console-uart.0' with console-uart
[ 0.000170] mount /private with 'ram' filesystem
Press any key to stop auto boot: 0.000
could not found 'launcher' command
xboot: /#
xboot: /#
xboot: /#
xboot: /# help
cat - show the contents of a file
cd - change the current working directory
clear - clear the terminal screen
cp - copy files and directories
date - print the system date and time
dcp - device copy for file or block or memory
delay - delay for a specified time
echo - echo the string to standard output
env - display environment variable
event - show all of input events
fdt - flattened device tree utility commands
go - start application at address
help - show online help about command
kill - kill the window task
ls - list directory contents
md - dump a memory region
mkdir - make directories
mkfat16 - format fat16 filesystem on block device
mkfat32 - format fat32 filesystem on block device
mkz - compress and encrypt and signature image
mount - mount a file system
mv - move (rename) files
mw - write values to memory region
overview - show overview application of xui
ps - report a snapshot of the current processes
pwd - print the current working directory
reboot - reboot the target system
rm - remove files or directories
rx - receive file using xmodem
setting - display the global setting
sha1sum - compute sha1 message digest
sha256sum - compute sha256 message digest
shutdown - shutdown the target system
sleep - sleep the target system
sx - send file using xmodem
sync - synchronize cached writes to storage
test - debug command for programmer
tree - list contents of directories in a tree-like format
umount - unmount a file system
version - show xboot version information
write - write contents to a file
xsync - xsync server for file copying
为了达成这一步,用了很多高级技巧,万事开头难。现在啥工具都缺。
离线
#6 2021-05-23 15:36:33 分享评论
Meekdai
会员
注册时间: 2021-04-30
已发帖子: 33
积分: 43
Re: 全志D1芯片之终极探索
XBOOT要上D1了~~
离线
#7 2021-05-23 15:41:12 分享评论
metro
会员
注册时间: 2019-03-09
已发帖子: 370
积分: 313
Re: 全志D1芯片之终极探索
搬个小板凳等楼主更新
离线
#8 2021-05-23 15:48:48 分享评论
mfkiwl
会员
注册时间: 2019-02-27
已发帖子: 47
积分: 24
Re: 全志D1芯片之终极探索
xboot 说:
关于DSP,关注Tensilica 这家公司,应该会有答案
HIFI DSP应该和其它家的差不多。不是3就是4了
离线
楼主 #9 2021-05-23 17:55:00 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
#define SID_PRCTL (IOMEM_ADDR(SUNXI_SID_BASE) + 0x40)
#define SID_PRKEY (IOMEM_ADDR(SUNXI_SID_BASE) + 0x50)
#define SID_RDKEY (IOMEM_ADDR(SUNXI_SID_BASE) + 0x60)
#define SJTAG_AT0 (IOMEM_ADDR(SUNXI_SID_BASE) + 0x80)
#define SJTAG_AT1 (IOMEM_ADDR(SUNXI_SID_BASE) + 0x84)
#define SJTAG_S (IOMEM_ADDR(SUNXI_SID_BASE) + 0x88)
#define SID_EFUSE (IOMEM_ADDR(SUNXI_SID_BASE) + 0x200)
#define SID_OP_LOCK (0xAC)
#define EFUSE_CHIPID (0x0)
#define EFUSE_ANTI_BRUSH (0x10)
#define EFUSE_OEM_PROGRAM (0x38)
#define ANTI_BRUSH_BIT_OFFSET (31)
#define ANTI_BRUSH_MODE (SID_EFUSE + EFUSE_ANTI_BRUSH)
/* write protect */
#define EFUSE_WRITE_PROTECT (0x40)
/* read protect */
#define EFUSE_READ_PROTECT (0x44)
/* jtag security */
#define EFUSE_HUK (0x50)
#define EFUSE_ROTPK (0x70)
#define EFUSE_SSK (0x90)
#define EFUSE_RSSK (0xB0)
#define EFUSE_HDCP_HASH (0xC0)
#define EFUSE_NV1 (0xD0)
#define EFUSE_NV2 (0xD4)
#define EFUSE_OEM_PROGRAM_SECURE (0xE4)
#define SID_HUK_SIZE (192)
#define SID_OEM_PROGRAM_SIZE (64)
#define SID_SSK_SIZE (256)
#define SID_RSSK_SIZE (128)
#define SID_HDCP_HASH_SIZE (128)
#define SID_OEM_PROGRAM_SECURE_SIZE (224)
/*read protect*/
#define SCC_OEM_PROGRAM_DONTSHOW_FLAG (4)
#define SCC_ROTPK_DONTSHOW_FLAG (12)
#define SCC_SSK_DONTSHOW_FLAG (13)
#define SCC_RSSK_DONTSHOW_FLAG (14)
#define SCC_HDCP_HASH_DONTSHOW_FLAG (15)
#define SCC_OEM_PROGRAM_SECURE_DONTSHOW_FLAG (18)
/*write protect*/
#define SCC_OEM_PROGRAM_BURNED_FLAG (4)
#define SCC_HUK_BURNED_FLAG (9)
#define SCC_ROTPK_BURNED_FLAG (12)
#define SCC_SSK_BURNED_FLAG (13)
#define SCC_RSSK_BURNED_FLAG (14)
#define SCC_HDCP_HASH_BURNED_FLAG (15)
#define SCC_OEM_PROGRAM_SECURE_BURNED_FLAG (18)
/*efuse power ctl*/
#define EFUSE_HV_SWITCH (IOMEM_ADDR(SUNXI_RTC_BASE) + 0x204)
整个秘密都在SID里,这是个比较有用的信息,现在xboot可以获取D1的唯一序列号。
xboot: /# cat sys/class/machine/nezha/uniqueid
92805000dc0048140141d5812c5a1b0b
离线
#10 2021-05-23 18:16:11 分享评论
拉轰的脚踏车
会员
注册时间: 2020-03-20
已发帖子: 277
积分: 211
Re: 全志D1芯片之终极探索
请问楼主, #5 楼怎么进入uboot命令模式? 按什么按键?
离线
楼主 #11 2021-05-23 19:43:06 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
拉轰的脚踏车说:
请问楼主, #5 楼怎么进入uboot命令模式? 按什么按键?
需要修改uboot的bootdelay
离线
楼主 #12 2021-05-23 19:45:04 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
实现reset驱动,gpio驱动,串口驱动,还有一堆工作要做,任重道远!
离线
#13 2021-05-24 11:37:40 分享评论
mango
会员
所在地:芒果派
注册时间: 2017-12-02
已发帖子: 731
积分: 707
个人网站
Re: 全志D1芯片之终极探索
加一条,D1对应F系的F133。
芯片内包的东西比较多(设计时并非只针对RV推出的芯片),所以D1的价格会比较尴尬。
离线
楼主 #14 2021-05-24 12:02:06 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
是的,无所不包,要什么有什么,算比较完美的芯片,当然晶圆面积也小不了哪里去,脚
越多的,全志定价肯定越贵,虽然是同一个东西。在满足要求的同时,尽量选脚少的。
离线
楼主 #15 2021-05-24 12:03:59 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
如果包DDR版本定价在4个美金左右,还是有杀伤力的。
离线
#16 2021-05-24 18:58:12 分享评论
Kirin
会员
注册时间: 2020-10-09
已发帖子: 25
积分: 24
Re: 全志D1芯片之终极探索
感谢楼主研究我们的芯片,很细致,点赞.jpg
但是这几个不是一个芯片,需要澄清一下,以免各位开发者选片的时候误导了,具体还请
咨询实际的商务和代理。
我大概说一下:D1——RISC-V片子; T1033——A7片子;R528-RV合作伙伴预研的时候拿到的测
试片,后面不会再有了
有些片子可能有共台的情况,但是不是一个片子啊,都是内部要生要死分几个项目做出来
的(泪目~
离线
楼主 #17 2021-05-24 20:30:06 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
@Kirin
马甲不马甲,我们也真没那么关心,比较关心的还是哪有卖更实惠的芯片,能让利消费者
,产品拥有成本优势,能在市场上拥有竞争力。这才是选择的出发点。你科技进步了,成
本得降,不然那算哪门子科技进步。
离线
#18 2021-05-25 00:57:51 分享评论
david
会员
注册时间: 2018-03-05
已发帖子: 202
积分: 171.5
Re: 全志D1芯片之终极探索
这芯片拿来做图像处理可以吗看里面hifi数字处理器像是搞音频的
离线
#19 2021-05-25 15:20:45 分享评论
jlau
会员
注册时间: 2018-06-11
已发帖子: 163
积分: 152.5
Re: 全志D1芯片之终极探索
xboot 说:
@Kirin
马甲不马甲,我们也真没那么关心,比较关心的还是哪有卖更实惠的芯片,能让利消
费者,产品拥有成本优势,能在市场上拥有竞争力。这才是选择的出发点。你科技进
步了,成本得降,不然那算哪门子科技进步。
话不能这么绝对,活在经济规律中,大家都要养家糊口的 big_smile
离线
#20 2021-05-25 20:36:22 分享评论
Kirin
会员
注册时间: 2020-10-09
已发帖子: 25
积分: 24
Re: 全志D1芯片之终极探索
xboot 说:
@Kirin
马甲不马甲,我们也真没那么关心,比较关心的还是哪有卖更实惠的芯片,能让利消
费者,产品拥有成本优势,能在市场上拥有竞争力。这才是选择的出发点。你科技进
步了,成本得降,不然那算哪门子科技进步。
收到,细心听取大家的建议(respect!
离线
#21 2021-05-25 21:55:56 分享评论
TeveT
会员
注册时间: 2019-07-01
已发帖子: 110
积分: 68
Re: 全志D1芯片之终极探索
前来膜拜大神
D1包了那么多东西,然而少了MIPI-CSI 和 H264编码,不然就齐活了
离线
楼主 #22 2021-05-26 12:13:21 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
工欲善其事,必先利其器,先开发个fel工具,名叫xfel
xfel-v1.0.0 https://github.com/xboot/xfel
usage:
xfel help - Print this usage summary
xfel version - Show brom version
xfel hexdump
- Dumps memory region in hex
xfel dump - Binary memory dump to stdout
xfel exec - Call function address
xfel read32 - Read 32-bits value from device memory
xfel write32 - Write 32-bits value to device memory
xfel read - Read memory to file
xfel write - Write file to memory
xfel reset - Reset device using watchdog
xfel sid - Output 128-bits SID information
xfel jtag - Enable JTAG debug
xfel ddr [type] - Initial DDR controller with optional type
xfel spinor - Detect spi nor flash
xfel spinor read - Read spi nor flash to file
xfel spinor write - Write file to spi nor flash
xfel spinand - Detect spi nand flash
xfel spinand read - Read spi nand flash to file
xfel spinand write - Write file to spi nand flash
离线
楼主 #23 2021-05-26 12:17:21 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
xfel项目工程路径,理论上全志全系列芯片都可以支持,不管是arm32,arm64,riscv64,
短期重点目标是riscv64的D1支持,设计时避免过多hack,增强适应性,最大的特色借用
xfel工具可以直接初始化DDR。
感兴趣的,可以尝尝鲜,开发中...
https://github.com/xboot/xfel
离线
#24 2021-05-26 14:55:23 分享评论
kakatoo
会员
注册时间: 2018-10-08
已发帖子: 69
积分: 51
Re: 全志D1芯片之终极探索
@Kirin
那D1里到底有木有A7呢?
离线
#25 2021-05-26 17:16:43 分享评论
金志工程师
会员
注册时间: 2020-05-16
已发帖子: 7
积分: 6.5
Re: 全志D1芯片之终极探索
kakatoo 说:
@Kirin
那D1里到底有木有A7呢?
存在,但是D1锁死,没得用arm的哦,你用不了
离线
楼主 #26 2021-05-26 18:13:22 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
d1-brom.zip
利用xfel工具dump出来的D1 brom,感兴趣的可以逆向看看
离线
楼主 #28 2021-05-27 23:58:28 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
一段代码来石锤正室的存在,cortex-a7,不要有任何怀疑。
/* a7:Reparent CPU during PLL CPU rate changes */
ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk,
&sun8iw20_cpu_nb);
/* riscv:Reparent CPU during PLL CPU rate changes */
ccu_mux_notifier_register(pll_cpux_clk.common.hw.clk,
&sun20iw1_cpu_nb);
离线
楼主 #29 2021-05-28 10:28:53 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
root@TinaLinux:/sys/kernel/debug/clk# cat clk_summary
enable prepare protect duty
clock count count count rate accuracy phase cycle
---------------------------------------------------------------------------------------------
ext-32k 1 1 0 32768 0 0 50000
ext32k-gate 1 1 0 32768 0 0 50000
osc32k 1 1 0 32768 0 0 50000
r-apb0-ir-rx 0 0 0 32768 0 0 50000
rtc-32k-fanout 0 0 0 32768 0 0 50000
rtc32k 1 1 0 32768 0 0 50000
rtc-1k 1 1 0 1024 0 0 50000
rc-16m 0 0 0 16000000 300000000 0 50000
iosc 0 0 0 16000000 300000000 0 50000
iosc-div32k 0 0 0 32000 300000000 0 50000
dcxo24M 6 6 0 24000000 0 0 50000
r-apb0 0 0 0 24000000 0 0 50000
r-apb0-cpucfg 0 0 0 24000000 0 0 50000
r-apb0-bus-ir-rx 0 0 0 24000000 0 0 50000
r-ppu 0 0 0 24000000 0 0 50000
r-apb0-twd 0 0 0 24000000 0 0 50000
r-apb0-timer 0 0 0 24000000 0 0 50000
r-ahb 2 2 0 24000000 0 0 50000
r-ahb-rtc 1 1 0 24000000 0 0 50000
rtc-spi 1 1 0 24000000 0 0 50000
fanout-24m 0 0 0 24000000 0 0 50000
tpadc 0 0 0 24000000 0 0 50000
csi0-mclk 0 0 0 24000000 0 0 50000
ledc 0 0 0 24000000 0 0 50000
tvd 0 0 0 24000000 0 0 50000
hdmi-24m 0 0 0 24000000 0 0 50000
ir-tx 0 0 0 24000000 0 0 50000
spi1 0 0 0 24000000 0 0 50000
mmc2 0 0 0 24000000 0 0 50000
mmc0 0 0 0 800000 0 0 50000
avs 0 0 0 24000000 0 0 50000
apb1 1 1 0 24000000 0 0 50000
bus-i2s2 0 0 0 24000000 0 0 50000
bus-i2s1 0 0 0 24000000 0 0 50000
bus-i2s0 0 0 0 24000000 0 0 50000
bus-can1 0 0 0 24000000 0 0 50000
bus-can0 0 0 0 24000000 0 0 50000
bus-i2c3 0 0 0 24000000 0 0 50000
bus-i2c2 0 0 0 24000000 0 0 50000
bus-i2c1 0 0 0 24000000 0 0 50000
bus-i2c0 0 0 0 24000000 0 0 50000
bus-uart5 0 0 0 24000000 0 0 50000
bus-uart4 0 0 0 24000000 0 0 50000
bus-uart3 0 0 0 24000000 0 0 50000
bus-uart2 0 0 0 24000000 0 0 50000
bus-uart1 0 0 0 24000000 0 0 50000
bus-uart0 1 1 0 24000000 0 0 50000
cpux 1 1 0 24000000 0 0 50000
apb 0 0 0 6000000 0 0 50000
axi 0 0 0 24000000 0 0 50000
pll-audio1 0 0 0 3072000000 0 0 50000
pll-audio1-div5 0 0 0 614400000 0 0 50000
pll-audio1-div2 0 0 0 1536000000 0 0 50000
pll-audio0-4x 0 0 0 49142857 0 0 50000
i2s2-asrc 0 0 0 49142857 0 0 50000
pll-audio0 0 0 0 12285714 0 0 50000
audio-codec-adc 0 0 0 12285714 0 0 50000
audio-codec-dac 0 0 0 12285714 0 0 50000
dmic 0 0 0 12285714 0 0 50000
spdif-tx 0 0 0 12285714 0 0 50000
i2s2 0 0 0 12285714 0 0 50000
i2s1 0 0 0 12285714 0 0 50000
i2s0 0 0 0 12285714 0 0 50000
pll-audio0-2x 0 0 0 24571428 0 0 50000
pll-ve 0 0 0 432000000 0 0 50000
ve 0 0 0 432000000 0 0 50000
pll-video1 0 0 0 297000000 0 0 50000
pll-video1-4x 0 0 0 1188000000 0 0 50000
tcon-tv 0 0 0 1188000000 0 0 50000
pll-video1-2x 0 0 0 594000000 0 0 50000
pll-video0 0 0 0 102000000 0 0 50000
fanout-27m 0 0 0 102000000 0 0 50000
tve 0 0 0 102000000 0 0 50000
pll-video0-4x 0 0 0 408000000 0 0 50000
tcon-lcd0 0 0 0 408000000 0 0 50000
pll-video0-2x 0 0 0 204000000 0 0 50000
mipi-dsi 0 0 0 204000000 0 0 50000
pll-periph0-parent 1 1 0 2400000000 0 0 50000
pll-periph0-800m 0 0 0 800000000 0 0 50000
pll-periph0-2x 3 3 0 1200000000 0 0 50000
mmc1 1 1 0 100000000 0 0 50000
fanout-32k 1 1 0 32768 0 0 50000
fanout2-out-clk 0 0 0 32768 0 0 50000
fanout1-out-clk 1 1 0 32768 0 0 50000
fanout0-out-clk 0 0 0 32768 0 0 50000
fanout-16m 0 0 0 16000000 0 0 50000
dsp 0 0 0 600000000 0 0 50000
csi-top 0 0 0 1200000000 0 0 50000
hdmi-cec-32k 0 0 0 32768 0 0 50000
hdmi-cec 0 0 0 32768 0 0 50000
ce 0 0 0 400000000 0 0 50000
g2d 0 0 0 1200000000 0 0 50000
di 0 0 0 1200000000 0 0 50000
de0 0 0 0 300000000 0 0 50000
pll-periph0-div3 0 0 0 200000000 0 0 50000
pll-periph0 4 4 0 600000000 0 0 50000
spi0 1 1 0 100000000 0 0 50000
fanout-25m 0 0 0 25000000 0 0 50000
spdif-rx 0 0 0 600000000 0 0 50000
emac0-25m 0 0 0 600000000 0 0 50000
apb0 3 3 0 100000000 0 0 50000
fanout-pclk 0 0 0 100000000 0 0 50000
bus-tzma 0 0 0 100000000 0 0 50000
bus-tpadc 0 0 0 100000000 0 0 50000
bus-audio-codec 0 0 0 100000000 0 0 50000
bus-dmic 0 0 0 100000000 0 0 50000
bus-spdif 0 0 0 100000000 0 0 50000
bus-ths 0 0 0 100000000 0 0 50000
bus-gpadc 0 0 0 100000000 0 0 50000
bus-ir-tx 0 0 0 100000000 0 0 50000
bus-iommu 1 1 0 100000000 0 0 50000
bus-pwm 1 1 0 100000000 0 0 50000
psi-ahb 6 6 0 200000000 0 0 50000
bus-riscv-cfg 0 0 0 200000000 0 0 50000
bus-dsp-cfg 0 0 0 200000000 0 0 50000
bus-csi 0 0 0 200000000 0 0 50000
bus-ledc 0 0 0 200000000 0 0 50000
bus-tvd-top 0 0 0 200000000 0 0 50000
bus-tvd 0 0 0 200000000 0 0 50000
bus-tve-top 0 0 0 200000000 0 0 50000
bus-tve 0 0 0 200000000 0 0 50000
bus-tcon-tv 0 0 0 200000000 0 0 50000
bus-tcon-lcd0 0 0 0 200000000 0 0 50000
bus-mipi-dsi 0 0 0 200000000 0 0 50000
bus-hdmi 0 0 0 200000000 0 0 50000
bus-dpss-top0 0 0 0 200000000 0 0 50000
bus-lradc 1 1 0 200000000 0 0 50000
bus-otg 1 1 0 200000000 0 0 50000
bus-ehci1 0 0 0 200000000 0 0 50000
bus-ehci0 0 0 0 200000000 0 0 50000
bus-ohci1 0 0 0 200000000 0 0 50000
bus-ohci0 0 0 0 200000000 0 0 50000
bus-emac0 0 0 0 200000000 0 0 50000
bus-spi1 0 0 0 200000000 0 0 50000
bus-spi0 1 1 0 200000000 0 0 50000
bus-mmc2 0 0 0 200000000 0 0 50000
bus-mmc1 1 1 0 200000000 0 0 50000
bus-mmc0 0 0 0 200000000 0 0 50000
bus-dram 1 1 0 200000000 0 0 50000
bus-dbg 0 0 0 200000000 0 0 50000
bus-hstimer 0 0 0 200000000 0 0 50000
bus-spinlock 0 0 0 200000000 0 0 50000
bus-msgbox2 0 0 0 200000000 0 0 50000
bus-msgbox1 0 0 0 200000000 0 0 50000
bus-msgbox0 0 0 0 200000000 0 0 50000
bus-dma 1 1 0 200000000 0 0 50000
bus-ve 0 0 0 200000000 0 0 50000
bus-ce 0 0 0 200000000 0 0 50000
bus-g2d 0 0 0 200000000 0 0 50000
bus-di 0 0 0 200000000 0 0 50000
bus-de0 0 0 0 200000000 0 0 50000
pll-ddr0 2 2 0 1584000000 0 0 50000
dram-clk 0 0 0 1584000000 0 0 50000
mbus 1 1 0 396000000 0 0 50000
mbus-g2d 0 0 0 396000000 0 0 50000
mbus-csi 0 0 0 396000000 0 0 50000
mbus-tvin 0 0 0 396000000 0 0 50000
mbus-ce 0 0 0 396000000 0 0 50000
mbus-ve 0 0 0 396000000 0 0 50000
mbus-dma 1 1 0 396000000 0 0 50000
pll-cpux 0 0 0 1008000000 0 0 50000
riscv 0 0 0 1008000000 0 0 50000
riscv-axi 0 0 0 504000000 0 0 50000
pll-cpux-div 0 0 0 1008000000 0 0 50000
osc12M 0 0 0 12000000 0 0 50000
fanout-12m 0 0 0 12000000 0 0 50000
usb-ohci1 0 0 0 12000000 0 0 50000
usb-ohci0 0 0 0 12000000 0 0 50000
dcxo24M-div32k 0 0 0 32768 0 0 50000
先dump整个时种,发现D1芯片里的PLL特别多,根本不是规格书里说的8个pll,而是至少有
10个
离线
#30 2021-05-28 14:58:49 分享评论
jlau
会员
注册时间: 2018-06-11
已发帖子: 163
积分: 152.5
Re: 全志D1芯片之终极探索
a7是d2, d3的吧
离线
楼主 #31 2021-05-28 18:38:11 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
实现中断驱动,定时器驱动
离线
楼主 #32 2021-05-28 19:59:40 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
D1内存带宽测试
xboot: /# wboxtest benchmark
[benchmark]-[memcmp]
Bandwidth: 117.588MB/s
[benchmark]-[memcpy]
Bandwidth: 1.200GB/s
[benchmark]-[memmove]
Bandwidth: 189.810MB/s
[benchmark]-[memset]
Bandwidth: 2.457GB/s
离线
楼主 #33 2021-05-30 09:19:06 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
d1spl.zip
一个小型spl测试镜像,可以通过xfel工具上传到sram,然后执行,并在串口输出相关
debug信息
xfel上传镜像到sram中并执行操作指令
sudo xfel write 0x20000 output/d1spl.bin;
sudo xfel exec 0x20000;
执行上述指令后,串口输出如下信息:
OK
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
这是彻底裸奔的第一步,下一步就可以初始化DDR了。
执行上述指令时,需要将D1置于fel模式,可以按着fel按键开机,就可以自动进入fel模式
,或者直接清空flash里面内容。
离线
#34 2021-05-30 10:33:24 分享评论
kekemuyu
会员
[1315]
注册时间: 2018-12-13
已发帖子: 754
积分: 690
Re: 全志D1芯片之终极探索
D1快被扒的裤衩都不剩了。。。
离线
楼主 #35 2021-05-30 10:38:54 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
玄铁扩展了指令集,一些有用的信息
http://crva.ict.ac.cn/crvs2020/index/slides/2-8.pdf
-MCFLAGS := -march=rv64imafdc -mabi=lp64d -mcmodel=medany
+MCFLAGS := -march=rv64gcvxthead -mabi=lp64d -mcmodel=medany
也不是非得用官方编译器,标准编译器也是可以正常工作的,只不过扩展指令就别指望能
用上了。
离线
楼主 #36 2021-05-30 12:13:56 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
已实现DDR初始化
DRAM only have internal ZQ!!
get_pmu_exist() = 4294967295
ddr_efuse_type: 0x0
[AUTO DEBUG] two rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 15
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
[AUTO DEBUG] rank 1 row = 15
[AUTO DEBUG] rank 1 bank = 8
[AUTO DEBUG] rank 1 page size = 2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: %s
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =1024 M
DRAM simple test OK.
ok 1024
OK
X
X
X
X
离线
楼主 #37 2021-05-30 20:26:21 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
XFEL已支持D1芯片的DDR初始化
仅需执行如下指令即可初始化DDR,支持DDR3以及LPDDR3的初始化。
sudo xfel ddr ddr3
xfel ddr ddr3 - Initial ddr controller with ddr3
xfel ddr lpddr3 - Initial ddr controller with lpddr3
执行这条指令后,串口会输出如下信息:
get_pmu_exist() = 4294967295
ddr_efuse_type: 0x0
[AUTO DEBUG] two rank and full DQ!
ddr_efuse_type: 0x0
[AUTO DEBUG] rank 0 row = 15
[AUTO DEBUG] rank 0 bank = 8
[AUTO DEBUG] rank 0 page size = 2 KB
[AUTO DEBUG] rank 1 row = 15
[AUTO DEBUG] rank 1 bank = 8
[AUTO DEBUG] rank 1 page size = 2 KB
rank1 config same as rank0
DRAM BOOT DRIVE INFO: %s
DRAM CLK = 792 MHz
DRAM Type = 3 (2:DDR2,3:DDR3)
DRAMC ZQ value: 0x7b7bfb
DRAM ODT value: 0x42.
ddr_efuse_type: 0x0
DRAM SIZE =1024 M
DRAM simple test OK.
有了xfel,裸奔已经没有任何难度了。
下面就看大家各显神通了。
离线
楼主 #38 2021-05-30 20:41:03 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
到这里,xboot就可以直接运行在ram中,无需uboot支持了
执行如下指令:
sudo xfel ddr ddr3
sudo xfel write 0x40000000 output/xboot.bin
sudo xfel exec 0x40000000
离线
楼主 #39 2021-05-31 19:16:07 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
去知乎开了个专栏,广而告之。
https://www.zhihu.com/column/c_1382754923101081600
离线
#40 2021-06-05 20:01:40 分享评论
拉轰的脚踏车
会员
注册时间: 2020-03-20
已发帖子: 277
积分: 211
Re: 全志D1芯片之终极探索
xboot 说:
cat /proc/cpuinfo
processor : 0
hart : 0
isa : rv64imafdcv[b]u[/b]
mmu : sv39
RISCV核支持的扩展,以及mmu信息
请问这个 U 是代表什么意思?
QQ图片20210605200120.png
离线
楼主 #41 2021-06-07 13:52:26 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
u可能是玄铁自己的扩展吧,具体是什么就不得而知了。在玄铁工具链里可以添加xthead标
志生成玄铁扩展的指令集。
-MCFLAGS := -march=rv64imafdc -mabi=lp64d -mcmodel=medany
+MCFLAGS := -march=rv64gcvxthead -mabi=lp64d -mcmodel=medany
离线
#42 2021-06-07 13:57:52 分享评论
cube
会员
注册时间: 2021-03-11
已发帖子: 188
积分: 112.5
Re: 全志D1芯片之终极探索
@xboot
请问xfel支持 spi nand/nor 读写了吗?
离线
楼主 #43 2021-06-07 17:27:36 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
spi nor及 spi nand的支持正在开发,计划先支持spi nor flash的烧写,spi nand的后延
,现在底层spi接口,已支持F1C100S,V3S, V831, H3这四个芯片,D1暂未实现,一切都会
有的,需要时间。。。
离线
楼主 #44 2021-06-07 18:08:10 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
XFEL工具,在理论上,全志全系列芯片都是可以支持的,因全志芯片太多,个人也不可能
拥有所有芯片的开发板,这里也只能借助大家的力量,欢迎大家踊跃pull request,以支
持更多的芯片。
这里说明一下,如何支持一款芯片,以A40I为例,首先,在chips目录下创建一个名为a40i
的文件,里面主要是实现struct chip_t这个结构,这些回调函数可以直接return 0,这个
代表某个具体的指令不支持而已,但读写sram等都是可以的,这个支持由fel协议来实现的
,具体的芯片不需做任何适配。
#include
static int chip_reset(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_sid(struct xfel_ctx_t * ctx, uint32_t * sid)
{
return 0;
}
static int chip_jtag(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_ddr(struct xfel_ctx_t * ctx, const char * type)
{
return 0;
}
static int chip_spi_init(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_spi_exit(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_spi_select(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_spi_deselect(struct xfel_ctx_t * ctx)
{
return 0;
}
static int chip_spi_xfer(struct xfel_ctx_t * ctx, void * txbuf, uint32_t txlen, void * rxbuf, uint32_t rxlen)
{
return 0;
}
struct chip_t a40i = {
.name = "A40I",
.id = 0x00170100,
.reset = chip_reset,
.sid = chip_sid,
.jtag = chip_jtag,
.ddr = chip_ddr,
.spi_init = chip_spi_init,
.spi_exit = chip_spi_exit,
.spi_select = chip_spi_select,
.spi_deselect = chip_spi_deselect,
.spi_xfer = chip_spi_xfer,
};
添加了a40i这个文件后,别忘记将这个加入到支持的芯片列表里,加入时按名字排序即可
extern struct chip_t a40i;
extern struct chip_t d1;
extern struct chip_t f1c100s;
extern struct chip_t h3;
extern struct chip_t r329;
extern struct chip_t t507;
extern struct chip_t v3s;
extern struct chip_t v831;
static struct chip_t * chips[] = {
&a40i,
&d1,
&f1c100s,
&h3,
&r329,
&t507,
&v3s,
&v831,
};
这样提交后,xfel就支持了一款全志的新芯片了,当然很多高阶功能都是赞未实现的,这
个也无关仅要,慢慢完善就可以了。
这里有个最关键的ID信息,需要填准确,这个获取很容易,将你的板子上电并进入芯片的
fel模式,然后执行如下指令
sudo xfel version
此时终端会反馈一串芯片信息,其中的soc字段就是芯片的id,十六进制方式表达。
AWUSBFEX soc=0x00170100(A40I) 0x00000001 ver=0x0001 0x44 0x08 scratchpad=0x00007e00
支持一个新芯片是不是很简单呢,如果你手上有xfel还未支持的芯片,不妨按这个流程操
作下,并pull request,争取能将xfel变成全志芯片裸机开发的瑞士军刀。
离线
楼主 #45 2021-06-13 01:42:53 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
重新架构xfel工具的spi接口,采用命令队列方式,现在写入速度正常了,由原先的1.7KB/
S提升到80KB/S,基本达到实用的程度了。
100% [================================================] 1049 kB, 81.0 kB/s
100% [================================================] 1049 kB, 184.4 kB/s
上面是的V831 spi nor flash的写入速度,下面是读速度。
离线
楼主 #46 2021-06-14 00:08:45 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
xfel现已支持D1芯片SPI NOR FLASH的读写
100% [================================================] 1049 kB, 108.8 kB/s
100% [================================================] 1049 kB, 383.4 kB/s
上面是SPI NOR FLASH写入速度,下面是读速度。
离线
楼主 #47 2021-06-15 09:27:29 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
现在xfel已支持F1C100S,V3S, V831, H3,D1这5个芯片的nor flash烧写,linux版就直接
下载源码,自己编译就行,windows版工具,可以直接下载晕哥的,https://whycan.com/
viewtopic.php?pid=64570#p64570
对于全志全系列芯片支持,这个还得靠大家一起努力,欢迎pull request,看到哪里缺了
,手上又有现成开发板就顺手支持下,添加芯片的支持参考上面的帖子。为了提升烧录速
度,接口有些变化,但大同小异,照着抄,就行了。
sunxi-fel工具至少是无法同时支持V3S以及F1C100S这两个芯片,这一点xfel做到了,而且
还能支持RISCV平台,所以全系列芯片的支持,是完全可能的。
最近编辑记录 xboot (2021-06-15 09:29:39)
离线
楼主 #48 2021-06-17 13:07:26 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
现在XBOOT已实现D1芯片的SPI FLASH自举引导,因为采用了内嵌机器码方案,所以就完全
可以摒弃玄铁的专用工具链,任何一个RISCV工具链,都是可以编译并正常运行的,(可能
玄铁编出来的性能更强吧,未测试)其中DDR初始化因为官方仅释放出一个玄铁工具链反编
译出来.S文件,而且这个DDR初始化代码无法做到位置无关,所以,还是用上了之前解决
V831 DDR初始化的思路,直接构造闭源二进制运行环境。引导头的校验和运算,还沿用全
志传统的计算方法,所以,mksunxi工具可以无需做任何修改,直接利用就行。
还有一个异常,关于自拷贝的,这个地方被RISCV编译器给坑了,一开始还以为自己哪里代
码写出异常了,查了半天,最后是因为RISCV编译器在链接,链接脚本中的导出符号时,会
采用相对指令,而sys_copyself函数运行时,一般情况都不是运行在链接地址,任何地址
都需要能正确运行,也就是需要实现成位置无关的程序,但我要自拷贝的目的地址则必须
绝对的,不能是相对的,不然就拷贝错了。
这个用C如何获取链接脚本的绝对地址,我现在还没有很好手段,所以先暂时硬编码了,补
丁如下:
diff --git a/src/arch/riscv64/mach-d1/sys-copyself.c b/src/arch/riscv64/mach-d1/sys-copyself.c
index 79ec9e9973381d3d01c0d0ee85b24c91e23aff8e..88fd32274f970afe939463b3ccbc6f8d3845eb09 100644
--- a/src/arch/riscv64/mach-d1/sys-copyself.c
+++ b/src/arch/riscv64/mach-d1/sys-copyself.c
@@ -53,7 +53,7 @@ void sys_copyself(void)
if(d == BOOT_DEVICE_SPINOR)
{
- mem = (void *)__image_start;
+ mem = (void *)0x40000000;
size = __image_end - __image_start;
sys_spinor_init();
不知在RISCV平台用C来获取链接脚本的绝对位置,如果有发现其他方法,不妨回复下,用C
来控制RISCV编译器感觉还是比较困难的。
最近编辑记录 xboot (2021-06-17 13:11:22)
离线
#49 2021-06-17 14:14:19 分享评论
cube
会员
注册时间: 2021-03-11
已发帖子: 188
积分: 112.5
Re: 全志D1芯片之终极探索
@xboot
既然.c不能实现绝对地址编码,
那 .S 的 copyself 能不能实现呢?
离线
楼主 #50 2021-06-17 14:46:51 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
汇编是可以的,start.S里就有获取绝对链接地址的方式,但是,是开辟了一个存储空间来
存储链接地址的,想获取时,通过相对指令访问这片存储空间,然后获取里面的值,算间
接获取,汇编的控制能力,肯定要比C强很多。
/* Copyself to link address */
la t0, _start
la t1, _image_start
LREG t1, (t1)
...
/*
* The location of section
*/
.align 3
_image_start:
RVPTR __image_start
_image_end:
RVPTR __image_end
离线
#51 2021-06-17 14:52:46 分享评论
cube
会员
注册时间: 2021-03-11
已发帖子: 188
积分: 112.5
Re: 全志D1芯片之终极探索
那可以通过汇编把 __image_start 当参数传递给C函数实现曲线救国吗?
离线
楼主 #52 2021-06-17 14:59:11 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
也可以将_image_start变成全局标识,然后C里面去访问这个地址,再获取里面的值,就是
觉得这样干,太不优雅了,总觉得很怪异。RISCV C编译器搞得这么绝吗?没留任何一种获
取绝对链接地址的方式?
离线
#53 2021-06-17 15:06:58 分享评论
cube
会员
注册时间: 2021-03-11
已发帖子: 188
积分: 112.5
Re: 全志D1芯片之终极探索
xboot 说:
也可以将_image_start变成全局标识,然后C里面去访问这个地址,再获取里面的值,
就是觉得这样干,太不优雅了,总觉得很怪异。RISCV C编译器搞得这么绝吗?没留任
何一种获取绝对链接地址的方式?
喔,原来如此,感谢大佬解惑。
离线
楼主 #54 2021-06-17 15:22:46 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
头大,下面这样一条简单的赋值语句,也可能会被编译成auipc这种指令,也就说,这个代
码如果不在链接地址运行赋值,那么赋值出来的结果一定是不正确的。这个问题太严重了
,必须要找到一种控制方式,不然,在RISCV平台,根本无法写出适应性强的代码。
struct ddr3_param_t * p = (struct ddr3_param_t *)0x00030018;
/* p->dram_clk = 792;
p->dram_type = 3;
p->dram_zq = 0x7b7bfb;
p->dram_odt_en = 0x01;
p->dram_para1 = 0x000010d2;
p->dram_para2 = 0x0000;
p->dram_mr0 = 0x1c70;
p->dram_mr1 = 0x042;
p->dram_mr2 = 0x18;
p->dram_mr3 = 0x0;
p->dram_tpr0 = 0x004A2195;
p->dram_tpr1 = 0x02423190;
p->dram_tpr2 = 0x0008B061;
p->dram_tpr3 = 0xB4787896;
p->dram_tpr4 = 0x0;
p->dram_tpr5 = 0x48484848;
p->dram_tpr6 = 0x00000048;
p->dram_tpr7 = 0x1620121e;
p->dram_tpr8 = 0x0;
p->dram_tpr9 = 0x0;
p->dram_tpr10 = 0x0;
p->dram_tpr11 = 0x00870000;
p->dram_tpr12 = 0x00000024;
p->dram_tpr13 = 0x34050100;*/
离线
楼主 #55 2021-06-17 15:29:22 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
上面的赋值语句,随便组合下,完全看编译器的心情,心情好了就li直接立即数解决,心
情不好了就上auipc指令,完全不受控。这情况谁能用C写出位置无关的代码?
离线
楼主 #56 2021-06-17 16:22:54 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
使用medlow代码模型,链接脚本里的地址就可以直接引用了
为什么RISC-V GCC (Linux)默认使用medlow代码模型
RISC-V现在有两个代码模型:medlow和medany。
medlow: 对全局数据的寻址使用lui/ld的指令组合,程序被限制在[-2GB,2GB]内的连续2GB虚拟地址空间范围。
medany: 对全局数据的寻址使用auipc/ld指令码组合,程序被限制在任意连续的2GB虚拟地址空间范围。
在这两种代码模型中,lui和auipc都是为了设置全局数据的[31:8]位的20位高址。 在medlow模型中,由于lui/ld的指令组合使用0x00000000为基址做32比特地址寻址,当局部出现的多个全局数据寻址,他们可共享同一个lui设定的高址。 在medany模型中,lui被替换为auipc,使用pc为基址。由于所有的全局寻址为基于pc的相对寻址,medany代码模型可以支持对任意地址空间的寻址,突破medlow的地址空间限制。 同时,medany可以支持加载时地址重定向,即地址无关代码(position independent code, PIC)的生成。
在Linux环境中,所有的程序都是运行在虚拟内存中,独占一个虚拟内存空间。当不需要加载时地址重定向的需求时(非动态加载库), 使用medlow的lui/ld组合,GCC能够生成性能较优的代码,因而Linux上的RISC-V GCC默认使用medlow代码模型。 在编译动态加载库时,则需要手动使用medany代码模型。
为什么medany生成的代码性能比medlow差一些呢? 由于pc不是一个常量,对局部的多个全局数据寻址共享同一个auipc设定的高址可能会造成错误。 所以auipc/ld的指令组合并不能很好地被GCC优化,会产生大量的auipc指令。 此外,现有GCC编译器在-O -mcmodel=medany -mexplicit-relocs的参数组合下甚至会生成错误的代码。 在没有必要时,应当使用medlow模型,如果需要生成可重定向代码,现在暂时不要使用-O -mcmodel=medany -mexplicit-relocs的参数组合。
离线
楼主 #57 2021-06-19 20:00:29 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
为方便大家研究全志RISCV D1芯片,花了点时间编写了一个精简版的裸机程序,方便大家
学习参考。
https://whycan.com/t_6683.html
离线
#58 2021-06-21 09:27:46 分享评论
abnerl
会员
注册时间: 2020-06-09
已发帖子: 22
积分: 9.5
Re: 全志D1芯片之终极探索
这个A7存在是干什么的了,玄铁号称很厉害,跟A5X或7X比怎么样
离线
楼主 #59 2021-06-21 14:49:44 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
A7是正宫,别忽略她就行,玄铁性能未测试,A72这种水平肯定达不到的,A53估计有可能
离线
#60 2021-07-21 21:20:10 分享评论
微凉VeiLiang
会员
[1217]
所在地:深圳
注册时间: 2018-10-28
已发帖子: 562
积分: 501
个人网站
Re: 全志D1芯片之终极探索
xboot 说:
A7是正宫,别忽略她就行,玄铁性能未测试,A72这种水平肯定达不到的,A53估计有
可能
玄铁这么厉害的么,还以为是A7 A9的性能呢。那有点意思
离线
楼主 #61 2021-08-20 14:28:46 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
贴一下D1 BROM相关逆向信息
代码段,数据段,地址
0x00000000 text
0x0000e3f0 data
符号表
0x00000022 fel_entry
0x00000028 normal_entry
0x0000010e sram_clear_stack
0x00000126 prcm_enable_rtc_clocks
0x00000166 debug_state_init
0x000001b4 boot_jump
0x000001bc FUN_000001bc
0x0000020e FUN_0000020e
0x0000026a FUN_0000026a
0x000002c6 FUN_000002c6
0x0000034e FUN_0000034e
0x0000047e FUN_0000047e
0x00000536 FUN_00000536
0x0000056a FUN_0000056a
0x000005e6 FUN_000005e6
0x00000660 FUN_00000660
0x00000a68 FUN_00000a68
0x00000afa FUN_00000afa
0x00000bbe FUN_00000bbe
0x00000c4c FUN_00000c4c
0x00000cce sunxi_sha_calc
0x00000f2c FUN_00000f2c
0x0000124a FUN_0000124a
0x00001396 FUN_00001396
0x00001424 FUN_00001424
0x0000150a FUN_0000150a
0x00001598 FUN_00001598
0x0000161e FUN_0000161e
0x00001772 FUN_00001772
0x0000199e FUN_0000199e
0x00001c3e FUN_00001c3e
0x00001cb4 FUN_00001cb4
0x00001e12 FUN_00001e12
0x00001f22 FUN_00001f22
0x000020ae FUN_000020ae
0x00002124 FUN_00002124
0x00002152 FUN_00002152
0x000021a8 ALIGN
0x000021f0 FUN_000021f0
0x00002256 FUN_00002256
0x0000239e FUN_0000239e
0x00002464 FUN_00002464
0x0000256e FUN_0000256e
0x00002742 FUN_00002742
0x0000279e FUN_0000279e
0x00002840 FUN_00002840
0x000028e0 FUN_000028e0
0x00002952 boot_verify_image
0x00002b68 boot_from_sdc0
0x00002bbc boot_from_sdc2
0x00002c88 FUN_00002c88
0x00002cdc FUN_00002cdc
0x00002d42 try_boot_process
0x00002e16 sid_boot_process
0x00002f16 gpio_boot_process
0x0000306c normal_boot_process
0x000030de attempt_fast_boot
0x00003226 maybe_attempt_fast_boot
0x00003284 normal_boot
0x00003320 trap_vector
0x000033c2 FUN_000033c2
0x00003462 FUN_00003462
0x000034ca FUN_000034ca
0x00003514 FUN_00003514
0x000035c4 FUN_000035c4
0x00003824 FUN_00003824
0x00003b08 memset
0x00003b44 load_boot0_from_sd
0x00003eaa boot_from_sd
0x00003f82 boot_from_emmc
0x00004208 FUN_00004208
0x00004238 FUN_00004238
0x00004264 FUN_00004264
0x000043e2 FUN_000043e2
0x000044d8 FUN_000044d8
0x00004596 FUN_00004596
0x0000463e FUN_0000463e
0x000048dc FUN_000048dc
0x00004924 FUN_00004924
0x000049aa FUN_000049aa
0x00004be4 FUN_00004be4
0x00004d1e FUN_00004d1e
0x00005064 FUN_00005064
0x000057c0 FUN_000057c0
0x00005858 FUN_00005858
0x0000588e FUN_0000588e
0x0000593a FUN_0000593a
0x00005984 FUN_00005984
0x000059d0 FUN_000059d0
0x00005a22 FUN_00005a22
0x00005b68 FUN_00005b68
0x00005cc4 FUN_00005cc4
0x00005d2c FUN_00005d2c
0x00005dc4 FUN_00005dc4
0x00005e22 FUN_00005e22
0x0000602c FUN_0000602c
0x0000608e FUN_0000608e
0x000060bc FUN_000060bc
0x000065ee FUN_000065ee
0x00006680 FUN_00006680
0x00006778 sd_read_sectors
0x00006846 FUN_00006846
0x0000694e FUN_0000694e
0x00006a2e FUN_00006a2e
0x00006ab0 FUN_00006ab0
0x00006b48 FUN_00006b48
0x00006b74 FUN_00006b74
0x00006bc0 FUN_00006bc0
0x00006c0c FUN_00006c0c
0x00006cec FUN_00006cec
0x00006d34 FUN_00006d34
0x00006d7c FUN_00006d7c
0x00006e0c FUN_00006e0c
0x00006e44 FUN_00006e44
0x00006ea0 FUN_00006ea0
0x00006edc FUN_00006edc
0x00006fd0 FUN_00006fd0
0x00007078 FUN_00007078
0x000070de FUN_000070de
0x00007146 FUN_00007146
0x000071b6 FUN_000071b6
0x00007554 FUN_00007554
0x00007590 FUN_00007590
0x00007688 FUN_00007688
0x000076c2 FUN_000076c2
0x000078fc FUN_000078fc
0x00007916 FUN_00007916
0x00007ad4 FUN_00007ad4
0x00007d1c FUN_00007d1c
0x00007d66 sid_readl
0x00007d96 FUN_00007d96
0x00007dba sid_init_brom_config
0x00007e14 sid_get_boot_mode
0x00007e44 brom_config_bit_2
0x00007e74 brom_config_skip_cache_setup
0x00007ea4 brom_config_bit_4
0x00007ec6 brom_config_bit_5
0x00007ef8 brom_config_bit_7_switch
0x00007f4c brom_config_bit_6
0x00007f70 FUN_00007f70
0x00007f80 brom_config_bit_13
0x00007fa6 brom_config_lower_ce_freq
0x00007fcc brom_config_disable_fel
0x00007ff0 FUN_00007ff0
0x00008000 brom_config_bit_10
0x00008024 brom_config_bit_15
0x0000804a brom_config_bit_8
0x0000806e brom_config_bit_1
0x00008090 brom_config_bit_12
0x000080b6 sid_get_boot_device
0x00008244 debug_state_save
0x00008388 debug_select_word
0x00008428 rtc_brom_debug
0x00008612 boot0_check_magic
0x000086b6 FUN_000086b6
0x000088c8 FUN_000088c8
0x00008942 FUN_00008942
0x00008a52 FUN_00008a52
0x00008a9a ccu_enable_pll_lock
0x00008b66 ccu_disable_pll_lock_output
0x00008ba4 ccu_enable_pll_output
0x00008be0 ccu_enable_pll_ldo
0x00008c26 ccu_enable_pll_cpux
0x00008cee FUN_00008cee
0x00008dce FUN_00008dce
0x00008ea2 FUN_00008ea2
0x00008f32 FUN_00008f32
0x00008fd8 FUN_00008fd8
0x00009068 ccu_set_cpux_to_24_MHz
0x000090dc ccu_set_psi_to_24_MHz
0x00009152 ccu_set_apb_to_24_MHz
0x00009228 ccu_set_ce_to_hosc
0x000092c8 FUN_000092c8
0x0000931e FUN_0000931e
0x00009418 FUN_00009418
0x0000947c ccu_reset_mbus_dram
0x000094b4 ccu_set_ce_reset
0x00009516 ccu_set_ce_gating
0x0000956c ccu_set_ce_to_pll
0x00009668 ccu_set_ce_clocks
0x000096fa ccu_init_cpu_ce_clocks
0x0000977c set_audio_codec_gating_bias
0x00009816 set_bg_trim_voltage
0x00009860 sid_read_voltages_0x14
0x000098b2 sid_read_voltage_0x1c
0x000098de prcm_set_gpu_pwroff_gating
0x00009916 prcm_set_ldo_voltage_bias
0x0000996c rtc_enable_hosc_iosc
0x000099c0 ccu_init_bus_clocks
0x000099e6 ccu_init
0x00009a00 debug_syscon
0x00009a48 rtc_get_fast_boot_status
0x00009a6c FUN_00009a6c
0x00009ac6 gpio_enable_jtag_pf
0x00009b1e riscv_init_caches
0x00009b4a fel_boot
0x00009ba4 boot_finish
0x00009bda trap_handler
0x00009c3c FUN_00009c3c
0x00009d08 FUN_00009d08
0x00009d30 FUN_00009d30
0x00009d88 FUN_00009d88
0x00009e8a memcpy
0x00009eea memset
0x00009f3a FUN_00009f3a
0x00009f6c FUN_00009f6c
0x0000a066 memset
0x0000a0a2 FUN_0000a0a2
0x0000a108 strncmp
0x0000a17e rdtime
0x0000a184 udelay
0x0000a1ae udelay_x800
0x0000a1d8 FUN_0000a1d8
0x0000a1e6 FUN_0000a1e6
0x0000a1f4 FUN_0000a1f4
0x0000a244 FUN_0000a244
0x0000a278 FUN_0000a278
0x0000a2c2 FUN_0000a2c2
0x0000a352 FUN_0000a352
0x0000a3e2 FUN_0000a3e2
0x0000a44c FUN_0000a44c
0x0000a4ea FUN_0000a4ea
0x0000a548 FUN_0000a548
0x0000a56e FUN_0000a56e
0x0000a5ca FUN_0000a5ca
0x0000a652 FUN_0000a652
0x0000a6ee FUN_0000a6ee
0x0000a73c FUN_0000a73c
0x0000a78e FUN_0000a78e
0x0000a7f6 do_fel_write
0x0000a93a do_fel_read
0x0000a9fa FUN_0000a9fa
0x0000aa4e FUN_0000aa4e
0x0000aab6 FUN_0000aab6
0x0000ab08 FUN_0000ab08
0x0000ad66 FUN_0000ad66
0x0000addc FUN_0000addc
0x0000ae64 usb_irq_handler
0x0000ae80 FUN_0000ae80
0x0000aedc FUN_0000aedc
0x0000afa2 FUN_0000afa2
0x0000afd6 interrupt_handler
0x0000b026 FUN_0000b026
0x0000b058 FUN_0000b058
0x0000b07c disable_interrupts
0x0000b09a enable_interrupts
0x0000b0b8 clear_interrupts
0x0000b0cc FUN_0000b0cc
0x0000b0f0 FUN_0000b0f0
0x0000b10e FUN_0000b10e
0x0000b1ac FUN_0000b1ac
0x0000b212 FUN_0000b212
0x0000b278 FUN_0000b278
0x0000b2c6 FUN_0000b2c6
0x0000b316 FUN_0000b316
0x0000b346 FUN_0000b346
0x0000b394 FUN_0000b394
0x0000b3e4 FUN_0000b3e4
0x0000b414 FUN_0000b414
0x0000b524 FUN_0000b524
0x0000b580 FUN_0000b580
0x0000b5d6 FUN_0000b5d6
0x0000b62c FUN_0000b62c
0x0000b682 FUN_0000b682
0x0000b6be FUN_0000b6be
0x0000b70c FUN_0000b70c
0x0000b746 FUN_0000b746
0x0000b7ba FUN_0000b7ba
0x0000b83a FUN_0000b83a
0x0000b876 FUN_0000b876
0x0000b8c4 FUN_0000b8c4
0x0000b908 FUN_0000b908
0x0000ba36 FUN_0000ba36
0x0000ba8a FUN_0000ba8a
0x0000bb68 FUN_0000bb68
0x0000bb76 FUN_0000bb76
0x0000bbb0 FUN_0000bbb0
0x0000bbea FUN_0000bbea
0x0000bc24 FUN_0000bc24
0x0000bc6c FUN_0000bc6c
0x0000bcb4 FUN_0000bcb4
0x0000bcfc FUN_0000bcfc
0x0000bd28 FUN_0000bd28
0x0000bd68 FUN_0000bd68
0x0000be18 FUN_0000be18
0x0000bff4 FUN_0000bff4
0x0000c140 FUN_0000c140
0x0000c3a2 FUN_0000c3a2
0x0000c60c FUN_0000c60c
0x0000c640 FUN_0000c640
0x0000c66a FUN_0000c66a
0x0000c786 FUN_0000c786
0x0000c7ba FUN_0000c7ba
0x0000c884 FUN_0000c884
0x0000cbba FUN_0000cbba
0x0000ccd4 FUN_0000ccd4
0x0000cea6 FUN_0000cea6
0x0000d08e fel_irq_handler
0x0000d3c0 FUN_0000d3c0
0x0000d3e2 FUN_0000d3e2
0x0000d488 fel_main
0x0000d69e FUN_0000d69e
0x0000d712 FUN_0000d712
0x0000d796 FUN_0000d796
0x0000d83c FUN_0000d83c
0x0000da38 FUN_0000da38
0x0000dbc6 FUN_0000dbc6
0x0000dc6c FUN_0000dc6c
0x0000dd08 FUN_0000dd08
0x0000dd5e FUN_0000dd5e
0x0000dec0 FUN_0000dec0
0x0000df16 FUN_0000df16
0x0000e112 usb_bgr_disable
0x0000e152 usb_bgr_enable
0x0000e1ca usb_phy_disable
0x0000e208 usb_clk_phy_enable
0x0000e282 FUN_0000e282
0x0000e2f8 usb_init
0x0000e31a syscon_read_fel_button
0x0000e396 gpio_get_boot_device
离线
楼主 #62 2021-08-20 14:30:27 分享评论
xboot
会员
注册时间: 2019-10-15
已发帖子: 469
积分: 304
Re: 全志D1芯片之终极探索
sun20iw1p1/rvbrom/blob.elf: 文件格式 elf64-littleriscv
Disassembly of section .0x0000000000000000:
0000000000000000 :
0: 4281 li t0,0
2: 4301 li t1,0
4: 4381 li t2,0
6: 4e01 li t3,0
8: 4e81 li t4,0
a: 4f01 li t5,0
c: 4f81 li t6,0
e: 4401 li s0,0
10: 4481 li s1,0
12: 4181 li gp,0
14: 4201 li tp,0
16: 4101 li sp,0
18: 4501 li a0,0
1a: 4581 li a1,0
1c: 4601 li a2,0
1e: a029 j 28
20: a009 j 22
0000000000000022 :
22: 05c00493 li s1,92
26: a82d j 60
0000000000000028 :
28: 0fe000ef jal ra,126
2c: 13a000ef jal ra,166
30: a801 j 40
32: 070002b7 lui t0,0x7000
36: 5e02829b addiw t0,t0,1504
3a: 0002e303 lwu t1,0(t0) # 7000000
3e: 8302 jr t1
40: 070002b7 lui t0,0x7000
44: 5dc2829b addiw t0,t0,1500
48: 0003f337 lui t1,0x3f
4c: 9413031b addiw t1,t1,-1727
50: 00e31313 slli t1,t1,0xe
54: 92f30313 addi t1,t1,-1745 # 3e92f
58: 0002e383 lwu t2,0(t0) # 7000000
5c: fc730be3 beq t1,t2,32
60: 00400337 lui t1,0x400
64: 7c032073 csrs mxstatus,t1
68: 000703b7 lui t2,0x70
6c: 0133839b addiw t2,t2,19
70: 7c23a073 csrs mcor,t2
74: 4321 li t1,8
76: 30033073 csrc mstatus,t1
7a: 30401073 csrw mie,zero
7e: 00003297 auipc t0,0x3
82: 2a228293 addi t0,t0,674 # 3320
86: 30529073 csrw mtvec,t0
8a: 02050337 lui t1,0x2050
8e: 0b83031b addiw t1,t1,184
92: 00036383 lwu t2,0(t1) # 2050000
96: 16aa0e37 lui t3,0x16aa0
9a: 01c32023 sw t3,0(t1)
9e: 07000337 lui t1,0x7000
a2: 5e43031b addiw t1,t1,1508
a6: 00036283 lwu t0,0(t1) # 7000000
aa: 000103b7 lui t2,0x10
ae: fff3839b addiw t2,t2,-1
b2: 0053fe33 and t3,t2,t0
b6: 0000feb7 lui t4,0xf
ba: fe8e8e9b addiw t4,t4,-24
be: 05de0063 beq t3,t4,fe
c2: 00045137 lui sp,0x45
c6: ffc1011b addiw sp,sp,-4
ca: 030002b7 lui t0,0x3000
ce: 0082829b addiw t0,t0,8
d2: 0002e303 lwu t1,0(t0) # 3000000
d6: 4385 li t2,1
d8: 00736e33 or t3,t1,t2
dc: 01c2a023 sw t3,0(t0)
e0: 07f00513 li a0,127
e4: 05c00293 li t0,92
e8: 00549463 bne s1,t0,f0
ec: 25f0906f j 9b4a
f0: 01e000ef jal ra,10e
f4: 06f00513 li a0,111
f8: 18c030ef jal ra,3284
fc: a001 j fc
fe: 070002b7 lui t0,0x7000
102: 5e82829b addiw t0,t0,1512
106: 0002e303 lwu t1,0(t0) # 7000000
10a: 8302 jr t1
10c: a001 j 10c
000000000000010e :
10e: 000482b7 lui t0,0x48
112: d002829b addiw t0,t0,-768
116: 00048337 lui t1,0x48
11a: 0002a023 sw zero,0(t0) # 48000
11e: 0291 addi t0,t0,4
120: fe62cde3 blt t0,t1,11a
124: 8082 ret
0000000000000126 :
126: 070102b7 lui t0,0x7010
12a: 20c2829b addiw t0,t0,524
12e: 0002e303 lwu t1,0(t0) # 7010000
132: 63c1 lui t2,0x10
134: 0063ee33 or t3,t2,t1
138: 01c2a023 sw t3,0(t0)
13c: 0002e303 lwu t1,0(t0)
140: 00136393 ori t2,t1,1
144: 0072a023 sw t2,0(t0)
148: 070902b7 lui t0,0x7090
14c: 3102829b addiw t0,t0,784
150: 0002e303 lwu t1,0(t0) # 7090000
154: 0010039b addiw t2,zero,1
158: 01f39393 slli t2,t2,0x1f
15c: 0063ee33 or t3,t2,t1
160: 01c2a023 sw t3,0(t0)
164: 8082 ret
0000000000000166 :
166: 070902b7 lui t0,0x7090
16a: 3042829b addiw t0,t0,772
16e: 0002e303 lwu t1,0(t0) # 7090000
172: 63a1 lui t2,0x8
174: 00737e33 and t3,t1,t2
178: 020e0163 beqz t3,19a
17c: 00008e37 lui t3,0x8
180: 001e0e1b addiw t3,t3,1
184: 010e1e13 slli t3,t3,0x10
188: 7ff00513 li a0,2047
18c: 00a37eb3 and t4,t1,a0
190: 01de6f33 or t5,t3,t4
194: 01e2a023 sw t5,0(t0)
198: 8082 ret
19a: 00008e37 lui t3,0x8
19e: 001e0e1b addiw t3,t3,1
1a2: 07ff0537 lui a0,0x7ff0
1a6: 00a37eb3 and t4,t1,a0
1aa: 01de6f33 or t5,t3,t4
1ae: 01e2a023 sw t5,0(t0)
1b2: 8082 ret
00000000000001b4 :
1b4: 8502 jr a0
1b6: a001 j 1b6
1b8: a001 j 1b8
...
00000000000001bc :
1bc: 7179 addi sp,sp,-48
1be: f422 sd s0,40(sp)
1c0: 1800 addi s0,sp,48
1c2: 87aa mv a5,a0
1c4: fcf40fa3 sb a5,-33(s0)
1c8: fe042623 sw zero,-20(s0)
1cc: 030007b7 lui a5,0x3000
1d0: 0d078793 addi a5,a5,208 # 30000d0 :
20e: 7179 addi sp,sp,-48
210: f422 sd s0,40(sp)
212: 1800 addi s0,sp,48
214: 87aa mv a5,a0
216: fcf40fa3 sb a5,-33(s0)
21a: fe042623 sw zero,-20(s0)
21e: 030007b7 lui a5,0x3000
222: 0d078793 addi a5,a5,208 # 30000d0 :
26a: 7179 addi sp,sp,-48
26c: f422 sd s0,40(sp)
26e: 1800 addi s0,sp,48
270: 87aa mv a5,a0
272: fcf40fa3 sb a5,-33(s0)
276: fe042623 sw zero,-20(s0)
27a: 030007b7 lui a5,0x3000
27e: 0d078793 addi a5,a5,208 # 30000d0 :
2c6: 7179 addi sp,sp,-48
2c8: f406 sd ra,40(sp)
2ca: f022 sd s0,32(sp)
2cc: 1800 addi s0,sp,48
2ce: fca43c23 sd a0,-40(s0)
2d2: fcb43823 sd a1,-48(s0)
2d6: fe043423 sd zero,-24(s0)
2da: 03800613 li a2,56
2de: 4581 li a1,0
2e0: fd043503 ld a0,-48(s0)
2e4: 583090ef jal ra,a066
2e8: fd843783 ld a5,-40(s0)
2ec: fef43423 sd a5,-24(s0)
2f0: fe843783 ld a5,-24(s0)
2f4: 0087c703 lbu a4,8(a5)
2f8: 0097c683 lbu a3,9(a5)
2fc: 06a2 slli a3,a3,0x8
2fe: 8f55 or a4,a4,a3
300: 00a7c683 lbu a3,10(a5)
304: 06c2 slli a3,a3,0x10
306: 8f55 or a4,a4,a3
308: 00b7c783 lbu a5,11(a5)
30c: 07e2 slli a5,a5,0x18
30e: 8fd9 or a5,a5,a4
310: 2781 sext.w a5,a5
312: 873e mv a4,a5
314: 8911a7b7 lui a5,0x8911a
318: 80078793 addi a5,a5,-2048 # ffffffff89119800
320: 57fd li a5,-1
322: a00d j 344
324: fd043783 ld a5,-48(s0)
328: fd843703 ld a4,-40(s0)
32c: e398 sd a4,0(a5)
32e: fd043783 ld a5,-48(s0)
332: 07a1 addi a5,a5,8
334: 03000613 li a2,48
338: fd843583 ld a1,-40(s0)
33c: 853e mv a0,a5
33e: 3fd090ef jal ra,9f3a
342: 4781 li a5,0
344: 853e mv a0,a5
346: 70a2 ld ra,40(sp)
348: 7402 ld s0,32(sp)
34a: 6145 addi sp,sp,48
34c: 8082 ret
000000000000034e :
34e: 715d addi sp,sp,-80
350: e486 sd ra,72(sp)
352: e0a2 sd s0,64(sp)
354: 0880 addi s0,sp,80
356: fca43c23 sd a0,-40(s0)
35a: 87ae mv a5,a1
35c: fcc43423 sd a2,-56(s0)
360: fcd43023 sd a3,-64(s0)
364: fae43c23 sd a4,-72(s0)
368: fcf42a23 sw a5,-44(s0)
36c: fe042623 sw zero,-20(s0)
370: fe043023 sd zero,-32(s0)
374: fc843783 ld a5,-56(s0)
378: 0007b023 sd zero,0(a5)
37c: fc043783 ld a5,-64(s0)
380: 0007a023 sw zero,0(a5)
384: fd843783 ld a5,-40(s0)
388: 639c ld a5,0(a5)
38a: 03078793 addi a5,a5,48
38e: fef43023 sd a5,-32(s0)
392: fe042623 sw zero,-20(s0)
396: a0f9 j 464
398: fec42783 lw a5,-20(s0)
39c: 0796 slli a5,a5,0x5
39e: fe043703 ld a4,-32(s0)
3a2: 97ba add a5,a5,a4
3a4: 0007c703 lbu a4,0(a5)
3a8: 0017c683 lbu a3,1(a5)
3ac: 06a2 slli a3,a3,0x8
3ae: 8f55 or a4,a4,a3
3b0: 0027c683 lbu a3,2(a5)
3b4: 06c2 slli a3,a3,0x10
3b6: 8f55 or a4,a4,a3
3b8: 0037c783 lbu a5,3(a5)
3bc: 07e2 slli a5,a5,0x18
3be: 8fd9 or a5,a5,a4
3c0: 0007871b sext.w a4,a5
3c4: fd442783 lw a5,-44(s0)
3c8: 2781 sext.w a5,a5
3ca: 08e79863 bne a5,a4,45a
3ce: fd843783 ld a5,-40(s0)
3d2: 6398 ld a4,0(a5)
3d4: fec42783 lw a5,-20(s0)
3d8: 0796 slli a5,a5,0x5
3da: fe043683 ld a3,-32(s0)
3de: 97b6 add a5,a5,a3
3e0: 0047c683 lbu a3,4(a5)
3e4: 0057c603 lbu a2,5(a5)
3e8: 0622 slli a2,a2,0x8
3ea: 8ed1 or a3,a3,a2
3ec: 0067c603 lbu a2,6(a5)
3f0: 0642 slli a2,a2,0x10
3f2: 8ed1 or a3,a3,a2
3f4: 0077c783 lbu a5,7(a5)
3f8: 07e2 slli a5,a5,0x18
3fa: 8fd5 or a5,a5,a3
3fc: 2781 sext.w a5,a5
3fe: 1782 slli a5,a5,0x20
400: 9381 srli a5,a5,0x20
402: 973e add a4,a4,a5
404: fc843783 ld a5,-56(s0)
408: e398 sd a4,0(a5)
40a: fec42783 lw a5,-20(s0)
40e: 0796 slli a5,a5,0x5
410: fe043703 ld a4,-32(s0)
414: 97ba add a5,a5,a4
416: 0087c703 lbu a4,8(a5)
41a: 0097c683 lbu a3,9(a5)
41e: 06a2 slli a3,a3,0x8
420: 8f55 or a4,a4,a3
422: 00a7c683 lbu a3,10(a5)
426: 06c2 slli a3,a3,0x10
428: 8f55 or a4,a4,a3
42a: 00b7c783 lbu a5,11(a5)
42e: 07e2 slli a5,a5,0x18
430: 8fd9 or a5,a5,a4
432: 0007871b sext.w a4,a5
436: fc043783 ld a5,-64(s0)
43a: c398 sw a4,0(a5)
43c: fec42783 lw a5,-20(s0)
440: 0796 slli a5,a5,0x5
442: fe043703 ld a4,-32(s0)
446: 97ba add a5,a5,a4
448: 02000613 li a2,32
44c: 85be mv a1,a5
44e: fb843503 ld a0,-72(s0)
452: 2e9090ef jal ra,9f3a
456: 4781 li a5,0
458: a831 j 474
45a: fec42783 lw a5,-20(s0)
45e: 2785 addiw a5,a5,1
460: fef42623 sw a5,-20(s0)
464: fd843783 ld a5,-40(s0)
468: 5398 lw a4,32(a5)
46a: fec42783 lw a5,-20(s0)
46e: f2e7e5e3 bltu a5,a4,398
472: 57fd li a5,-1
474: 853e mv a0,a5
476: 60a6 ld ra,72(sp)
478: 6406 ld s0,64(sp)
47a: 6161 addi sp,sp,80
47c: 8082 ret
000000000000047e :
47e: 7139 addi sp,sp,-64
480: fc06 sd ra,56(sp)
482: f822 sd s0,48(sp)
484: 0080 addi s0,sp,64
486: fca43423 sd a0,-56(s0)
48a: fcb43023 sd a1,-64(s0)
48e: fe043423 sd zero,-24(s0)
492: fe043023 sd zero,-32(s0)
496: fc042e23 sw zero,-36(s0)
49a: fc843783 ld a5,-56(s0)
49e: 6398 ld a4,0(a5)
4a0: fc043783 ld a5,-64(s0)
4a4: 0047c683 lbu a3,4(a5)
4a8: 0057c603 lbu a2,5(a5)
4ac: 0622 slli a2,a2,0x8
4ae: 8ed1 or a3,a3,a2
4b0: 0067c603 lbu a2,6(a5)
4b4: 0642 slli a2,a2,0x10
4b6: 8ed1 or a3,a3,a2
4b8: 0077c783 lbu a5,7(a5)
4bc: 07e2 slli a5,a5,0x18
4be: 8fd5 or a5,a5,a3
4c0: 2781 sext.w a5,a5
4c2: 1782 slli a5,a5,0x20
4c4: 9381 srli a5,a5,0x20
4c6: 97ba add a5,a5,a4
4c8: fef43423 sd a5,-24(s0)
4cc: fc043783 ld a5,-64(s0)
4d0: 0147c703 lbu a4,20(a5)
4d4: 0157c683 lbu a3,21(a5)
4d8: 06a2 slli a3,a3,0x8
4da: 8f55 or a4,a4,a3
4dc: 0167c683 lbu a3,22(a5)
4e0: 06c2 slli a3,a3,0x10
4e2: 8f55 or a4,a4,a3
4e4: 0177c783 lbu a5,23(a5)
4e8: 07e2 slli a5,a5,0x18
4ea: 8fd9 or a5,a5,a4
4ec: 2781 sext.w a5,a5
4ee: 1782 slli a5,a5,0x20
4f0: 9381 srli a5,a5,0x20
4f2: fef43023 sd a5,-32(s0)
4f6: fc043783 ld a5,-64(s0)
4fa: 0087c703 lbu a4,8(a5)
4fe: 0097c683 lbu a3,9(a5)
502: 06a2 slli a3,a3,0x8
504: 8f55 or a4,a4,a3
506: 00a7c683 lbu a3,10(a5)
50a: 06c2 slli a3,a3,0x10
50c: 8f55 or a4,a4,a3
50e: 00b7c783 lbu a5,11(a5)
512: 07e2 slli a5,a5,0x18
514: 8fd9 or a5,a5,a4
516: fcf42e23 sw a5,-36(s0)
51a: fdc42783 lw a5,-36(s0)
51e: 863e mv a2,a5
520: fe843583 ld a1,-24(s0)
524: fe043503 ld a0,-32(s0)
528: 245090ef jal ra,9f6c
52c: 0001 nop
52e: 70e2 ld ra,56(sp)
530: 7442 ld s0,48(sp)
532: 6121 addi sp,sp,64
534: 8082 ret
0000000000000536 :
536: 1101 addi sp,sp,-32
538: ec22 sd s0,24(sp)
53a: 1000 addi s0,sp,32
53c: fea43423 sd a0,-24(s0)
540: fe843783 ld a5,-24(s0)
544: 0147c703 lbu a4,20(a5)
548: 0157c683 lbu a3,21(a5)
54c: 06a2 slli a3,a3,0x8
54e: 8f55 or a4,a4,a3
550: 0167c683 lbu a3,22(a5)
554: 06c2 slli a3,a3,0x10
556: 8f55 or a4,a4,a3
558: 0177c783 lbu a5,23(a5)
55c: 07e2 slli a5,a5,0x18
55e: 8fd9 or a5,a5,a4
560: 2781 sext.w a5,a5
562: 853e mv a0,a5
564: 6462 ld s0,24(sp)
566: 6105 addi sp,sp,32
568: 8082 ret
000000000000056a :
56a: 1101 addi sp,sp,-32
56c: ec22 sd s0,24(sp)
56e: 1000 addi s0,sp,32
570: fe042623 sw zero,-20(s0)
574: 020017b7 lui a5,0x2001
578: 68c78793 addi a5,a5,1676 # 200168c
5b6: 020017b7 lui a5,0x2001
5ba: 68c78793 addi a5,a5,1676 # 200168c :
5e6: 7179 addi sp,sp,-48
5e8: f422 sd s0,40(sp)
5ea: 1800 addi s0,sp,48
5ec: 87aa mv a5,a0
5ee: fcf42e23 sw a5,-36(s0)
5f2: fdc42783 lw a5,-36(s0)
5f6: 0187979b slliw a5,a5,0x18
5fa: fef42623 sw a5,-20(s0)
5fe: fdc42783 lw a5,-36(s0)
602: 0087979b slliw a5,a5,0x8
606: 2781 sext.w a5,a5
608: 873e mv a4,a5
60a: 00ff07b7 lui a5,0xff0
60e: 8ff9 and a5,a5,a4
610: fef42423 sw a5,-24(s0)
614: fdc42783 lw a5,-36(s0)
618: 0087d79b srliw a5,a5,0x8
61c: 2781 sext.w a5,a5
61e: 873e mv a4,a5
620: 67c1 lui a5,0x10
622: f0078793 addi a5,a5,-256 # ff00
626: 8ff9 and a5,a5,a4
628: fef42223 sw a5,-28(s0)
62c: fdc42783 lw a5,-36(s0)
630: 0187d79b srliw a5,a5,0x18
634: fef42023 sw a5,-32(s0)
638: fec42703 lw a4,-20(s0)
63c: fe842783 lw a5,-24(s0)
640: 8fd9 or a5,a5,a4
642: 0007871b sext.w a4,a5
646: fe442783 lw a5,-28(s0)
64a: 8fd9 or a5,a5,a4
64c: 0007871b sext.w a4,a5
650: fe042783 lw a5,-32(s0)
654: 8fd9 or a5,a5,a4
656: 2781 sext.w a5,a5
658: 853e mv a0,a5
65a: 7422 ld s0,40(sp)
65c: 6145 addi sp,sp,48
65e: 8082 ret
0000000000000660 :
660: 7119 addi sp,sp,-128
662: fc86 sd ra,120(sp)
664: f8a2 sd s0,112(sp)
666: 0100 addi s0,sp,128
668: 87aa mv a5,a0
66a: f8b43023 sd a1,-128(s0)
66e: f8f42623 sw a5,-116(s0)
672: f8c42783 lw a5,-116(s0)
676: 0067d79b srliw a5,a5,0x6
67a: fef42223 sw a5,-28(s0)
67e: f8c42783 lw a5,-116(s0)
682: 03f7f793 andi a5,a5,63
686: fef42023 sw a5,-32(s0)
68a: f9840793 addi a5,s0,-104
68e: fcf43c23 sd a5,-40(s0)
692: fe042783 lw a5,-32(s0)
696: 2781 sext.w a5,a5
698: efe1 bnez a5,770
69a: fe042623 sw zero,-20(s0)
69e: a831 j 6ba
6a0: fec46783 lwu a5,-20(s0)
6a4: 078a slli a5,a5,0x2
6a6: ff040713 addi a4,s0,-16
6aa: 97ba add a5,a5,a4
6ac: fa07a423 sw zero,-88(a5)
6b0: fec42783 lw a5,-20(s0)
6b4: 2785 addiw a5,a5,1
6b6: fef42623 sw a5,-20(s0)
6ba: fec42783 lw a5,-20(s0)
6be: 0007871b sext.w a4,a5
6c2: 47bd li a5,15
6c4: fce7fee3 bgeu a5,a4,6a0
6c8: 08000793 li a5,128
6cc: f8f42c23 sw a5,-104(s0)
6d0: f8c42783 lw a5,-116(s0)
6d4: 01d7d79b srliw a5,a5,0x1d
6d8: 2781 sext.w a5,a5
6da: fcf42823 sw a5,-48(s0)
6de: f8c42783 lw a5,-116(s0)
6e2: 0037979b slliw a5,a5,0x3
6e6: 2781 sext.w a5,a5
6e8: fcf42a23 sw a5,-44(s0)
6ec: fd042783 lw a5,-48(s0)
6f0: 853e mv a0,a5
6f2: ef5ff0ef jal ra,5e6
6f6: 87aa mv a5,a0
6f8: 2781 sext.w a5,a5
6fa: fcf42823 sw a5,-48(s0)
6fe: fd442783 lw a5,-44(s0)
702: 853e mv a0,a5
704: ee3ff0ef jal ra,5e6
708: 87aa mv a5,a0
70a: 2781 sext.w a5,a5
70c: fcf42a23 sw a5,-44(s0)
710: fe042623 sw zero,-20(s0)
714: a82d j 74e
716: fec46783 lwu a5,-20(s0)
71a: fd843703 ld a4,-40(s0)
71e: 973e add a4,a4,a5
720: fe442783 lw a5,-28(s0)
724: 0067979b slliw a5,a5,0x6
728: 2781 sext.w a5,a5
72a: fec42683 lw a3,-20(s0)
72e: 9fb5 addw a5,a5,a3
730: 2781 sext.w a5,a5
732: 1782 slli a5,a5,0x20
734: 9381 srli a5,a5,0x20
736: f8043683 ld a3,-128(s0)
73a: 97b6 add a5,a5,a3
73c: 00074703 lbu a4,0(a4)
740: 00e78023 sb a4,0(a5)
744: fec42783 lw a5,-20(s0)
748: 2785 addiw a5,a5,1
74a: fef42623 sw a5,-20(s0)
74e: fec42783 lw a5,-20(s0)
752: 0007871b sext.w a4,a5
756: 03f00793 li a5,63
75a: fae7fee3 bgeu a5,a4,716
75e: fe442783 lw a5,-28(s0)
762: 2785 addiw a5,a5,1
764: 2781 sext.w a5,a5
766: 0067979b slliw a5,a5,0x6
76a: fef42423 sw a5,-24(s0)
76e: a4f5 j a5a
770: fe042783 lw a5,-32(s0)
774: 0007871b sext.w a4,a5
778: 03700793 li a5,55
77c: 12e7e963 bltu a5,a4,8ae
780: fe042623 sw zero,-20(s0)
784: a831 j 7a0
786: fec46783 lwu a5,-20(s0)
78a: 078a slli a5,a5,0x2
78c: ff040713 addi a4,s0,-16
790: 97ba add a5,a5,a4
792: fa07a423 sw zero,-88(a5)
796: fec42783 lw a5,-20(s0)
79a: 2785 addiw a5,a5,1
79c: fef42623 sw a5,-20(s0)
7a0: fec42783 lw a5,-20(s0)
7a4: 0007871b sext.w a4,a5
7a8: 47bd li a5,15
7aa: fce7fee3 bgeu a5,a4,786
7ae: fe042623 sw zero,-20(s0)
7b2: a82d j 7ec
7b4: fe442783 lw a5,-28(s0)
7b8: 0067979b slliw a5,a5,0x6
7bc: 2781 sext.w a5,a5
7be: fec42703 lw a4,-20(s0)
7c2: 9fb9 addw a5,a5,a4
7c4: 2781 sext.w a5,a5
7c6: 1782 slli a5,a5,0x20
7c8: 9381 srli a5,a5,0x20
7ca: f8043703 ld a4,-128(s0)
7ce: 973e add a4,a4,a5
7d0: fec46783 lwu a5,-20(s0)
7d4: fd843683 ld a3,-40(s0)
7d8: 97b6 add a5,a5,a3
7da: 00074703 lbu a4,0(a4)
7de: 00e78023 sb a4,0(a5)
7e2: fec42783 lw a5,-20(s0)
7e6: 2785 addiw a5,a5,1
7e8: fef42623 sw a5,-20(s0)
7ec: fec42703 lw a4,-20(s0)
7f0: fe042783 lw a5,-32(s0)
7f4: 2701 sext.w a4,a4
7f6: 2781 sext.w a5,a5
7f8: faf76ee3 bltu a4,a5,7b4
7fc: fe046783 lwu a5,-32(s0)
800: fd843703 ld a4,-40(s0)
804: 97ba add a5,a5,a4
806: f8000713 li a4,-128
80a: 00e78023 sb a4,0(a5)
80e: f8c42783 lw a5,-116(s0)
812: 01d7d79b srliw a5,a5,0x1d
816: 2781 sext.w a5,a5
818: fcf42823 sw a5,-48(s0)
81c: f8c42783 lw a5,-116(s0)
820: 0037979b slliw a5,a5,0x3
824: 2781 sext.w a5,a5
826: fcf42a23 sw a5,-44(s0)
82a: fd042783 lw a5,-48(s0)
82e: 853e mv a0,a5
830: db7ff0ef jal ra,5e6
834: 87aa mv a5,a0
836: 2781 sext.w a5,a5
838: fcf42823 sw a5,-48(s0)
83c: fd442783 lw a5,-44(s0)
840: 853e mv a0,a5
842: da5ff0ef jal ra,5e6
846: 87aa mv a5,a0
848: 2781 sext.w a5,a5
84a: fcf42a23 sw a5,-44(s0)
84e: fe042623 sw zero,-20(s0)
852: a82d j 88c
854: fec46783 lwu a5,-20(s0)
858: fd843703 ld a4,-40(s0)
85c: 973e add a4,a4,a5
85e: fe442783 lw a5,-28(s0)
862: 0067979b slliw a5,a5,0x6
866: 2781 sext.w a5,a5
868: fec42683 lw a3,-20(s0)
86c: 9fb5 addw a5,a5,a3
86e: 2781 sext.w a5,a5
870: 1782 slli a5,a5,0x20
872: 9381 srli a5,a5,0x20
874: f8043683 ld a3,-128(s0)
878: 97b6 add a5,a5,a3
87a: 00074703 lbu a4,0(a4)
87e: 00e78023 sb a4,0(a5)
882: fec42783 lw a5,-20(s0)
886: 2785 addiw a5,a5,1
888: fef42623 sw a5,-20(s0)
88c: fec42783 lw a5,-20(s0)
890: 0007871b sext.w a4,a5
894: 03f00793 li a5,63
898: fae7fee3 bgeu a5,a4,854
89c: fe442783 lw a5,-28(s0)
8a0: 2785 addiw a5,a5,1
8a2: 2781 sext.w a5,a5
8a4: 0067979b slliw a5,a5,0x6
8a8: fef42423 sw a5,-24(s0)
8ac: a27d j a5a
8ae: fe042623 sw zero,-20(s0)
8b2: a831 j 8ce
8b4: fec46783 lwu a5,-20(s0)
8b8: 078a slli a5,a5,0x2
8ba: ff040713 addi a4,s0,-16
8be: 97ba add a5,a5,a4
8c0: fa07a423 sw zero,-88(a5)
8c4: fec42783 lw a5,-20(s0)
8c8: 2785 addiw a5,a5,1
8ca: fef42623 sw a5,-20(s0)
8ce: fec42783 lw a5,-20(s0)
8d2: 0007871b sext.w a4,a5
8d6: 47bd li a5,15
8d8: fce7fee3 bgeu a5,a4,8b4
8dc: fe042623 sw zero,-20(s0)
8e0: a82d j 91a
8e2: fe442783 lw a5,-28(s0)
8e6: 0067979b slliw a5,a5,0x6
8ea: 2781 sext.w a5,a5
8ec: fec42703 lw a4,-20(s0)
8f0: 9fb9 addw a5,a5,a4
8f2: 2781 sext.w a5,a5
8f4: 1782 slli a5,a5,0x20
8f6: 9381 srli a5,a5,0x20
8f8: f8043703 ld a4,-128(s0)
8fc: 973e add a4,a4,a5
8fe: fec46783 lwu a5,-20(s0)
902: fd843683 ld a3,-40(s0)
906: 97b6 add a5,a5,a3
908: 00074703 lbu a4,0(a4)
90c: 00e78023 sb a4,0(a5)
910: fec42783 lw a5,-20(s0)
914: 2785 addiw a5,a5,1
916: fef42623 sw a5,-20(s0)
91a: fec42703 lw a4,-20(s0)
91e: fe042783 lw a5,-32(s0)
922: 2701 sext.w a4,a4
924: 2781 sext.w a5,a5
926: faf76ee3 bltu a4,a5,8e2
92a: fe046783 lwu a5,-32(s0)
92e: fd843703 ld a4,-40(s0)
932: 97ba add a5,a5,a4
934: f8000713 li a4,-128
938: 00e78023 sb a4,0(a5)
93c: fe042623 sw zero,-20(s0)
940: a82d j 97a
942: fec46783 lwu a5,-20(s0)
946: fd843703 ld a4,-40(s0)
94a: 973e add a4,a4,a5
94c: fe442783 lw a5,-28(s0)
950: 0067979b slliw a5,a5,0x6
954: 2781 sext.w a5,a5
956: fec42683 lw a3,-20(s0)
95a: 9fb5 addw a5,a5,a3
95c: 2781 sext.w a5,a5
95e: 1782 slli a5,a5,0x20
960: 9381 srli a5,a5,0x20
962: f8043683 ld a3,-128(s0)
966: 97b6 add a5,a5,a3
968: 00074703 lbu a4,0(a4)
96c: 00e78023 sb a4,0(a5)
970: fec42783 lw a5,-20(s0)
974: 2785 addiw a5,a5,1
976: fef42623 sw a5,-20(s0)
97a: fec42783 lw a5,-20(s0)
97e: 0007871b sext.w a4,a5
982: 03f00793 li a5,63
986: fae7fee3 bgeu a5,a4,942
98a: fe042623 sw zero,-20(s0)
98e: a831 j 9aa
990: fec46783 lwu a5,-20(s0)
994: 078a slli a5,a5,0x2
996: ff040713 addi a4,s0,-16
99a: 97ba add a5,a5,a4
99c: fa07a423 sw zero,-88(a5)
9a0: fec42783 lw a5,-20(s0)
9a4: 2785 addiw a5,a5,1
9a6: fef42623 sw a5,-20(s0)
9aa: fec42783 lw a5,-20(s0)
9ae: 0007871b sext.w a4,a5
9b2: 47bd li a5,15
9b4: fce7fee3 bgeu a5,a4,990
9b8: f8c42783 lw a5,-116(s0)
9bc: 01d7d79b srliw a5,a5,0x1d
9c0: 2781 sext.w a5,a5
9c2: fcf42823 sw a5,-48(s0)
9c6: f8c42783 lw a5,-116(s0)
9ca: 0037979b slliw a5,a5,0x3
9ce: 2781 sext.w a5,a5
9d0: fcf42a23 sw a5,-44(s0)
9d4: fd042783 lw a5,-48(s0)
9d8: 853e mv a0,a5
9da: c0dff0ef jal ra,5e6
9de: 87aa mv a5,a0
9e0: 2781 sext.w a5,a5
9e2: fcf42823 sw a5,-48(s0)
9e6: fd442783 lw a5,-44(s0)
9ea: 853e mv a0,a5
9ec: bfbff0ef jal ra,5e6
9f0: 87aa mv a5,a0
9f2: 2781 sext.w a5,a5
9f4: fcf42a23 sw a5,-44(s0)
9f8: fe042623 sw zero,-20(s0)
9fc: a83d j a3a
9fe: fec46783 lwu a5,-20(s0)
a02: fd843703 ld a4,-40(s0)
a06: 973e add a4,a4,a5
a08: fe442783 lw a5,-28(s0)
a0c: 2785 addiw a5,a5,1
a0e: 2781 sext.w a5,a5
a10: 0067979b slliw a5,a5,0x6
a14: 2781 sext.w a5,a5
a16: fec42683 lw a3,-20(s0)
a1a: 9fb5 addw a5,a5,a3
a1c: 2781 sext.w a5,a5
a1e: 1782 slli a5,a5,0x20
a20: 9381 srli a5,a5,0x20
a22: f8043683 ld a3,-128(s0)
a26: 97b6 add a5,a5,a3
a28: 00074703 lbu a4,0(a4)
a2c: 00e78023 sb a4,0(a5)
a30: fec42783 lw a5,-20(s0)
a34: 2785 addiw a5,a5,1
a36: fef42623 sw a5,-20(s0)
a3a: fec42783 lw a5,-20(s0)
a3e: 0007871b sext.w a4,a5
a42: 03f00793 li a5,63
a46: fae7fce3 bgeu a5,a4,9fe
a4a: fe442783 lw a5,-28(s0)
a4e: 2789 addiw a5,a5,2
a50: 2781 sext.w a5,a5
a52: 0067979b slliw a5,a5,0x6
a56: fef42423 sw a5,-24(s0)
a5a: fe842783 lw a5,-24(s0)
a5e: 853e mv a0,a5
a60: 70e6 ld ra,120(sp)
a62: 7446 ld s0,112(sp)
a64: 6109 addi sp,sp,128
a66: 8082 ret
0000000000000a68 :
a68: 7139 addi sp,sp,-64
a6a: fc22 sd s0,56(sp)
a6c: 0080 addi s0,sp,64
a6e: 87aa mv a5,a0
a70: fcb43823 sd a1,-48(s0)
a74: 8732 mv a4,a2
a76: fcd43423 sd a3,-56(s0)
a7a: fcf42e23 sw a5,-36(s0)
a7e: 87ba mv a5,a4
a80: fcf42c23 sw a5,-40(s0)
a84: fe042623 sw zero,-20(s0)
a88: fe042623 sw zero,-20(s0)
a8c: a8a1 j ae4
a8e: fec42703 lw a4,-20(s0)
a92: fd842783 lw a5,-40(s0)
a96: 2781 sext.w a5,a5
a98: 02f77a63 bgeu a4,a5,acc
a9c: fec42783 lw a5,-20(s0)
aa0: fd842703 lw a4,-40(s0)
aa4: 40f707bb subw a5,a4,a5
aa8: 2781 sext.w a5,a5
aaa: 37fd addiw a5,a5,-1
aac: 2781 sext.w a5,a5
aae: 1782 slli a5,a5,0x20
ab0: 9381 srli a5,a5,0x20
ab2: fd043703 ld a4,-48(s0)
ab6: 973e add a4,a4,a5
ab8: fec42783 lw a5,-20(s0)
abc: fc843683 ld a3,-56(s0)
ac0: 97b6 add a5,a5,a3
ac2: 00074703 lbu a4,0(a4)
ac6: 00e78023 sb a4,0(a5)
aca: a801 j ada
acc: fec42783 lw a5,-20(s0)
ad0: fc843703 ld a4,-56(s0)
ad4: 97ba add a5,a5,a4
ad6: 00078023 sb zero,0(a5)
ada: fec42783 lw a5,-20(s0)
ade: 2785 addiw a5,a5,1
ae0: fef42623 sw a5,-20(s0)
ae4: fec42703 lw a4,-20(s0)
ae8: fdc42783 lw a5,-36(s0)
aec: 2781 sext.w a5,a5
aee: faf760e3 bltu a4,a5,a8e
af2: 0001 nop
af4: 7462 ld s0,56(sp)
af6: 6121 addi sp,sp,64
af8: 8082 ret
0000000000000afa :
afa: 7179 addi sp,sp,-48
afc: f422 sd s0,40(sp)
afe: 1800 addi s0,sp,48
b00: 87aa mv a5,a0
b02: 8736 mv a4,a3
b04: fcf42e23 sw a5,-36(s0)
b08: 87ae mv a5,a1
b0a: fcf42c23 sw a5,-40(s0)
b0e: 87b2 mv a5,a2
b10: fcf42a23 sw a5,-44(s0)
b14: 87ba mv a5,a4
b16: fcf42823 sw a5,-48(s0)
b1a: fdc42783 lw a5,-36(s0)
b1e: 0007871b sext.w a4,a5
b22: 20000793 li a5,512
b26: 00f71563 bne a4,a5,b30
b2a: fe042623 sw zero,-20(s0)
b2e: a095 j b92
b30: fdc42783 lw a5,-36(s0)
b34: 0007871b sext.w a4,a5
b38: 40000793 li a5,1024
b3c: 00f71763 bne a4,a5,b4a
b40: 100007b7 lui a5,0x10000
b44: fef42623 sw a5,-20(s0)
b48: a0a9 j b92
b4a: fdc42783 lw a5,-36(s0)
b4e: 8007879b addiw a5,a5,-2048
b52: 2781 sext.w a5,a5
b54: e791 bnez a5,b60
b56: 200007b7 lui a5,0x20000
b5a: fef42623 sw a5,-20(s0)
b5e: a815 j b92
b60: fdc42783 lw a5,-36(s0)
b64: 0007871b sext.w a4,a5
b68: 6785 lui a5,0x1
b6a: c0078793 addi a5,a5,-1024 # c00
b6e: 00f71763 bne a4,a5,b7c
b72: 300007b7 lui a5,0x30000
b76: fef42623 sw a5,-20(s0)
b7a: a821 j b92
b7c: fdc42783 lw a5,-36(s0)
b80: 0007871b sext.w a4,a5
b84: 6785 lui a5,0x1
b86: 00f71663 bne a4,a5,b92
b8a: 400007b7 lui a5,0x40000
b8e: fef42623 sw a5,-20(s0)
b92: fd842783 lw a5,-40(s0)
b96: 0107979b slliw a5,a5,0x10
b9a: 2781 sext.w a5,a5
b9c: 873e mv a4,a5
b9e: 000707b7 lui a5,0x70
ba2: 8ff9 and a5,a5,a4
ba4: 0007871b sext.w a4,a5
ba8: fec42783 lw a5,-20(s0)
bac: 8fd9 or a5,a5,a4
bae: fef42623 sw a5,-20(s0)
bb2: fec42783 lw a5,-20(s0)
bb6: 853e mv a0,a5
bb8: 7422 ld s0,40(sp)
bba: 6145 addi sp,sp,48
bbc: 8082 ret
0000000000000bbe :
bbe: 7179 addi sp,sp,-48
bc0: f422 sd s0,40(sp)
bc2: 1800 addi s0,sp,48
bc4: 87aa mv a5,a0
bc6: fcf42e23 sw a5,-36(s0)
bca: 030417b7 lui a5,0x3041
bce: 80878793 addi a5,a5,-2040 # 3040808
bfe: 0001 nop
c00: 030417b7 lui a5,0x3041
c04: 80c78793 addi a5,a5,-2036 # 304080c
c24: fe042623 sw zero,-20(s0)
c28: a031 j c34
c2a: fec42783 lw a5,-20(s0)
c2e: 2785 addiw a5,a5,1
c30: fef42623 sw a5,-20(s0)
c34: fec42783 lw a5,-20(s0)
c38: 0007871b sext.w a4,a5
c3c: 3e700793 li a5,999
c40: fee7f5e3 bgeu a5,a4,c2a
c44: 0001 nop
c46: 7422 ld s0,40(sp)
c48: 6145 addi sp,sp,48
c4a: 8082 ret
0000000000000c4c :
c4c: 7179 addi sp,sp,-48
c4e: f422 sd s0,40(sp)
c50: 1800 addi s0,sp,48
c52: 87aa mv a5,a0
c54: fcf42e23 sw a5,-36(s0)
c58: 030417b7 lui a5,0x3041
c5c: 80c78793 addi a5,a5,-2036 # 304080c
c94: fec42783 lw a5,-20(s0)
c98: 9bc1 andi a5,a5,-16
c9a: fef42623 sw a5,-20(s0)
c9e: fdc42783 lw a5,-36(s0)
ca2: 4705 li a4,1
ca4: 00f717bb sllw a5,a4,a5
ca8: 2781 sext.w a5,a5
caa: 0007871b sext.w a4,a5
cae: fec42783 lw a5,-20(s0)
cb2: 8fd9 or a5,a5,a4
cb4: fef42623 sw a5,-20(s0)
cb8: 030417b7 lui a5,0x3041
cbc: 80c78793 addi a5,a5,-2036 # 304080c :
cce: 7149 addi sp,sp,-368
cd0: f686 sd ra,360(sp)
cd2: f2a2 sd s0,352(sp)
cd4: 1a80 addi s0,sp,368
cd6: 87aa mv a5,a0
cd8: eab43023 sd a1,-352(s0)
cdc: e8d43c23 sd a3,-360(s0)
ce0: eaf42623 sw a5,-340(s0)
ce4: 87b2 mv a5,a2
ce6: eaf42423 sw a5,-344(s0)
cea: 87ba mv a5,a4
cec: e8f42a23 sw a5,-364(s0)
cf0: fc042e23 sw zero,-36(s0)
cf4: fc042c23 sw zero,-40(s0)
cf8: fe042623 sw zero,-20(s0)
cfc: fe042423 sw zero,-24(s0)
d00: fc043823 sd zero,-48(s0)
d04: fc043423 sd zero,-56(s0)
d08: fe043023 sd zero,-32(s0)
d0c: 85fff0ef jal ra,56a
d10: eb040793 addi a5,s0,-336
d14: 0b000613 li a2,176
d18: 4581 li a1,0
d1a: 853e mv a0,a5
d1c: 34a090ef jal ra,a066
d20: f6040793 addi a5,s0,-160
d24: 04000613 li a2,64
d28: 4581 li a1,0
d2a: 853e mv a0,a5
d2c: 33a090ef jal ra,a066
d30: fa040793 addi a5,s0,-96
d34: 02800613 li a2,40
d38: 4581 li a1,0
d3a: 853e mv a0,a5
d3c: 32a090ef jal ra,a066
d40: fa040793 addi a5,s0,-96
d44: 07fd addi a5,a5,31
d46: 9b81 andi a5,a5,-32
d48: fcf43823 sd a5,-48(s0)
d4c: f6040793 addi a5,s0,-160
d50: 07fd addi a5,a5,31
d52: 9b81 andi a5,a5,-32
d54: fcf43423 sd a5,-56(s0)
d58: ea043783 ld a5,-352(s0)
d5c: 8bfd andi a5,a5,31
d5e: c399 beqz a5,d64
d60: 57fd li a5,-1
d62: a2c1 j f22
d64: eac42783 lw a5,-340(s0)
d68: 0007871b sext.w a4,a5
d6c: 4785 li a5,1
d6e: 00f71a63 bne a4,a5,d82
d72: 47cd li a5,19
d74: fef43023 sd a5,-32(s0)
d78: 02000793 li a5,32
d7c: fef42623 sw a5,-20(s0)
d80: a831 j d9c
d82: eac42783 lw a5,-340(s0)
d86: 2781 sext.w a5,a5
d88: eb81 bnez a5,d98
d8a: 47c5 li a5,17
d8c: fef43023 sd a5,-32(s0)
d90: 47d1 li a5,20
d92: fef42623 sw a5,-20(s0)
d96: a019 j d9c
d98: 57fd li a5,-1
d9a: a261 j f22
d9c: ea842783 lw a5,-344(s0)
da0: ea043583 ld a1,-352(s0)
da4: 853e mv a0,a5
da6: 8bbff0ef jal ra,660
daa: 87aa mv a5,a0
dac: fcf42e23 sw a5,-36(s0)
db0: fdc42783 lw a5,-36(s0)
db4: 0027d79b srliw a5,a5,0x2
db8: fcf42c23 sw a5,-40(s0)
dbc: ea042823 sw zero,-336(s0)
dc0: fe043783 ld a5,-32(s0)
dc4: 2781 sext.w a5,a5
dc6: 873e mv a4,a5
dc8: 800007b7 lui a5,0x80000
dcc: 8fd9 or a5,a5,a4
dce: 2781 sext.w a5,a5
dd0: eaf42a23 sw a5,-332(s0)
dd4: eb442783 lw a5,-332(s0)
dd8: 873e mv a4,a5
dda: 080007b7 lui a5,0x8000
dde: 8fd9 or a5,a5,a4
de0: 2781 sext.w a5,a5
de2: eaf42a23 sw a5,-332(s0)
de6: ea042c23 sw zero,-328(s0)
dea: ea042e23 sw zero,-324(s0)
dee: ec042023 sw zero,-320(s0)
df2: fd043783 ld a5,-48(s0)
df6: 2781 sext.w a5,a5
df8: ecf42223 sw a5,-316(s0)
dfc: ec042423 sw zero,-312(s0)
e00: fd842783 lw a5,-40(s0)
e04: ecf42623 sw a5,-308(s0)
e08: ea043783 ld a5,-352(s0)
e0c: 2781 sext.w a5,a5
e0e: ecf42823 sw a5,-304(s0)
e12: fd842783 lw a5,-40(s0)
e16: ecf42a23 sw a5,-300(s0)
e1a: 4785 li a5,1
e1c: fef42423 sw a5,-24(s0)
e20: a839 j e3e
e22: fe842783 lw a5,-24(s0)
e26: 0791 addi a5,a5,4
e28: 078e slli a5,a5,0x3
e2a: ff040713 addi a4,s0,-16
e2e: 97ba add a5,a5,a4
e30: ec07a223 sw zero,-316(a5) # 7fffec4
e4c: fc843783 ld a5,-56(s0)
e50: 2781 sext.w a5,a5
e52: f0f42823 sw a5,-240(s0)
e56: fec42783 lw a5,-20(s0)
e5a: 0027d79b srliw a5,a5,0x2
e5e: 2781 sext.w a5,a5
e60: f0f42a23 sw a5,-236(s0)
e64: 4785 li a5,1
e66: fef42423 sw a5,-24(s0)
e6a: a839 j e88
e6c: fe842783 lw a5,-24(s0)
e70: 07b1 addi a5,a5,12
e72: 078e slli a5,a5,0x3
e74: ff040713 addi a4,s0,-16
e78: 97ba add a5,a5,a4
e7a: ec07a223 sw zero,-316(a5)
e7e: fe842783 lw a5,-24(s0)
e82: 2785 addiw a5,a5,1
e84: fef42423 sw a5,-24(s0)
e88: fe842783 lw a5,-24(s0)
e8c: 0007871b sext.w a4,a5
e90: 479d li a5,7
e92: fce7dde3 bge a5,a4,e6c
e96: f4042823 sw zero,-176(s0)
e9a: eb040713 addi a4,s0,-336
e9e: 030417b7 lui a5,0x3041
ea2: 80078793 addi a5,a5,-2048 # 3040800
eda: fe042423 sw zero,-24(s0)
ede: a02d j f08
ee0: fe842703 lw a4,-24(s0)
ee4: fc843783 ld a5,-56(s0)
ee8: 97ba add a5,a5,a4
eea: 86be mv a3,a5
eec: fe842783 lw a5,-24(s0)
ef0: e9843703 ld a4,-360(s0)
ef4: 97ba add a5,a5,a4
ef6: 0006c703 lbu a4,0(a3)
efa: 00e78023 sb a4,0(a5)
efe: fe842783 lw a5,-24(s0)
f02: 2785 addiw a5,a5,1
f04: fef42423 sw a5,-24(s0)
f08: fe842703 lw a4,-24(s0)
f0c: fec42783 lw a5,-20(s0)
f10: 2781 sext.w a5,a5
f12: fcf767e3 bltu a4,a5,ee0
f16: eb042783 lw a5,-336(s0)
f1a: 853e mv a0,a5
f1c: d31ff0ef jal ra,c4c
f20: 4781 li a5,0
f22: 853e mv a0,a5
f24: 70b6 ld ra,360(sp)
f26: 7416 ld s0,352(sp)
f28: 6175 addi sp,sp,368
f2a: 8082 ret
0000000000000f2c :
f2c: 86010113 addi sp,sp,-1952 # 44860
f30: 78113c23 sd ra,1944(sp)
f34: 78813823 sd s0,1936(sp)
f38: 7a010413 addi s0,sp,1952
f3c: 88b43023 sd a1,-1920(s0)
f40: 86d43c23 sd a3,-1928(s0)
f44: 86ba mv a3,a4
f46: 86f43423 sd a5,-1944(s0)
f4a: 8742 mv a4,a6
f4c: 87143023 sd a7,-1952(s0)
f50: 87aa mv a5,a0
f52: 88f42623 sw a5,-1908(s0)
f56: 87b2 mv a5,a2
f58: 88f42423 sw a5,-1912(s0)
f5c: 87b6 mv a5,a3
f5e: 86f42a23 sw a5,-1932(s0)
f62: 87ba mv a5,a4
f64: 86f42823 sw a5,-1936(s0)
f68: 88c42783 lw a5,-1908(s0)
f6c: 0037d79b srliw a5,a5,0x3
f70: fef42423 sw a5,-24(s0)
f74: 88c42783 lw a5,-1908(s0)
f78: 0057d79b srliw a5,a5,0x5
f7c: fef42223 sw a5,-28(s0)
f80: fe042623 sw zero,-20(s0)
f84: e2040793 addi a5,s0,-480
f88: fcf43c23 sd a5,-40(s0)
f8c: c8040793 addi a5,s0,-896
f90: fcf43823 sd a5,-48(s0)
f94: ae040793 addi a5,s0,-1312
f98: fcf43423 sd a5,-56(s0)
f9c: 94040793 addi a5,s0,-1728
fa0: fcf43023 sd a5,-64(s0)
fa4: dc6ff0ef jal ra,56a
fa8: 89040793 addi a5,s0,-1904
fac: 0b000613 li a2,176
fb0: 4581 li a1,0
fb2: 853e mv a0,a5
fb4: 0b2090ef jal ra,a066
fb8: fd843783 ld a5,-40(s0)
fbc: 1a000613 li a2,416
fc0: 4581 li a1,0
fc2: 853e mv a0,a5
fc4: 0a2090ef jal ra,a066
fc8: fd043783 ld a5,-48(s0)
fcc: 1a000613 li a2,416
fd0: 4581 li a1,0
fd2: 853e mv a0,a5
fd4: 092090ef jal ra,a066
fd8: fc843783 ld a5,-56(s0)
fdc: 1a000613 li a2,416
fe0: 4581 li a1,0
fe2: 853e mv a0,a5
fe4: 082090ef jal ra,a066
fe8: fc043783 ld a5,-64(s0)
fec: 1a000613 li a2,416
ff0: 4581 li a1,0
ff2: 853e mv a0,a5
ff4: 072090ef jal ra,a066
ff8: fd843783 ld a5,-40(s0)
ffc: 07fd addi a5,a5,31
ffe: 9b81 andi a5,a5,-32
1000: fcf43c23 sd a5,-40(s0)
1004: fd043783 ld a5,-48(s0)
1008: 07fd addi a5,a5,31
100a: 9b81 andi a5,a5,-32
100c: fcf43823 sd a5,-48(s0)
1010: fc843783 ld a5,-56(s0)
1014: 07fd addi a5,a5,31
1016: 9b81 andi a5,a5,-32
1018: fcf43423 sd a5,-56(s0)
101c: fc043783 ld a5,-64(s0)
1020: 07fd addi a5,a5,31
1022: 9b81 andi a5,a5,-32
1024: fcf43023 sd a5,-64(s0)
1028: 88c42783 lw a5,-1908(s0)
102c: 0007871b sext.w a4,a5
1030: 20000793 li a5,512
1034: 02f70b63 beq a4,a5,106a
1038: 88c42783 lw a5,-1908(s0)
103c: 0007871b sext.w a4,a5
1040: 40000793 li a5,1024
1044: 02f70363 beq a4,a5,106a
1048: 88c42783 lw a5,-1908(s0)
104c: 8007879b addiw a5,a5,-2048
1050: 2781 sext.w a5,a5
1052: cf81 beqz a5,106a
1054: 88c42783 lw a5,-1908(s0)
1058: 0007871b sext.w a4,a5
105c: 6785 lui a5,0x1
105e: c0078793 addi a5,a5,-1024 # c00
1062: 00f70463 beq a4,a5,106a
1066: 57fd li a5,-1
1068: aac9 j 123a
106a: fd043683 ld a3,-48(s0)
106e: 87442703 lw a4,-1932(s0)
1072: fe842783 lw a5,-24(s0)
1076: 863a mv a2,a4
1078: 87843583 ld a1,-1928(s0)
107c: 853e mv a0,a5
107e: 9ebff0ef jal ra,a68
1082: fd843683 ld a3,-40(s0)
1086: 88842703 lw a4,-1912(s0)
108a: fe842783 lw a5,-24(s0)
108e: 863a mv a2,a4
1090: 88043583 ld a1,-1920(s0)
1094: 853e mv a0,a5
1096: 9d3ff0ef jal ra,a68
109a: fc043683 ld a3,-64(s0)
109e: fe842703 lw a4,-24(s0)
10a2: fe842783 lw a5,-24(s0)
10a6: 863a mv a2,a4
10a8: 86043583 ld a1,-1952(s0)
10ac: 853e mv a0,a5
10ae: 9bbff0ef jal ra,a68
10b2: 88042823 sw zero,-1904(s0)
10b6: 800007b7 lui a5,0x80000
10ba: 0207879b addiw a5,a5,32
10be: 88f42a23 sw a5,-1900(s0)
10c2: 89442783 lw a5,-1900(s0)
10c6: 873e mv a4,a5
10c8: 080007b7 lui a5,0x8000
10cc: 8fd9 or a5,a5,a4
10ce: 2781 sext.w a5,a5
10d0: 88f42a23 sw a5,-1900(s0)
10d4: 88042c23 sw zero,-1896(s0)
10d8: 88c42783 lw a5,-1908(s0)
10dc: 4681 li a3,0
10de: 0a000613 li a2,160
10e2: 4581 li a1,0
10e4: 853e mv a0,a5
10e6: a15ff0ef jal ra,afa
10ea: 87aa mv a5,a0
10ec: 2781 sext.w a5,a5
10ee: 88f42e23 sw a5,-1892(s0)
10f2: fd843783 ld a5,-40(s0)
10f6: 2781 sext.w a5,a5
10f8: 8af42023 sw a5,-1888(s0)
10fc: fc043783 ld a5,-64(s0)
1100: 2781 sext.w a5,a5
1102: 8af42223 sw a5,-1884(s0)
1106: 8a042423 sw zero,-1880(s0)
110a: fe442783 lw a5,-28(s0)
110e: 8af42623 sw a5,-1876(s0)
1112: fd043783 ld a5,-48(s0)
1116: 2781 sext.w a5,a5
1118: 8af42823 sw a5,-1872(s0)
111c: fe442783 lw a5,-28(s0)
1120: 8af42a23 sw a5,-1868(s0)
1124: 4785 li a5,1
1126: fef42623 sw a5,-20(s0)
112a: a839 j 1148
112c: fec42783 lw a5,-20(s0)
1130: 0791 addi a5,a5,4
1132: 078e slli a5,a5,0x3
1134: ff040713 addi a4,s0,-16
1138: 97ba add a5,a5,a4
113a: 8a07a223 sw zero,-1884(a5) # 7fff8a4
1156: fc843783 ld a5,-56(s0)
115a: 2781 sext.w a5,a5
115c: 8ef42823 sw a5,-1808(s0)
1160: fe442783 lw a5,-28(s0)
1164: 8ef42a23 sw a5,-1804(s0)
1168: 4785 li a5,1
116a: fef42623 sw a5,-20(s0)
116e: a839 j 118c
1170: fec42783 lw a5,-20(s0)
1174: 07b1 addi a5,a5,12
1176: 078e slli a5,a5,0x3
1178: ff040713 addi a4,s0,-16
117c: 97ba add a5,a5,a4
117e: 8a07a223 sw zero,-1884(a5)
1182: fec42783 lw a5,-20(s0)
1186: 2785 addiw a5,a5,1
1188: fef42623 sw a5,-20(s0)
118c: fec42783 lw a5,-20(s0)
1190: 0007871b sext.w a4,a5
1194: 479d li a5,7
1196: fce7dde3 bge a5,a4,1170
119a: 92042823 sw zero,-1744(s0)
119e: 89040713 addi a4,s0,-1904
11a2: 030417b7 lui a5,0x3041
11a6: 80078793 addi a5,a5,-2048 # 3040800
11de: fe042623 sw zero,-20(s0)
11e2: a83d j 1220
11e4: fec42783 lw a5,-20(s0)
11e8: 87042703 lw a4,-1936(s0)
11ec: 40f707bb subw a5,a4,a5
11f0: 2781 sext.w a5,a5
11f2: 37fd addiw a5,a5,-1
11f4: 2781 sext.w a5,a5
11f6: 02079713 slli a4,a5,0x20
11fa: 9301 srli a4,a4,0x20
11fc: fc843783 ld a5,-56(s0)
1200: 97ba add a5,a5,a4
1202: 86be mv a3,a5
1204: fec42783 lw a5,-20(s0)
1208: 86843703 ld a4,-1944(s0)
120c: 97ba add a5,a5,a4
120e: 0006c703 lbu a4,0(a3)
1212: 00e78023 sb a4,0(a5)
1216: fec42783 lw a5,-20(s0)
121a: 2785 addiw a5,a5,1
121c: fef42623 sw a5,-20(s0)
1220: fec42703 lw a4,-20(s0)
1224: 87042783 lw a5,-1936(s0)
1228: 2781 sext.w a5,a5
122a: faf76de3 bltu a4,a5,11e4
122e: 89042783 lw a5,-1904(s0)
1232: 853e mv a0,a5
1234: a19ff0ef jal ra,c4c
1238: 4781 li a5,0
123a: 853e mv a0,a5
123c: 79813083 ld ra,1944(sp)
1240: 79013403 ld s0,1936(sp)
1244: 7a010113 addi sp,sp,1952
1248: 8082 ret
000000000000124a :
124a: 7169 addi sp,sp,-304
124c: f606 sd ra,296(sp)
124e: f222 sd s0,288(sp)
1250: 1a00 addi s0,sp,304
1252: eca43c23 sd a0,-296(s0)
1256: fe043023 sd zero,-32(s0)
125a: fc042e23 sw zero,-36(s0)
125e: ee840793 addi a5,s0,-280
1262: 07fd addi a5,a5,31
1264: 9b81 andi a5,a5,-32
1266: fef43023 sd a5,-32(s0)
126a: 47a1 li a5,8
126c: fcf42e23 sw a5,-36(s0)
1270: f2840793 addi a5,s0,-216
1274: 0b000613 li a2,176
1278: 4581 li a1,0
127a: 853e mv a0,a5
127c: 5eb080ef jal ra,a066
1280: ee840793 addi a5,s0,-280
1284: 04000613 li a2,64
1288: 4581 li a1,0
128a: 853e mv a0,a5
128c: 5db080ef jal ra,a066
1290: f2042423 sw zero,-216(s0)
1294: 800007b7 lui a5,0x80000
1298: 0307879b addiw a5,a5,48
129c: f2f42623 sw a5,-212(s0)
12a0: fdc42783 lw a5,-36(s0)
12a4: f4f42223 sw a5,-188(s0)
12a8: f4042423 sw zero,-184(s0)
12ac: f4042623 sw zero,-180(s0)
12b0: 4785 li a5,1
12b2: fef42623 sw a5,-20(s0)
12b6: a839 j 12d4
12b8: fec42783 lw a5,-20(s0)
12bc: 0791 addi a5,a5,4
12be: 078e slli a5,a5,0x3
12c0: ff040713 addi a4,s0,-16
12c4: 97ba add a5,a5,a4
12c6: f207ae23 sw zero,-196(a5) # ffffffff7fffff3c
12e2: fe043783 ld a5,-32(s0)
12e6: 2781 sext.w a5,a5
12e8: f8f42423 sw a5,-120(s0)
12ec: fdc42783 lw a5,-36(s0)
12f0: f8f42623 sw a5,-116(s0)
12f4: 4785 li a5,1
12f6: fef42623 sw a5,-20(s0)
12fa: a839 j 1318
12fc: fec42783 lw a5,-20(s0)
1300: 07b1 addi a5,a5,12
1302: 078e slli a5,a5,0x3
1304: ff040713 addi a4,s0,-16
1308: 97ba add a5,a5,a4
130a: f207ae23 sw zero,-196(a5)
130e: fec42783 lw a5,-20(s0)
1312: 2785 addiw a5,a5,1
1314: fef42623 sw a5,-20(s0)
1318: fec42783 lw a5,-20(s0)
131c: 0007871b sext.w a4,a5
1320: 479d li a5,7
1322: fce7dde3 bge a5,a4,12fc
1326: fc042423 sw zero,-56(s0)
132a: a40ff0ef jal ra,56a
132e: f2840713 addi a4,s0,-216
1332: 030417b7 lui a5,0x3041
1336: 80078793 addi a5,a5,-2048 # 3040800
136e: f2842783 lw a5,-216(s0)
1372: 853e mv a0,a5
1374: 8d9ff0ef jal ra,c4c
1378: fe043783 ld a5,-32(s0)
137c: 02000613 li a2,32
1380: 85be mv a1,a5
1382: ed843503 ld a0,-296(s0)
1386: 3e7080ef jal ra,9f6c
138a: 4781 li a5,0
138c: 853e mv a0,a5
138e: 70b2 ld ra,296(sp)
1390: 7412 ld s0,288(sp)
1392: 6155 addi sp,sp,304
1394: 8082 ret
0000000000001396 :
1396: 7139 addi sp,sp,-64
1398: fc06 sd ra,56(sp)
139a: f822 sd s0,48(sp)
139c: f426 sd s1,40(sp)
139e: 0080 addi s0,sp,64
13a0: fca43423 sd a0,-56(s0)
13a4: 87ae mv a5,a1
13a6: fcf42223 sw a5,-60(s0)
13aa: fc042e23 sw zero,-36(s0)
13ae: fc042c23 sw zero,-40(s0)
13b2: fc442783 lw a5,-60(s0)
13b6: 863e mv a2,a5
13b8: 4581 li a1,0
13ba: fc843503 ld a0,-56(s0)
13be: 4a9080ef jal ra,a066
13c2: fc042c23 sw zero,-40(s0)
13c6: fc042e23 sw zero,-36(s0)
13ca: a83d j 1408
13cc: fdc42783 lw a5,-36(s0)
13d0: 0707879b addiw a5,a5,112
13d4: 2781 sext.w a5,a5
13d6: 0007869b sext.w a3,a5
13da: fd846783 lwu a5,-40(s0)
13de: 078a slli a5,a5,0x2
13e0: fc843703 ld a4,-56(s0)
13e4: 00f704b3 add s1,a4,a5
13e8: 8536 mv a0,a3
13ea: 17d060ef jal ra,7d66
13ee: 87aa mv a5,a0
13f0: 2781 sext.w a5,a5
13f2: c09c sw a5,0(s1)
13f4: fdc42783 lw a5,-36(s0)
13f8: 2791 addiw a5,a5,4
13fa: fcf42e23 sw a5,-36(s0)
13fe: fd842783 lw a5,-40(s0)
1402: 2785 addiw a5,a5,1
1404: fcf42c23 sw a5,-40(s0)
1408: fdc42703 lw a4,-36(s0)
140c: fc442783 lw a5,-60(s0)
1410: 2781 sext.w a5,a5
1412: faf76de3 bltu a4,a5,13cc
1416: 4781 li a5,0
1418: 853e mv a0,a5
141a: 70e2 ld ra,56(sp)
141c: 7442 ld s0,48(sp)
141e: 74a2 ld s1,40(sp)
1420: 6121 addi sp,sp,64
1422: 8082 ret
0000000000001424 :
1424: 7179 addi sp,sp,-48
1426: f422 sd s0,40(sp)
1428: 1800 addi s0,sp,48
142a: 87aa mv a5,a0
142c: fcf42e23 sw a5,-36(s0)
1430: fe042623 sw zero,-20(s0)
1434: fe042423 sw zero,-24(s0)
1438: 0001 nop
143a: 030067b7 lui a5,0x3006
143e: 04078793 addi a5,a5,64 # 3006040
1442: 439c lw a5,0(a5)
1444: 2781 sext.w a5,a5
1446: 8ba1 andi a5,a5,8
1448: 2781 sext.w a5,a5
144a: fbe5 bnez a5,143a
144c: 030067b7 lui a5,0x3006
1450: 04078793 addi a5,a5,64 # 3006040
1454: 439c lw a5,0(a5)
1456: fef42623 sw a5,-20(s0)
145a: fec42703 lw a4,-20(s0)
145e: fe0107b7 lui a5,0xfe010
1462: 17f1 addi a5,a5,-4
1464: 8ff9 and a5,a5,a4
1466: fef42623 sw a5,-20(s0)
146a: fdc42783 lw a5,-36(s0)
146e: 0107979b slliw a5,a5,0x10
1472: 0007871b sext.w a4,a5
1476: fec42783 lw a5,-20(s0)
147a: 8fd9 or a5,a5,a4
147c: fef42623 sw a5,-20(s0)
1480: 030067b7 lui a5,0x3006
1484: 04078793 addi a5,a5,64 # 3006040
1488: fec42703 lw a4,-20(s0)
148c: c398 sw a4,0(a5)
148e: fec42703 lw a4,-20(s0)
1492: 77c1 lui a5,0xffff0
1494: 0fc78793 addi a5,a5,252 # ffffffffffff00fc
14a8: 8fd9 or a5,a5,a4
14aa: fef42623 sw a5,-20(s0)
14ae: 030067b7 lui a5,0x3006
14b2: 04078793 addi a5,a5,64 # 3006040
14b6: fec42703 lw a4,-20(s0)
14ba: c398 sw a4,0(a5)
14bc: 0001 nop
14be: 030067b7 lui a5,0x3006
14c2: 04078793 addi a5,a5,64 # 3006040
14c6: 439c lw a5,0(a5)
14c8: 2781 sext.w a5,a5
14ca: 8b89 andi a5,a5,2
14cc: 2781 sext.w a5,a5
14ce: fbe5 bnez a5,14be
14d0: fec42703 lw a4,-20(s0)
14d4: fe0007b7 lui a5,0xfe000
14d8: 0fc78793 addi a5,a5,252 # fffffffffe0000fc
14ea: fec42703 lw a4,-20(s0)
14ee: c398 sw a4,0(a5)
14f0: 030067b7 lui a5,0x3006
14f4: 06078793 addi a5,a5,96 # 3006060
14f8: 439c lw a5,0(a5)
14fa: fef42423 sw a5,-24(s0)
14fe: fe842783 lw a5,-24(s0)
1502: 853e mv a0,a5
1504: 7422 ld s0,40(sp)
1506: 6145 addi sp,sp,48
1508: 8082 ret
000000000000150a :
150a: 7139 addi sp,sp,-64
150c: fc06 sd ra,56(sp)
150e: f822 sd s0,48(sp)
1510: f426 sd s1,40(sp)
1512: 0080 addi s0,sp,64
1514: fca43423 sd a0,-56(s0)
1518: 87ae mv a5,a1
151a: fcf42223 sw a5,-60(s0)
151e: fc042e23 sw zero,-36(s0)
1522: fc042c23 sw zero,-40(s0)
1526: fc442783 lw a5,-60(s0)
152a: 863e mv a2,a5
152c: 4581 li a1,0
152e: fc843503 ld a0,-56(s0)
1532: 335080ef jal ra,a066
1536: fc042c23 sw zero,-40(s0)
153a: fc042e23 sw zero,-36(s0)
153e: a83d j 157c
1540: fdc42783 lw a5,-36(s0)
1544: 0707879b addiw a5,a5,112
1548: 2781 sext.w a5,a5
154a: 0007869b sext.w a3,a5
154e: fd846783 lwu a5,-40(s0)
1552: 078a slli a5,a5,0x2
1554: fc843703 ld a4,-56(s0)
1558: 00f704b3 add s1,a4,a5
155c: 8536 mv a0,a3
155e: ec7ff0ef jal ra,1424
1562: 87aa mv a5,a0
1564: 2781 sext.w a5,a5
1566: c09c sw a5,0(s1)
1568: fdc42783 lw a5,-36(s0)
156c: 2791 addiw a5,a5,4
156e: fcf42e23 sw a5,-36(s0)
1572: fd842783 lw a5,-40(s0)
1576: 2785 addiw a5,a5,1
1578: fcf42c23 sw a5,-40(s0)
157c: fdc42703 lw a4,-36(s0)
1580: fc442783 lw a5,-60(s0)
1584: 2781 sext.w a5,a5
1586: faf76de3 bltu a4,a5,1540
158a: 4781 li a5,0
158c: 853e mv a0,a5
158e: 70e2 ld ra,56(sp)
1590: 7442 ld s0,48(sp)
1592: 74a2 ld s1,40(sp)
1594: 6121 addi sp,sp,64
1596: 8082 ret
0000000000001598 :
1598: 7139 addi sp,sp,-64
159a: fc22 sd s0,56(sp)
159c: 0080 addi s0,sp,64
159e: fca43c23 sd a0,-40(s0)
15a2: 87ae mv a5,a1
15a4: fcc43423 sd a2,-56(s0)
15a8: fcf42a23 sw a5,-44(s0)
15ac: fe042623 sw zero,-20(s0)
15b0: fd843783 ld a5,-40(s0)
15b4: 0007c783 lbu a5,0(a5)
15b8: 873e mv a4,a5
15ba: 03000793 li a5,48
15be: 04f71b63 bne a4,a5,1614
15c2: fd843783 ld a5,-40(s0)
15c6: 0785 addi a5,a5,1
15c8: 0007c783 lbu a5,0(a5)
15cc: fef42623 sw a5,-20(s0)
15d0: fec42783 lw a5,-20(s0)
15d4: 2789 addiw a5,a5,2
15d6: fef42623 sw a5,-20(s0)
15da: fec42783 lw a5,-20(s0)
15de: 0007871b sext.w a4,a5
15e2: 07f00793 li a5,127
15e6: 00e7ea63 bltu a5,a4,15fa
15ea: fec42703 lw a4,-20(s0)
15ee: fd442783 lw a5,-44(s0)
15f2: 2701 sext.w a4,a4
15f4: 2781 sext.w a5,a5
15f6: 00f76463 bltu a4,a5,15fe
15fa: 57fd li a5,-1
15fc: a829 j 1616
15fe: fec46783 lwu a5,-20(s0)
1602: fd843703 ld a4,-40(s0)
1606: 973e add a4,a4,a5
1608: fc843783 ld a5,-56(s0)
160c: e398 sd a4,0(a5)
160e: fec42783 lw a5,-20(s0)
1612: a011 j 1616
1614: 57fd li a5,-1
1616: 853e mv a0,a5
1618: 7462 ld s0,56(sp)
161a: 6121 addi sp,sp,64
161c: 8082 ret
000000000000161e :
161e: 7179 addi sp,sp,-48
1620: f406 sd ra,40(sp)
1622: f022 sd s0,32(sp)
1624: 1800 addi s0,sp,48
1626: 87aa mv a5,a0
1628: feb43023 sd a1,-32(s0)
162c: 8732 mv a4,a2
162e: fcd43c23 sd a3,-40(s0)
1632: fef42623 sw a5,-20(s0)
1636: 87ba mv a5,a4
1638: fef42423 sw a5,-24(s0)
163c: fe842783 lw a5,-24(s0)
1640: 863e mv a2,a5
1642: 4581 li a1,0
1644: fe043503 ld a0,-32(s0)
1648: 0a3080ef jal ra,9eea
164c: fec42783 lw a5,-20(s0)
1650: 0007871b sext.w a4,a5
1654: 07f00793 li a5,127
1658: 00e7ef63 bltu a5,a4,1676
165c: fec42783 lw a5,-20(s0)
1660: 0ff7f713 andi a4,a5,255
1664: fe043783 ld a5,-32(s0)
1668: 00e78023 sb a4,0(a5)
166c: fd843783 ld a5,-40(s0)
1670: 4705 li a4,1
1672: c398 sw a4,0(a5)
1674: a8d5 j 1768
1676: fec42783 lw a5,-20(s0)
167a: 0007871b sext.w a4,a5
167e: 0ff00793 li a5,255
1682: 02e7e663 bltu a5,a4,16ae
1686: fe043783 ld a5,-32(s0)
168a: f8100713 li a4,-127
168e: 00e78023 sb a4,0(a5)
1692: fe043783 ld a5,-32(s0)
1696: 0785 addi a5,a5,1
1698: fec42703 lw a4,-20(s0)
169c: 0ff77713 andi a4,a4,255
16a0: 00e78023 sb a4,0(a5)
16a4: fd843783 ld a5,-40(s0)
16a8: 4709 li a4,2
16aa: c398 sw a4,0(a5)
16ac: a875 j 1768
16ae: fec42783 lw a5,-20(s0)
16b2: 0007871b sext.w a4,a5
16b6: 67c1 lui a5,0x10
16b8: 04f77363 bgeu a4,a5,16fe
16bc: fe043783 ld a5,-32(s0)
16c0: f8200713 li a4,-126
16c4: 00e78023 sb a4,0(a5) # 10000
16c8: fec42783 lw a5,-20(s0)
16cc: 0087d79b srliw a5,a5,0x8
16d0: 0007871b sext.w a4,a5
16d4: fe043783 ld a5,-32(s0)
16d8: 0785 addi a5,a5,1
16da: 0ff77713 andi a4,a4,255
16de: 00e78023 sb a4,0(a5)
16e2: fe043783 ld a5,-32(s0)
16e6: 0789 addi a5,a5,2
16e8: fec42703 lw a4,-20(s0)
16ec: 0ff77713 andi a4,a4,255
16f0: 00e78023 sb a4,0(a5)
16f4: fd843783 ld a5,-40(s0)
16f8: 470d li a4,3
16fa: c398 sw a4,0(a5)
16fc: a0b5 j 1768
16fe: fec42783 lw a5,-20(s0)
1702: 0007871b sext.w a4,a5
1706: 010007b7 lui a5,0x1000
170a: 04f77f63 bgeu a4,a5,1768
170e: fe043783 ld a5,-32(s0)
1712: f8300713 li a4,-125
1716: 00e78023 sb a4,0(a5) # 1000000
171a: fec42783 lw a5,-20(s0)
171e: 0107d79b srliw a5,a5,0x10
1722: 0007871b sext.w a4,a5
1726: fe043783 ld a5,-32(s0)
172a: 0785 addi a5,a5,1
172c: 0ff77713 andi a4,a4,255
1730: 00e78023 sb a4,0(a5)
1734: fec42783 lw a5,-20(s0)
1738: 0087d79b srliw a5,a5,0x8
173c: 0007871b sext.w a4,a5
1740: fe043783 ld a5,-32(s0)
1744: 0789 addi a5,a5,2
1746: 0ff77713 andi a4,a4,255
174a: 00e78023 sb a4,0(a5)
174e: fe043783 ld a5,-32(s0)
1752: 078d addi a5,a5,3
1754: fec42703 lw a4,-20(s0)
1758: 0ff77713 andi a4,a4,255
175c: 00e78023 sb a4,0(a5)
1760: fd843783 ld a5,-40(s0)
1764: 4711 li a4,4
1766: c398 sw a4,0(a5)
1768: 0001 nop
176a: 70a2 ld ra,40(sp)
176c: 7402 ld s0,32(sp)
176e: 6145 addi sp,sp,48
1770: 8082 ret
0000000000001772 :
1772: 711d addi sp,sp,-96
1774: ec86 sd ra,88(sp)
1776: e8a2 sd s0,80(sp)
1778: 1080 addi s0,sp,96
177a: fca43423 sd a0,-56(s0)
177e: fcb43023 sd a1,-64(s0)
1782: fac43c23 sd a2,-72(s0)
1786: fad43823 sd a3,-80(s0)
178a: 87ba mv a5,a4
178c: faf42623 sw a5,-84(s0)
1790: fc843783 ld a5,-56(s0)
1794: fef43423 sd a5,-24(s0)
1798: fe042223 sw zero,-28(s0)
179c: fe042023 sw zero,-32(s0)
17a0: fc042e23 sw zero,-36(s0)
17a4: fc043783 ld a5,-64(s0)
17a8: cb89 beqz a5,17ba
17aa: fac42783 lw a5,-84(s0)
17ae: 863e mv a2,a5
17b0: 4581 li a1,0
17b2: fc043503 ld a0,-64(s0)
17b6: 0b1080ef jal ra,a066
17ba: fe843783 ld a5,-24(s0)
17be: 0785 addi a5,a5,1
17c0: 0007c783 lbu a5,0(a5)
17c4: 0187979b slliw a5,a5,0x18
17c8: 4187d79b sraiw a5,a5,0x18
17cc: 0607cc63 bltz a5,1844
17d0: fe843783 ld a5,-24(s0)
17d4: 0785 addi a5,a5,1
17d6: 0007c783 lbu a5,0(a5)
17da: fef42223 sw a5,-28(s0)
17de: fe442783 lw a5,-28(s0)
17e2: 2789 addiw a5,a5,2
17e4: 0007871b sext.w a4,a5
17e8: fb043783 ld a5,-80(s0)
17ec: c398 sw a4,0(a5)
17ee: fe442783 lw a5,-28(s0)
17f2: 8b85 andi a5,a5,1
17f4: 0ff7f793 andi a5,a5,255
17f8: cf99 beqz a5,1816
17fa: fe843783 ld a5,-24(s0)
17fe: 0789 addi a5,a5,2
1800: 0007c783 lbu a5,0(a5)
1804: eb89 bnez a5,1816
1806: 4785 li a5,1
1808: fef42023 sw a5,-32(s0)
180c: fe442783 lw a5,-28(s0)
1810: 37fd addiw a5,a5,-1
1812: fef42223 sw a5,-28(s0)
1816: fb843783 ld a5,-72(s0)
181a: fe442703 lw a4,-28(s0)
181e: c398 sw a4,0(a5)
1820: fe843783 ld a5,-24(s0)
1824: 0789 addi a5,a5,2
1826: fef43423 sd a5,-24(s0)
182a: fe042783 lw a5,-32(s0)
182e: 2781 sext.w a5,a5
1830: c791 beqz a5,183c
1832: fe843783 ld a5,-24(s0)
1836: 0785 addi a5,a5,1
1838: fef43423 sd a5,-24(s0)
183c: 4785 li a5,1
183e: fcf42e23 sw a5,-36(s0)
1842: aa39 j 1960
1844: fe843783 ld a5,-24(s0)
1848: 0785 addi a5,a5,1
184a: 0007c783 lbu a5,0(a5)
184e: 873e mv a4,a5
1850: 08100793 li a5,129
1854: 06f71c63 bne a4,a5,18cc
1858: fe843783 ld a5,-24(s0)
185c: 0789 addi a5,a5,2
185e: 0007c783 lbu a5,0(a5)
1862: fef42223 sw a5,-28(s0)
1866: fe442783 lw a5,-28(s0)
186a: 278d addiw a5,a5,3
186c: 0007871b sext.w a4,a5
1870: fb043783 ld a5,-80(s0)
1874: c398 sw a4,0(a5)
1876: fe442783 lw a5,-28(s0)
187a: 8b85 andi a5,a5,1
187c: 0ff7f793 andi a5,a5,255
1880: cf99 beqz a5,189e
1882: fe843783 ld a5,-24(s0)
1886: 078d addi a5,a5,3
1888: 0007c783 lbu a5,0(a5)
188c: eb89 bnez a5,189e
188e: 4785 li a5,1
1890: fef42023 sw a5,-32(s0)
1894: fe442783 lw a5,-28(s0)
1898: 37fd addiw a5,a5,-1
189a: fef42223 sw a5,-28(s0)
189e: fb843783 ld a5,-72(s0)
18a2: fe442703 lw a4,-28(s0)
18a6: c398 sw a4,0(a5)
18a8: fe843783 ld a5,-24(s0)
18ac: 078d addi a5,a5,3
18ae: fef43423 sd a5,-24(s0)
18b2: fe042783 lw a5,-32(s0)
18b6: 2781 sext.w a5,a5
18b8: c791 beqz a5,18c4
18ba: fe843783 ld a5,-24(s0)
18be: 0785 addi a5,a5,1
18c0: fef43423 sd a5,-24(s0)
18c4: 4789 li a5,2
18c6: fcf42e23 sw a5,-36(s0)
18ca: a859 j 1960
18cc: fe843783 ld a5,-24(s0)
18d0: 0785 addi a5,a5,1
18d2: 0007c783 lbu a5,0(a5)
18d6: 873e mv a4,a5
18d8: 08200793 li a5,130
18dc: 08f71263 bne a4,a5,1960
18e0: fe843783 ld a5,-24(s0)
18e4: 0789 addi a5,a5,2
18e6: 0007c783 lbu a5,0(a5)
18ea: 2781 sext.w a5,a5
18ec: 0087979b slliw a5,a5,0x8
18f0: 0007871b sext.w a4,a5
18f4: fe843783 ld a5,-24(s0)
18f8: 078d addi a5,a5,3
18fa: 0007c783 lbu a5,0(a5)
18fe: 2781 sext.w a5,a5
1900: 8fd9 or a5,a5,a4
1902: 2781 sext.w a5,a5
1904: fef42223 sw a5,-28(s0)
1908: fe442783 lw a5,-28(s0)
190c: 2791 addiw a5,a5,4
190e: 0007871b sext.w a4,a5
1912: fb043783 ld a5,-80(s0)
1916: c398 sw a4,0(a5)
1918: fe442783 lw a5,-28(s0)
191c: 8b85 andi a5,a5,1
191e: 0ff7f793 andi a5,a5,255
1922: cb89 beqz a5,1934
1924: 4785 li a5,1
1926: fef42023 sw a5,-32(s0)
192a: fe442783 lw a5,-28(s0)
192e: 37fd addiw a5,a5,-1
1930: fef42223 sw a5,-28(s0)
1934: fb843783 ld a5,-72(s0)
1938: fe442703 lw a4,-28(s0)
193c: c398 sw a4,0(a5)
193e: fe843783 ld a5,-24(s0)
1942: 0791 addi a5,a5,4
1944: fef43423 sd a5,-24(s0)
1948: fe042783 lw a5,-32(s0)
194c: 2781 sext.w a5,a5
194e: c791 beqz a5,195a
1950: fe843783 ld a5,-24(s0)
1954: 0785 addi a5,a5,1
1956: fef43423 sd a5,-24(s0)
195a: 478d li a5,3
195c: fcf42e23 sw a5,-36(s0)
1960: fc043783 ld a5,-64(s0)
1964: c795 beqz a5,1990
1966: fe442703 lw a4,-28(s0)
196a: fac42783 lw a5,-84(s0)
196e: 2701 sext.w a4,a4
1970: 2781 sext.w a5,a5
1972: 00e7f663 bgeu a5,a4,197e
1976: fac42783 lw a5,-84(s0)
197a: fef42223 sw a5,-28(s0)
197e: fe442783 lw a5,-28(s0)
1982: 863e mv a2,a5
1984: fe843583 ld a1,-24(s0)
1988: fc043503 ld a0,-64(s0)
198c: 5ae080ef jal ra,9f3a
1990: fdc42783 lw a5,-36(s0)
1994: 853e mv a0,a5
1996: 60e6 ld ra,88(sp)
1998: 6446 ld s0,80(sp)
199a: 6125 addi sp,sp,96
199c: 8082 ret
000000000000199e :
199e: 715d addi sp,sp,-80
19a0: e486 sd ra,72(sp)
19a2: e0a2 sd s0,64(sp)
19a4: 0880 addi s0,sp,80
19a6: fca43423 sd a0,-56(s0)
19aa: 87ae mv a5,a1
19ac: fac43c23 sd a2,-72(s0)
19b0: fcf42223 sw a5,-60(s0)
19b4: fc843783 ld a5,-56(s0)
19b8: fef43423 sd a5,-24(s0)
19bc: fc843783 ld a5,-56(s0)
19c0: fef43023 sd a5,-32(s0)
19c4: fc042e23 sw zero,-36(s0)
19c8: fc042c23 sw zero,-40(s0)
19cc: fe843783 ld a5,-24(s0)
19d0: 0785 addi a5,a5,1
19d2: fef43423 sd a5,-24(s0)
19d6: fe843783 ld a5,-24(s0)
19da: 0785 addi a5,a5,1
19dc: fef43423 sd a5,-24(s0)
19e0: fb843783 ld a5,-72(s0)
19e4: fdc40693 addi a3,s0,-36
19e8: fd840613 addi a2,s0,-40
19ec: 4711 li a4,4
19ee: 85be mv a1,a5
19f0: fe843503 ld a0,-24(s0)
19f4: d7fff0ef jal ra,1772
19f8: fdc42783 lw a5,-36(s0)
19fc: 1782 slli a5,a5,0x20
19fe: 9381 srli a5,a5,0x20
1a00: fe843703 ld a4,-24(s0)
1a04: 97ba add a5,a5,a4
1a06: fef43423 sd a5,-24(s0)
1a0a: fb843783 ld a5,-72(s0)
1a0e: 0791 addi a5,a5,4
1a10: fdc40693 addi a3,s0,-36
1a14: fd840613 addi a2,s0,-40
1a18: 4711 li a4,4
1a1a: 85be mv a1,a5
1a1c: fe843503 ld a0,-24(s0)
1a20: d53ff0ef jal ra,1772