// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
je 0x388a
movb $0x0, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x64(%rbp)
testl %eax, %eax
je 0x38e4
jmp 0x3899
movl -0x64(%rbp), %eax
subl $0x1000, %eax           # imm = 0x1000
je 0x38ed
jmp 0x38a5
movl -0x64(%rbp), %eax
subl $0x2000, %eax           # imm = 0x2000
je 0x391f
jmp 0x38b1
movl -0x64(%rbp), %eax
subl $0x3000, %eax           # imm = 0x3000
je 0x394c
jmp 0x38c1
movl -0x64(%rbp), %eax
subl $0x4000, %eax           # imm = 0x4000
je 0x3981
jmp 0x38d1
movl -0x64(%rbp), %eax
subl $0x5000, %eax           # imm = 0x5000
je 0x3a05
jmp 0x3a55
movb $0x1, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rdi
callq 0x27f0
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x27f0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x2110
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rdi
callq 0x2920
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2920
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rdi
callq 0x29b0
movsd %xmm0, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x29b0
movaps %xmm0, %xmm1
movsd -0x80(%rbp), %xmm0
ucomisd %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2ad0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2ad0
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x39b6
movb $0x0, -0x1(%rbp)
jmp 0x3a63
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x39ff
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3860
testb $0x1, %al
jne 0x39ef
movb $0x0, -0x1(%rbp)
jmp 0x3a63
jmp 0x39f1
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x39be
movb $0x1, -0x1(%rbp)
jmp 0x3a63
movq -0x10(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2880
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x2880
movq %rax, -0x60(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
je 0x3a37
movb $0x0, -0x1(%rbp)
jmp 0x3a63
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x20f0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x3a63
leaq 0xe9e1(%rip), %rdi      # 0x1243d
movb $0x0, %al
callq 0x6510
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)