// File: /workspace/github_c_makefile_star2_O0/c0stya[P]fslib/src/compile.c
// Function: parse_line_sym
static int _parse_line_sym(
                                struct _fst * fst, 
                                char * buf,
                                struct _symt * ist,
                                struct _symt * ost,
                                struct _symt * sst ) 
{
    trans_f strans, itrans, otrans;

    token_t sa, sb, sf, li, lo;
    size_t _sa, _sb, _sf, _li, _lo;

    weight_t w;
    struct _sr sr = sr_get(fst->sr_type);

    itrans = (ist == NULL ? trn:trt);
    otrans = (ost == NULL ? trn:trt);
    strans = (sst == NULL ? trn:trt);

    if (sscanf(buf, "%s\t%s\t%s\t%s\t%f",   // TODO: add marcro instead of %f
           sa, sb, li, lo, &w) == 5) {

        _sa = strans(sa, sst);
        _sb = strans(sb, sst);
        _li = itrans(li, ist); 
        _lo = otrans(lo, ost); 

        if ( _sa == -1 || _sb == -1 || _li == -1 || _lo == -1 ) 
            return -1;

        _add_arc(fst, _sa, _sb, _li, _lo, w);
    } else {
        if (sscanf(buf, "%s\t%s\t%s\t%s",   // TODO: add marcro instead of %f
               sa, sb, li, lo) == 4) {

            _sa = strans(sa, sst);
            _sb = strans(sb, sst);
            _li = itrans(li, ist); 
            _lo = otrans(lo, ost); 

            if ( _sa == -1 || _sb == -1 || _li == -1 || _lo == -1 ) 
                return -1;

            _add_arc(fst, _sa, _sb, _li, _lo, sr.one);
        } else {
            if (sscanf(buf, "%s\t%f", sf, &w) == 2) { // TODO: add macro instead of %f
                _sf = strans(sf, sst);
                
                if( -1 == _sf)
                    return -1;

                _add_final(fst, _sf, w);
            } else {
                if (sscanf(buf, "%s", sf) == 1) {
                    _sf = strans(sf, sst);

                    if( -1 == _sf )
                        return -1;

                    _add_final(fst, _sf, sr.one);          // TODO: change to semiring 1!
                } else
                    return -1;
            }
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x14a0, %rsp           # imm = 0x14A0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
leaq -0x1498(%rbp), %rdi
movzbl 0xc(%rax), %esi
callq 0x26a0
movq -0x20(%rbp), %rdx
leaq 0x922(%rip), %rax       # 0x1d40
leaq 0x8ab(%rip), %rcx       # 0x1cd0
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdx
leaq 0x904(%rip), %rax       # 0x1d40
leaq 0x88d(%rip), %rcx       # 0x1cd0
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdx
leaq 0x8e6(%rip), %rax       # 0x1d40
leaq 0x86f(%rip), %rcx       # 0x1cd0
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x450(%rbp), %rdx
leaq -0x850(%rbp), %rcx
leaq -0x1050(%rbp), %r8
leaq -0x1450(%rbp), %r9
leaq 0x6bb3(%rip), %rsi      # 0x8047
leaq -0x147c(%rbp), %rax
movq %rax, (%rsp)
movb $0x0, %al
callq 0x1130
cmpl $0x5, %eax
jne 0x1575
movq -0x38(%rbp), %rax
leaq -0x450(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1458(%rbp)
movq -0x38(%rbp), %rax
leaq -0x850(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1460(%rbp)
movq -0x40(%rbp), %rax
leaq -0x1050(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x1470(%rbp)
movq -0x48(%rbp), %rax
leaq -0x1450(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1478(%rbp)
cmpq $-0x1, -0x1458(%rbp)
je 0x1537
cmpq $-0x1, -0x1460(%rbp)
je 0x1537
cmpq $-0x1, -0x1470(%rbp)
je 0x1537
cmpq $-0x1, -0x1478(%rbp)
jne 0x1543
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1764
movq -0x10(%rbp), %rdi
movq -0x1458(%rbp), %rsi
movq -0x1460(%rbp), %rdx
movq -0x1470(%rbp), %rcx
movq -0x1478(%rbp), %r8
movss -0x147c(%rbp), %xmm0
callq 0x1da0
jmp 0x175d
movq -0x18(%rbp), %rdi
leaq -0x450(%rbp), %rdx
leaq -0x850(%rbp), %rcx
leaq -0x1050(%rbp), %r8
leaq -0x1450(%rbp), %r9
leaq 0x6aba(%rip), %rsi      # 0x8056
movb $0x0, %al
callq 0x1130
cmpl $0x4, %eax
jne 0x1672
movq -0x38(%rbp), %rax
leaq -0x450(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1458(%rbp)
movq -0x38(%rbp), %rax
leaq -0x850(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1460(%rbp)
movq -0x40(%rbp), %rax
leaq -0x1050(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x1470(%rbp)
movq -0x48(%rbp), %rax
leaq -0x1450(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1478(%rbp)
cmpq $-0x1, -0x1458(%rbp)
je 0x1634
cmpq $-0x1, -0x1460(%rbp)
je 0x1634
cmpq $-0x1, -0x1470(%rbp)
je 0x1634
cmpq $-0x1, -0x1478(%rbp)
jne 0x1640
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1764
movq -0x10(%rbp), %rdi
movq -0x1458(%rbp), %rsi
movq -0x1460(%rbp), %rdx
movq -0x1470(%rbp), %rcx
movq -0x1478(%rbp), %r8
movss -0x1484(%rbp), %xmm0
callq 0x1da0
jmp 0x175b
movq -0x18(%rbp), %rdi
leaq -0xc50(%rbp), %rdx
leaq 0x69cc(%rip), %rsi      # 0x8050
leaq -0x147c(%rbp), %rcx
movb $0x0, %al
callq 0x1130
cmpl $0x2, %eax
jne 0x16e5
movq -0x38(%rbp), %rax
leaq -0xc50(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1468(%rbp)
movq $-0x1, %rax
cmpq -0x1468(%rbp), %rax
jne 0x16cb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1764
movq -0x10(%rbp), %rdi
movq -0x1468(%rbp), %rsi
movss -0x147c(%rbp), %xmm0
callq 0x1e40
jmp 0x1759
movq -0x18(%rbp), %rdi
leaq -0xc50(%rbp), %rdx
leaq 0x6968(%rip), %rsi      # 0x805f
movb $0x0, %al
callq 0x1130
cmpl $0x1, %eax
jne 0x174e
movq -0x38(%rbp), %rax
leaq -0xc50(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq *%rax
movq %rax, -0x1468(%rbp)
movq $-0x1, %rax
cmpq -0x1468(%rbp), %rax
jne 0x1734
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1764
movq -0x10(%rbp), %rdi
movq -0x1468(%rbp), %rsi
movss -0x1484(%rbp), %xmm0
callq 0x1e40
jmp 0x1757
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1764
jmp 0x1759
jmp 0x175b
jmp 0x175d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x14a0, %rsp           # imm = 0x14A0
popq %rbp
retq