// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/ast.c
// Function: ast_equals
bool ast_equals(struct ast *a, struct ast *b)
{
    if (a->tag != b->tag)
        return false;

    switch (a->tag) {
        case AST_NO_VAL:
            return true;
        case AST_S:
            return strcmp(ast_s(a), ast_s(b));
        case AST_I:
            return ast_i(a) == ast_i(b);
        case AST_F:
            return ast_f(a) == ast_f(b);
        case AST_AST: {
            size_t n_a_asts, n_b_asts;
            struct ast **a_asts = ast_asts(a, &n_a_asts);
            struct ast **b_asts = ast_asts(b, &n_b_asts);

            if (n_a_asts != n_b_asts)
                return false;

            for (size_t i = 0; i < n_a_asts; i++) {
                if (!ast_equals(a_asts[i], b_asts[i]))
                    return false;
            }

            return true;
        }
        case AST_CHARS: {
            size_t a_n, b_n;
            const char *a_s = ast_chars(a, &a_n);
            const char *b_s = ast_chars(b, &b_n);

            if (a_n != b_n)
                return false;

            return memcmp(a_s, b_s, a_n) == 0;
        }
    }

    bug("unknown AST-type");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl (%rdi), %ecx
movl (%rsi), %eax
cmpl %eax, %ecx
jne 0x30f4
movl %ecx, %edx
roll $0x14, %edx
cmpl $0x5, %edx
ja 0x31bb
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xa218(%rip), %rsi      # 0xd194
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movb $0x1, %r15b
jmp 0x30f7
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x4000, %ecx           # imm = 0x4000
jne 0x3104
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x3104
movq 0x18(%r14), %r12
cmpq 0x18(%rbx), %r12
jne 0x30f4
testq %r12, %r12
sete %r15b
je 0x30f7
movq 0x20(%r14), %rdi
movq 0x20(%rbx), %rsi
callq 0x2f4c
testb %al, %al
je 0x30f7
leaq -0x1(%r12), %r15
xorl %ecx, %ecx
movq %rcx, %r13
cmpq %rcx, %r15
je 0x3005
movq 0x28(%r14,%r13,8), %rdi
movq 0x28(%rbx,%r13,8), %rsi
callq 0x2f4c
leaq 0x1(%r13), %rcx
testb %al, %al
jne 0x2fe6
incq %r13
cmpq %r12, %r13
setae %r15b
jmp 0x30f7
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x2000, %ecx           # imm = 0x2000
jne 0x312a
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x2000, %eax           # imm = 0x2000
jne 0x312a
movq 0x18(%r14), %rax
cmpq 0x18(%rbx), %rax
jmp 0x30ee
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x3000, %ecx           # imm = 0x3000
jne 0x314d
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x3000, %eax           # imm = 0x3000
jne 0x314d
movsd 0x18(%rbx), %xmm0
cmpeqsd 0x18(%r14), %xmm0
movq %xmm0, %r15
andl $0x1, %r15d
jmp 0x30f7
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x1000, %ecx           # imm = 0x1000
jne 0x3170
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x1000, %eax           # imm = 0x1000
jne 0x3170
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x2100
testl %eax, %eax
setne %r15b
jmp 0x30f7
andl $0xf000, %ecx           # imm = 0xF000
cmpl $0x5000, %ecx           # imm = 0x5000
jne 0x3193
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x5000, %eax           # imm = 0x5000
jne 0x3193
movq 0x20(%r14), %rdx
cmpq 0x20(%rbx), %rdx
jne 0x30f4
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x2180
testl %eax, %eax
sete %r15b
jmp 0x30f7
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xa0a1(%rip), %rdi      # 0xd1ac
leaq 0xa0bc(%rip), %rsi      # 0xd1ce
leaq 0xa12b(%rip), %rcx      # 0xd244
leaq 0xa142(%rip), %r8       # 0xd262
movl $0x99, %edx
jmp 0x31b4
leaq 0xa07b(%rip), %rdi      # 0xd1ac
leaq 0xa096(%rip), %rsi      # 0xd1ce
leaq 0xa0d1(%rip), %rcx      # 0xd210
leaq 0xa0de(%rip), %r8       # 0xd224
movl $0x83, %edx
jmp 0x31b4
leaq 0xa058(%rip), %rdi      # 0xd1ac
leaq 0xa073(%rip), %rsi      # 0xd1ce
leaq 0xa0c8(%rip), %rcx      # 0xd22a
leaq 0xa0d5(%rip), %r8       # 0xd23e
movl $0x8a, %edx
jmp 0x31b4
leaq 0xa035(%rip), %rdi      # 0xd1ac
leaq 0xa050(%rip), %rsi      # 0xd1ce
leaq 0xa04f(%rip), %rcx      # 0xd1d4
leaq 0xa05c(%rip), %r8       # 0xd1e8
movl $0x73, %edx
jmp 0x31b4
leaq 0xa012(%rip), %rdi      # 0xd1ac
leaq 0xa02d(%rip), %rsi      # 0xd1ce
leaq 0xa046(%rip), %rcx      # 0xd1ee
leaq 0xa057(%rip), %r8       # 0xd206
movl $0x7a, %edx
xorl %eax, %eax
callq 0x4f1c
leaq 0xa437(%rip), %rdi      # 0xd5f9
xorl %eax, %eax
callq 0x4f1c
nopl (%rax)