Yay, first working version.

Might randomly crash, leak memory in tons or just yield
wrong results. But it's a nice proof of concept.

Test-main:
$ clang $(ls src/*.c | grep -v main.c) src/checksums/*.c src/formats/*.c \
  src/libart/*.c  -std=c99  $(pkg-config --libs --cflags blkid glib-2.0) -Wall \
  -Wextra -D_RM_COMPILE_MAIN -D_BSD_SOURCE -Wall -Wextra -D_GNU_SOURCE \
  -DHAVE_BLKID=1 -lelf -lm -D_RM_COMPILE_MAIN_TM_ALL -ggdb3
$ find $(realpath tree) -type f | glibvg --leak-check=yes  ./a.out $(realpath tree)
Adding /home/sahib/rmlint/tree/sub4/a 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/sub4/diff 1fecde50989a40a26e612d6a0fb59c23
Encountered full directory: /home/sahib/rmlint/tree/sub4
Adding /home/sahib/rmlint/tree/top/sub1/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/top/sub1/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/top/sub1
Adding /home/sahib/rmlint/tree/top/sub2/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/top/sub2/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/top/sub2
Adding /home/sahib/rmlint/tree/sub3/b 2e505e3139f7b198992517e0eb56f9fa
Adding /home/sahib/rmlint/tree/sub3/a 2e505e3139f7b198992517e0eb56f9fa
Encountered full directory: /home/sahib/rmlint/tree/sub3

Results:

3163ee7262bca05c /home/sahib/rmlint/tree/sub3
3163ee7262bca05c /home/sahib/rmlint/tree/top/sub2
3163ee7262bca05c /home/sahib/rmlint/tree/top/sub1
--

Dupes among other files:

  /home/sahib/rmlint/tree/sub4/diff
  /home/sahib/rmlint/tree/sub4/a
  /home/sahib/rmlint/tree/sub4/b
--