This works:
F:\mingw-w64\i686-8.1.0-win32-dwarf-rt_v6-rev0\mingw32\bin\gcc.exe -O3 main.c helper.c -o mingw32.exe
for 64-bit:
F:\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin\gcc.exe -O3 main.c helper.c -o mingw.exe
gcc.exe -O3 main.c helper.c -o mingw32.exe
C:\Users\Jochen\AppData\Local\Temp\ccvWYXHh.o:main.c:(.text.startup+0xc0): undefined reference to `getcpuBrandString'
collect2.exe: error: ld returned 1 exit status
Now using an extremely old release to make it work for JJ

F:\mingw-w64\x86_64-4.8.1-release-win32-sjlj-rt_v3-rev2\bin\gcc.exe -O3 -m32 main.c helper.c -o mingw32.exe
Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
C compiler: MingW64/i686 3.0 (gcc 4.8 patchlevel 1)
Elapsed time: 8367.289800 miliseconds
64-bit:
F:\mingw-w64\x86_64-4.8.1-release-win32-sjlj-rt_v3-rev2\bin\gcc.exe -O3 main.c helper.c -o mingw.exe
Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
C compiler: MingW64/x64 3.0 (gcc 4.8 patchlevel 1)
Elapsed time: 6691.113800 miliseconds