reading a port on an STM32 bluepill like PINx on an AVR?

On an AVR I can read the state of pins on a port with something like this, for example

aValue = (PIND & 0b00000100) >> 2;

on my Teensy I use this...

aValue = (GPIOD_PDIR & 0b01000000) >> 6;

I have a Bluepill STM32F103C8T6 and it works in the Arduio IDE just fine.
I can use plain old

aValue = digitalRead(2);

but how would I do this using ports like my other examples?

I DO realize that if the variable is a bool I don't need to add the >> because anything other than 0 will be a 1 but those are just examples.

Which st core are you using?

Yeah, theres a register on the stm32s that you can read in a similar way. Should be covered in the datasheet (it's a pain to find the good datasheet from stm- their datasheets are super terse with little information in them, and all the good stuff is in one giant document for the whole family of parts, and you have to wade through all these sections that arent relevant to the specific device you're using).

I forget if the registers on stm32 are 16 or 32 bit.

Which st core are you using?

Hmm.. I'm not exactly sure what I'm doing so all I can say is that it shows up on my computer as a Maple MINI and I program it over USB with the STM32duino bootloader.

When I compile a sketch it says " C:\Users\dentaku\Documents\Arduino\hardware\Arduino_STM32\STM32F1\cores\maple "

Is that what you mean?

I'm pretty sure i will be something like GPIOx->IDR for the Input Data Register.

later after a bit more searching....
How to set bits in C and write to STM32 GPIO registers using Arduino IDE ยท GitHub has some interesting looking information.
I'll have to read it and see if I understand any of it.