Get elements from a getelementptr constant expression

If what is needed is to simply extract the operands of a getelementptr
constant expression, I wrote a simple example here:
https://github.com/analysis-examples/gep-expr-example

Best,
Andrew