// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/evm.c
// Function: fprintLog
uint16_t fprintLog(FILE *file, const logChanges_t *log, int showLogIndex) {
    if (log == NULL) {
        return 0;
    }
    uint16_t items = fprintLog(file, log->prev, showLogIndex);
    if (items) {
        fputc(',', file);
    }
    if (showLogIndex) {
        fprintf(file, "{\"logIndex\":\"0x%x\",\"data\":\"0x", log->logIndex);
    } else {
        fprintf(file, "{\"data\":\"0x");
    }
    for (size_t i = 0; i < log->data.size; i++) {
        fprintf(file, "%02x", log->data.content[i]);
    }
    fputs("\",\"topics\":[", file);
    for (uint8_t i = log->topicCount; i-->0;) {
        fprintf(file, "\"0x%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "\"",
            UPPER(UPPER(log->topics[i])),
            LOWER(UPPER(log->topics[i])),
            UPPER(LOWER(log->topics[i])),
            LOWER(LOWER(log->topics[i]))
        );
        if (i) {
            fputc(',', file);
        }
    }
    fputs("]}", file);
    return items + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7de5
movw $0x0, -0x2(%rbp)
jmp 0x7f5a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movl -0x1c(%rbp), %edx
callq 0x7dc0
movw %ax, -0x1e(%rbp)
cmpw $0x0, -0x1e(%rbp)
je 0x7e12
movq -0x10(%rbp), %rsi
movl $0x2c, %edi
callq 0x3180
cmpl $0x0, -0x1c(%rbp)
je 0x7e34
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %edx
leaq 0x12c21(%rip), %rsi     # 0x1aa4c
movb $0x0, %al
callq 0x31e0
jmp 0x7e46
movq -0x10(%rbp), %rdi
leaq 0x12c2b(%rip), %rsi     # 0x1aa6a
movb $0x0, %al
callq 0x31e0
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x7e8c
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x12597(%rip), %rsi     # 0x1a40e
movb $0x0, %al
callq 0x31e0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x7e4e
movq -0x10(%rbp), %rsi
leaq 0x12bdf(%rip), %rdi     # 0x1aa76
callq 0x3130
movq -0x18(%rbp), %rax
movb 0x8(%rax), %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x29(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x7f3f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %esi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %r8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x29(%rbp), %esi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x18(%rax), %r9
leaq 0x12b64(%rip), %rsi     # 0x1aa83
movb $0x0, %al
callq 0x31e0
cmpb $0x0, -0x29(%rbp)
je 0x7f3a
movq -0x10(%rbp), %rsi
movl $0x2c, %edi
callq 0x3180
jmp 0x7ea6
movq -0x10(%rbp), %rsi
leaq 0x12b56(%rip), %rdi     # 0x1aaa0
callq 0x3130
movzwl -0x1e(%rbp), %eax
addl $0x1, %eax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)