#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _assertEqualsS(char *, char *, char *, int);
int /*<<< orphan*/ formatFrequencies(char *, int, int *, int);
double getElapsedSecondsSince(struct timeval *);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  struct timeval start;
  gettimeofday(&start, 0);
  char result[32];
  {
    int frequencies[8] = {1000000, 800000, 1400000, 1200000};
    formatFrequencies(result, 32, frequencies, 4);
    _assertEqualsS(result, "1.4₁1.2₁1.0₁0.8₁",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   70);
  }
  {
    int frequencies[8] = {800000, 800000, 800000, 800000};
    formatFrequencies(result, 32, frequencies, 4);
    _assertEqualsS(result, "0.8 GHz",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   76);
  }
  {
    int frequencies[8] = {1400000, 800000, 800000, 800000};
    formatFrequencies(result, 32, frequencies, 4);
    _assertEqualsS(result, "1.4₁0.8₃",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   82);
  }
  {
    int frequencies[8] = {1400000, 1400000, 800000, 800000};
    formatFrequencies(result, 32, frequencies, 4);
    _assertEqualsS(result, "1.4₂0.8₂",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   88);
  }
  {
    int frequencies[8] = {1400000, 1400000, 800000, 800000, 800000};
    formatFrequencies(result, 32, frequencies, 4);
    _assertEqualsS(result, "1.4₂0.8₂",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   94);
  }
  {
    int frequencies[8] = {1000000, 800000, 1400000, 1200000};
    formatFrequencies(result, 3, frequencies, 4);
    _assertEqualsS(result, "",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   100);
  }
  {
    int frequencies[8] = {1000000, 800000, 1400000, 1200000};
    formatFrequencies(result, 7, frequencies, 4);
    _assertEqualsS(result, "1.4₁",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   106);
  }
  {
    int frequencies[8] = {1000000, 800000, 1400000, 1200000};
    formatFrequencies(result, 14, frequencies, 4);
    _assertEqualsS(result, "1.4₁1.2₁",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   112);
  }
  {
    int frequencies[16] = {1200000, 1200000, 1200000, 1200000, 1200000,
                           1200000, 1200000, 1200000, 1200000, 1000000};
    formatFrequencies(result, 32, frequencies, 10);
    _assertEqualsS(result, "1.2₉1.0₁",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   118);
  }
  {
    int frequencies[16] = {1200000, 1200000, 1200000, 1200000,
                           1200000, 1200000, 1200000, 1200000,
                           1200000, 1200000, 1200000, 1000000};
    formatFrequencies(result, 32, frequencies, 12);
    _assertEqualsS(result, "1.2₊1.0₁",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/"
                   "refs/heads/master/formatter-test.c",
                   124);
  }
  printf("%f seconds\n", getElapsedSecondsSince(&start));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
mov    0xe7c(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe79(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe76(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe73(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xed5(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x46,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xe3d(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe3a(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe37(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe34(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x70(%rbp),%rdx
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xf23(%rip),%rsi
lea    0xe88(%rip),%rdx
mov    $0x4c,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xdfe(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xdf8(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xdf2(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xdef(%rip),%rax
mov    %rax,-0x78(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x90(%rbp),%rdx
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xec3(%rip),%rsi
lea    0xe20(%rip),%rdx
mov    $0x52,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xdb6(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xdb0(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xdaa(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xda4(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0xb0(%rbp),%rdx
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xe62(%rip),%rsi
lea    0xdb2(%rip),%rdx
mov    $0x58,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xd68(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0xd62(%rip),%rax
mov    %rax,-0xc8(%rbp)
mov    0xd5c(%rip),%rax
mov    %rax,-0xc0(%rbp)
mov    0xd56(%rip),%rax
mov    %rax,-0xb8(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0xd0(%rbp),%rdx
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xdf4(%rip),%rsi
lea    0xd44(%rip),%rdx
mov    $0x5e,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xc7a(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xc74(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xc6e(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xc68(%rip),%rax
mov    %rax,-0xd8(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0xf0(%rbp),%rdx
mov    $0x3,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xdcc(%rip),%rsi
lea    0xcd6(%rip),%rdx
mov    $0x64,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xc0c(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xc06(%rip),%rax
mov    %rax,-0x108(%rbp)
mov    0xc00(%rip),%rax
mov    %rax,-0x100(%rbp)
mov    0xbfa(%rip),%rax
mov    %rax,-0xf8(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x110(%rbp),%rdx
mov    $0x7,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xd25(%rip),%rsi
lea    0xc68(%rip),%rdx
mov    $0x6a,%ecx
call   1070 <_assertEqualsS@plt>
mov    0xb9e(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0xb98(%rip),%rax
mov    %rax,-0x128(%rbp)
mov    0xb92(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0xb8c(%rip),%rax
mov    %rax,-0x118(%rbp)
lea    -0x30(%rbp),%rdi
lea    -0x130(%rbp),%rdx
mov    $0xe,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xcbe(%rip),%rsi
lea    0xbfa(%rip),%rdx
mov    $0x70,%ecx
call   1070 <_assertEqualsS@plt>
lea    -0x170(%rbp),%rdi
lea    0xcd9(%rip),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x170(%rbp),%rdx
mov    $0x20,%esi
mov    $0xa,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xc7d(%rip),%rsi
lea    0xbac(%rip),%rdx
mov    $0x76,%ecx
call   1070 <_assertEqualsS@plt>
lea    -0x1b0(%rbp),%rdi
lea    0xccb(%rip),%rsi
mov    $0x40,%edx
call   1080 <memcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x1b0(%rbp),%rdx
mov    $0x20,%esi
mov    $0xc,%ecx
call   1030 <formatFrequencies@plt>
lea    -0x30(%rbp),%rdi
lea    0xc3c(%rip),%rsi
lea    0xb5e(%rip),%rdx
mov    $0x7c,%ecx
call   1070 <_assertEqualsS@plt>
lea    -0x8(%rbp),%rdi
call   1050 <getElapsedSecondsSince@plt>
lea    0xc28(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0x48(%rsp),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <gettimeofday@plt>
movaps 0x102f(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x1013(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x50(%rsp),%rbx
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xe5e(%rip),%rsi
lea    0xe70(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x46,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xf60(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xf44(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xec1(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x4c,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xf3d(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xf21(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xe86(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x52,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xf1a(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xefe(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xe50(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    $0x58,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    $0x5e,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xe11(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x64,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xe92(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe76(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xd95(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x6a,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xe4f(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe33(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0xe,%esi
mov    $0x4,%ecx
call   1030 <formatFrequencies@plt>
lea    0xd59(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x70,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xe4c(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe30(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe14(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xdf8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0xa,%ecx
call   1030 <formatFrequencies@plt>
lea    0xd0b(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x76,%ecx
call   1070 <_assertEqualsS@plt>
movaps 0xe31(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe15(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xdf9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xddd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0xc,%ecx
call   1030 <formatFrequencies@plt>
lea    0xcbd(%rip),%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    $0x7c,%ecx
call   1070 <_assertEqualsS@plt>
mov    %r14,%rdi
call   1050 <getElapsedSecondsSince@plt>
lea    0xcab(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
@__const.main.frequencies = [8 x i32] [i32 1000000, i32 800000, i32 1400000, i32 1200000, i32 0, i32 0, i32 0, i32 0]
@.str = [25 x i8] c"1.4\E2\82\811.2\E2\82\811.0\E2\82\810.8\E2\82\81\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/refs/heads/master/formatter-test.c\00"
@__const.main.frequencies.2 = [8 x i32] [i32 800000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.3 = [8 x i8] c"0.8 GHz\00"
@__const.main.frequencies.4 = [8 x i32] [i32 1400000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.5 = [13 x i8] c"1.4\E2\82\810.8\E2\82\83\00"
@__const.main.frequencies.6 = [8 x i32] [i32 1400000, i32 1400000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.7 = [13 x i8] c"1.4\E2\82\820.8\E2\82\82\00"
@__const.main.frequencies.8 = [8 x i32] [i32 1400000, i32 1400000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0]
@__const.main.frequencies.9 = [8 x i32] [i32 1000000, i32 800000, i32 1400000, i32 1200000, i32 0, i32 0, i32 0, i32 0]
@.str.10 = [1 x i8] zeroinitializer
@__const.main.frequencies.11 = [8 x i32] [i32 1000000, i32 800000, i32 1400000, i32 1200000, i32 0, i32 0, i32 0, i32 0]
@.str.12 = [7 x i8] c"1.4\E2\82\81\00"
@__const.main.frequencies.13 = [8 x i32] [i32 1000000, i32 800000, i32 1400000, i32 1200000, i32 0, i32 0, i32 0, i32 0]
@.str.14 = [13 x i8] c"1.4\E2\82\811.2\E2\82\81\00"
@__const.main.frequencies.15 = [16 x i32] [i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1000000, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]
@.str.16 = [13 x i8] c"1.2\E2\82\891.0\E2\82\81\00"
@__const.main.frequencies.17 = [16 x i32] [i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1000000, i32 0, i32 0, i32 0, i32 0]
@.str.18 = [13 x i8] c"1.2\E2\82\8A1.0\E2\82\81\00"
@.str.19 = [12 x i8] c"%f seconds\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca [32 x i8]
%4 = alloca [8 x i32]
%5 = alloca [8 x i32]
%6 = alloca [8 x i32]
%7 = alloca [8 x i32]
%8 = alloca [8 x i32]
%9 = alloca [8 x i32]
%10 = alloca [8 x i32]
%11 = alloca [8 x i32]
%12 = alloca [16 x i32]
%13 = alloca [16 x i32]
store i32 0, i32* %1
%14 = call i32 @gettimeofday(%struct.timeval* %2, i32 0)
%15 = bitcast [8 x i32]* %4 to i8*
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%17 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%18 = call i32 @formatFrequencies(i8* %16, i32 32, i32* %17, i32 4)
%19 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%20 = call i32 @_assertEqualsS(i8* %19, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 70)
%21 = bitcast [8 x i32]* %5 to i8*
%22 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%23 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%24 = call i32 @formatFrequencies(i8* %22, i32 32, i32* %23, i32 4)
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%26 = call i32 @_assertEqualsS(i8* %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 76)
%27 = bitcast [8 x i32]* %6 to i8*
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%29 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%30 = call i32 @formatFrequencies(i8* %28, i32 32, i32* %29, i32 4)
%31 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%32 = call i32 @_assertEqualsS(i8* %31, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 82)
%33 = bitcast [8 x i32]* %7 to i8*
%34 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%35 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%36 = call i32 @formatFrequencies(i8* %34, i32 32, i32* %35, i32 4)
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%38 = call i32 @_assertEqualsS(i8* %37, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 88)
%39 = bitcast [8 x i32]* %8 to i8*
%40 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%41 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%42 = call i32 @formatFrequencies(i8* %40, i32 32, i32* %41, i32 4)
%43 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%44 = call i32 @_assertEqualsS(i8* %43, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 94)
%45 = bitcast [8 x i32]* %9 to i8*
%46 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%47 = getelementptr inbounds [8 x i32], [8 x i32]* %9, i64 0, i64 0
%48 = call i32 @formatFrequencies(i8* %46, i32 3, i32* %47, i32 4)
%49 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%50 = call i32 @_assertEqualsS(i8* %49, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 100)
%51 = bitcast [8 x i32]* %10 to i8*
%52 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%53 = getelementptr inbounds [8 x i32], [8 x i32]* %10, i64 0, i64 0
%54 = call i32 @formatFrequencies(i8* %52, i32 7, i32* %53, i32 4)
%55 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%56 = call i32 @_assertEqualsS(i8* %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 106)
%57 = bitcast [8 x i32]* %11 to i8*
%58 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%59 = getelementptr inbounds [8 x i32], [8 x i32]* %11, i64 0, i64 0
%60 = call i32 @formatFrequencies(i8* %58, i32 14, i32* %59, i32 4)
%61 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%62 = call i32 @_assertEqualsS(i8* %61, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 112)
%63 = bitcast [16 x i32]* %12 to i8*
%64 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%65 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 0
%66 = call i32 @formatFrequencies(i8* %64, i32 32, i32* %65, i32 10)
%67 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%68 = call i32 @_assertEqualsS(i8* %67, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 118)
%69 = bitcast [16 x i32]* %13 to i8*
%70 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%71 = getelementptr inbounds [16 x i32], [16 x i32]* %13, i64 0, i64 0
%72 = call i32 @formatFrequencies(i8* %70, i32 32, i32* %71, i32 12)
%73 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%74 = call i32 @_assertEqualsS(i8* %73, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 124)
%75 = call double @getElapsedSecondsSince(%struct.timeval* %2)
%76 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), double %75)
ret i32 0
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
@.str = [25 x i8] c"1.4\E2\82\811.2\E2\82\811.0\E2\82\810.8\E2\82\81\00"
@.str.1 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rhersen/gkrellm-gkfreq/refs/heads/master/formatter-test.c\00"
@__const.main.frequencies.2 = [8 x i32] [i32 800000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.3 = [8 x i8] c"0.8 GHz\00"
@__const.main.frequencies.4 = [8 x i32] [i32 1400000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.5 = [13 x i8] c"1.4\E2\82\810.8\E2\82\83\00"
@__const.main.frequencies.6 = [8 x i32] [i32 1400000, i32 1400000, i32 800000, i32 800000, i32 0, i32 0, i32 0, i32 0]
@.str.7 = [13 x i8] c"1.4\E2\82\820.8\E2\82\82\00"
@__const.main.frequencies.8 = [8 x i32] [i32 1400000, i32 1400000, i32 800000, i32 800000, i32 800000, i32 0, i32 0, i32 0]
@.str.10 = [1 x i8] zeroinitializer
@.str.12 = [7 x i8] c"1.4\E2\82\81\00"
@__const.main.frequencies.13 = [8 x i32] [i32 1000000, i32 800000, i32 1400000, i32 1200000, i32 0, i32 0, i32 0, i32 0]
@.str.14 = [13 x i8] c"1.4\E2\82\811.2\E2\82\81\00"
@__const.main.frequencies.15 = [16 x i32] [i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1000000, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0]
@.str.16 = [13 x i8] c"1.2\E2\82\891.0\E2\82\81\00"
@__const.main.frequencies.17 = [16 x i32] [i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1200000, i32 1000000, i32 0, i32 0, i32 0, i32 0]
@.str.18 = [13 x i8] c"1.2\E2\82\8A1.0\E2\82\81\00"
@.str.19 = [12 x i8] c"%f seconds\0A\00"
define i32 @main() {
%1 = alloca %struct.timeval
%2 = alloca [32 x i8]
%3 = alloca [8 x i32]
%4 = alloca [8 x i32]
%5 = alloca [8 x i32]
%6 = alloca [8 x i32]
%7 = alloca [8 x i32]
%8 = alloca [8 x i32]
%9 = alloca [8 x i32]
%10 = alloca [8 x i32]
%11 = alloca [16 x i32]
%12 = alloca [16 x i32]
%13 = bitcast %struct.timeval* %1 to i8*
%14 = call i32 @gettimeofday(%struct.timeval* %1, i32 0)
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%16 = bitcast [8 x i32]* %3 to i8*
%17 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
%18 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %17, i32 4)
%19 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 70)
%20 = bitcast [8 x i32]* %4 to i8*
%21 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%22 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %21, i32 4)
%23 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 76)
%24 = bitcast [8 x i32]* %5 to i8*
%25 = getelementptr inbounds [8 x i32], [8 x i32]* %5, i64 0, i64 0
%26 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %25, i32 4)
%27 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 82)
%28 = bitcast [8 x i32]* %6 to i8*
%29 = getelementptr inbounds [8 x i32], [8 x i32]* %6, i64 0, i64 0
%30 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %29, i32 4)
%31 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 88)
%32 = bitcast [8 x i32]* %7 to i8*
%33 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%34 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %33, i32 4)
%35 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 94)
%36 = bitcast [8 x i32]* %8 to i8*
%37 = getelementptr inbounds [8 x i32], [8 x i32]* %8, i64 0, i64 0
%38 = call i32 @formatFrequencies(i8* %15, i32 3, i32* %37, i32 4)
%39 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 100)
%40 = bitcast [8 x i32]* %9 to i8*
%41 = getelementptr inbounds [8 x i32], [8 x i32]* %9, i64 0, i64 0
%42 = call i32 @formatFrequencies(i8* %15, i32 7, i32* %41, i32 4)
%43 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 106)
%44 = bitcast [8 x i32]* %10 to i8*
%45 = getelementptr inbounds [8 x i32], [8 x i32]* %10, i64 0, i64 0
%46 = call i32 @formatFrequencies(i8* %15, i32 14, i32* %45, i32 4)
%47 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 112)
%48 = bitcast [16 x i32]* %11 to i8*
%49 = getelementptr inbounds [16 x i32], [16 x i32]* %11, i64 0, i64 0
%50 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %49, i32 10)
%51 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 118)
%52 = bitcast [16 x i32]* %12 to i8*
%53 = getelementptr inbounds [16 x i32], [16 x i32]* %12, i64 0, i64 0
%54 = call i32 @formatFrequencies(i8* %15, i32 32, i32* %53, i32 12)
%55 = call i32 @_assertEqualsS(i8* %15, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.1, i64 0, i64 0), i32 124)
%56 = call double @getElapsedSecondsSince(%struct.timeval* %1)
%57 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0), double %56)
ret i32 0
}