// File: /workspace/github_c_makefile_star2_O0/wjmelements[P]evm/src/evm.c
// Function: fprintLogDiff
uint16_t fprintLogDiff(FILE *file, const logChanges_t *log, const logChanges_t *expected, int showLogIndex) {
    if (log == NULL) {
        return 0;
    }
    if (expected == NULL) {
        return fprintLog(file, log, showLogIndex);
    }
    uint16_t items = fprintLogDiff(file, log->prev, expected->prev, showLogIndex);
    if (items) {
        fputc(',', file);
    }
    if (showLogIndex) {
        fprintf(file, "{\"logIndex\":\"0x%x\",\"data\":\"0x", log->logIndex);
    } else {
        fprintf(file, "{\"data\":\"0x");
    }
    if (log->data.size == expected->data.size) {
        for (size_t i = 0; i < log->data.size; i++) {
            if (log->data.content[i] == expected->data.content[i]) {
                fprintf(file, "%02x", log->data.content[i]);
            } else {
                fprintf(file, "\033[0;31m%02x\033[0m", log->data.content[i]);
            }
        }
    } else {
        for (size_t i = 0; i < log->data.size; i++) {
            fprintf(file, "%02x", log->data.content[i]);
        }
    }
    fputs("\",\"topics\":[", file);
    if (log->topicCount == expected->topicCount) {
        for (uint8_t i = log->topicCount; i-->0;) {
            fputs("\"0x", file);
            for (uint16_t j = 0; j < 32; j++) {
                uint64_t topicPart = log->topics[i].elements[j / 16].elements[(j % 16) / 8];
                topicPart >>= (56 - 8 * (j % 8));
                topicPart &= 0xff;
                uint64_t expectedPart = expected->topics[i].elements[j / 16].elements[(j % 16) / 8];
                expectedPart >>= (56 - 8 * (j % 8));
                expectedPart &= 0xff;
                if (topicPart == expectedPart) {
                    fprintf(file, "%02" PRIx64, topicPart);
                } else {
                    fprintf(file, "\033[0;31m%02" PRIx64 "\033[0m", topicPart);
                }
            }
            fputc('"', file);
            if (i) {
                fputc(',', file);
            }
        }
    } else {
        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 $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x7f9c
movw $0x0, -0x2(%rbp)
jmp 0x83d7
cmpq $0x0, -0x20(%rbp)
jne 0x7fbc
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x7dc0
movw %ax, -0x2(%rbp)
jmp 0x83d7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rsi
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rdx
movl -0x24(%rbp), %ecx
callq 0x7f70
movw %ax, -0x26(%rbp)
cmpw $0x0, -0x26(%rbp)
je 0x7ff1
movq -0x10(%rbp), %rsi
movl $0x2c, %edi
callq 0x3180
cmpl $0x0, -0x24(%rbp)
je 0x8013
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %edx
leaq 0x12a42(%rip), %rsi     # 0x1aa4c
movb $0x0, %al
callq 0x31e0
jmp 0x8025
movq -0x10(%rbp), %rdi
leaq 0x12a4c(%rip), %rsi     # 0x1aa6a
movb $0x0, %al
callq 0x31e0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x80d0
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x80ce
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x20(%rbp), %rcx
movq 0x18(%rcx), %rcx
movq -0x30(%rbp), %rdx
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x8099
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x1237e(%rip), %rsi     # 0x1a40e
movb $0x0, %al
callq 0x31e0
jmp 0x80bb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x129ef(%rip), %rsi     # 0x1aaa3
movb $0x0, %al
callq 0x31e0
jmp 0x80bd
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8043
jmp 0x8118
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x8116
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x38(%rbp), %rcx
movzbl (%rax,%rcx), %edx
leaq 0x1230d(%rip), %rsi     # 0x1a40e
movb $0x0, %al
callq 0x31e0
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x80d8
jmp 0x8118
movq -0x10(%rbp), %rsi
leaq 0x12953(%rip), %rdi     # 0x1aa76
callq 0x3130
movq -0x18(%rbp), %rax
movzbl 0x8(%rax), %eax
movq -0x20(%rbp), %rcx
movzbl 0x8(%rcx), %ecx
cmpl %ecx, %eax
jne 0x8317
movq -0x18(%rbp), %rax
movb 0x8(%rax), %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x39(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x8312
movq -0x10(%rbp), %rsi
leaq 0x120c8(%rip), %rdi     # 0x1a234
callq 0x3130
movw $0x0, -0x3c(%rbp)
movzwl -0x3c(%rbp), %eax
cmpl $0x20, %eax
jge 0x82eb
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x39(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x78(%rbp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x70(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x48(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
shll $0x3, %edx
movl $0x38, %ecx
subl %edx, %ecx
movq -0x48(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
andq $0xff, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movzbl -0x39(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x68(%rbp), %rax
movslq %ecx, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movzwl -0x3c(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
shll $0x3, %edx
movl $0x38, %ecx
subl %edx, %ecx
movq -0x50(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
andq $0xff, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x82c2
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq 0x127fa(%rip), %rsi     # 0x1aab3
movb $0x0, %al
callq 0x31e0
jmp 0x82d8
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq 0x127e8(%rip), %rsi     # 0x1aab9
movb $0x0, %al
callq 0x31e0
jmp 0x82da
movw -0x3c(%rbp), %ax
addw $0x1, %ax
movw %ax, -0x3c(%rbp)
jmp 0x8177
movq -0x10(%rbp), %rsi
movl $0x22, %edi
callq 0x3180
cmpb $0x0, -0x39(%rbp)
je 0x830d
movq -0x10(%rbp), %rsi
movl $0x2c, %edi
callq 0x3180
jmp 0x814a
jmp 0x83bc
movq -0x18(%rbp), %rax
movb 0x8(%rax), %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
movb %al, %cl
addb $-0x1, %cl
movb %cl, -0x51(%rbp)
movzbl %al, %eax
cmpl $0x0, %eax
jle 0x83ba
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x51(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x51(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x51(%rbp), %esi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x10(%rax), %r8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movzbl -0x51(%rbp), %esi
shlq $0x5, %rsi
addq %rsi, %rax
movq 0x18(%rax), %r9
leaq 0x126e9(%rip), %rsi     # 0x1aa83
movb $0x0, %al
callq 0x31e0
cmpb $0x0, -0x51(%rbp)
je 0x83b5
movq -0x10(%rbp), %rsi
movl $0x2c, %edi
callq 0x3180
jmp 0x8321
jmp 0x83bc
movq -0x10(%rbp), %rsi
leaq 0x126d9(%rip), %rdi     # 0x1aaa0
callq 0x3130
movzwl -0x26(%rbp), %eax
addl $0x1, %eax
movw %ax, -0x2(%rbp)
movw -0x2(%rbp), %ax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)