Create bootable ISOs on macOS without external tools

How to make bootable disk images on macOS using `dd` without external tools.