// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/dio.c
// Function: jsonScanLog
static void jsonScanLog(const char **iter, logChanges_t **prev) {
    jsonScanChar(iter, '{');
    logChanges_t *log = calloc(1, sizeof(logChanges_t));
    log->prev = *prev;
    *prev = log;
    jsonScanWaste(iter);
    if (**iter != '}') do {
        const char *logHeading = jsonScanStr(iter);
        size_t logHeadingLen = *iter - logHeading - 1;
        jsonScanChar(iter, ':');
        if (logHeadingLen == 6 && *logHeading == 't') {
            // topics
            jsonScanLogTopics(iter, log);
        } else if (logHeadingLen == 4 && *logHeading == 'd') {
            // data
            jsonScanData(iter, &log->data);
        } else {
            fprintf(stderr, "Unexpected log heading: ");
            for (size_t i = 0; i < logHeadingLen; i++) {
                fputc(logHeading[i], stderr);
            }
            fputc('\n', stderr);
            _exit(1);
        }
        jsonScanWaste(iter);
        if (**iter == ',') {
            jsonSkipExpectedChar(iter, ',');
            jsonScanWaste(iter);
        } else {
            break;
        }
    } while (1);
    jsonSkipExpectedChar(iter, '}');
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x7b, %esi
callq 0x4070
movl $0x1, %edi
movl $0x28, %esi
callq 0x31c0
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x5890
movq -0x8(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x7d, %eax
je 0x699b
jmp 0x6869
movq -0x8(%rbp), %rdi
callq 0x5dc0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x20(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3a, %esi
callq 0x4070
cmpq $0x6, -0x28(%rbp)
jne 0x68bf
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x68bf
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x69b0
jmp 0x6958
cmpq $0x4, -0x28(%rbp)
jne 0x68e5
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x64, %eax
jne 0x68e5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x10, %rsi
callq 0x6bf0
jmp 0x6956
movq 0x1970c(%rip), %rax     # 0x1fff8
movq (%rax), %rdi
leaq 0x13a5b(%rip), %rsi     # 0x1a351
movb $0x0, %al
callq 0x31e0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x6938
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbl (%rax,%rcx), %edi
movq 0x196d6(%rip), %rax     # 0x1fff8
movq (%rax), %rsi
callq 0x3180
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x6905
movq 0x196b9(%rip), %rax     # 0x1fff8
movq (%rax), %rsi
movl $0xa, %edi
callq 0x3180
movl $0x1, %edi
callq 0x3080
jmp 0x6958
movq -0x8(%rbp), %rdi
callq 0x5890
movq -0x8(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2c, %eax
jne 0x6989
movq -0x8(%rbp), %rdi
movl $0x2c, %esi
callq 0x58f0
movq -0x8(%rbp), %rdi
callq 0x5890
jmp 0x698b
jmp 0x6999
jmp 0x698d
movb $0x1, %al
testb $0x1, %al
jne 0x6869
jmp 0x6999
jmp 0x699b
movq -0x8(%rbp), %rdi
movl $0x7d, %esi
callq 0x58f0
addq $0x30, %rsp
popq %rbp
retq
nop