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

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

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

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

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

        _sa = strans(sa, sst);
        _sb = strans(sb, sst);
        _li = itrans(li, ist); 

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

        _add_arc(fst, _sa, _sb, _li, _li, w);
    } else {
        if (sscanf(buf, "%s\t%s\t%s",   //
               sa, sb, li) == 3) {


            _sa = strans(sa, sst);
            _sb = strans(sb, sst);
            _li = itrans(li, ist); 

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

            _add_arc(fst, _sa, _sb, _li, _li, 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 $0x1080, %rsp           # imm = 0x1080
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movss 0x6871(%rip), %xmm0     # 0x8004
movss %xmm0, -0x1064(%rbp)
movq -0x10(%rbp), %rax
leaq -0x1080(%rbp), %rdi
movzbl 0xc(%rax), %esi
callq 0x26a0
movq -0x20(%rbp), %rdx
leaq 0x586(%rip), %rax       # 0x1d40
leaq 0x50f(%rip), %rcx       # 0x1cd0
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdx
leaq 0x568(%rip), %rax       # 0x1d40
leaq 0x4f1(%rip), %rcx       # 0x1cd0
cmpq $0x0, %rdx
cmoveq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x440(%rbp), %rdx
leaq -0x840(%rbp), %rcx
leaq -0x1040(%rbp), %r8
leaq 0x683f(%rip), %rsi      # 0x804a
leaq -0x1064(%rbp), %r9
movb $0x0, %al
callq 0x1130
cmpl $0x4, %eax
jne 0x18c6
movq -0x30(%rbp), %rax
leaq -0x440(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1048(%rbp)
movq -0x30(%rbp), %rax
leaq -0x840(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1050(%rbp)
movq -0x38(%rbp), %rax
leaq -0x1040(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x1060(%rbp)
cmpq $-0x1, -0x1048(%rbp)
je 0x1888
cmpq $-0x1, -0x1050(%rbp)
je 0x1888
cmpq $-0x1, -0x1060(%rbp)
jne 0x1894
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a8c
movq -0x10(%rbp), %rdi
movq -0x1048(%rbp), %rsi
movq -0x1050(%rbp), %rdx
movq -0x1060(%rbp), %rcx
movq -0x1060(%rbp), %r8
movss -0x1064(%rbp), %xmm0
callq 0x1da0
jmp 0x1a85
movq -0x18(%rbp), %rdi
leaq -0x440(%rbp), %rdx
leaq -0x840(%rbp), %rcx
leaq -0x1040(%rbp), %r8
leaq 0x6773(%rip), %rsi      # 0x8059
movb $0x0, %al
callq 0x1130
cmpl $0x3, %eax
jne 0x199a
movq -0x30(%rbp), %rax
leaq -0x440(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1048(%rbp)
movq -0x30(%rbp), %rax
leaq -0x840(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1050(%rbp)
movq -0x38(%rbp), %rax
leaq -0x1040(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq *%rax
movq %rax, -0x1060(%rbp)
cmpq $-0x1, -0x1048(%rbp)
je 0x195c
cmpq $-0x1, -0x1050(%rbp)
je 0x195c
cmpq $-0x1, -0x1060(%rbp)
jne 0x1968
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a8c
movq -0x10(%rbp), %rdi
movq -0x1048(%rbp), %rsi
movq -0x1050(%rbp), %rdx
movq -0x1060(%rbp), %rcx
movq -0x1060(%rbp), %r8
movss -0x106c(%rbp), %xmm0
callq 0x1da0
jmp 0x1a83
movq -0x18(%rbp), %rdi
leaq -0xc40(%rbp), %rdx
leaq 0x66a4(%rip), %rsi      # 0x8050
leaq -0x1064(%rbp), %rcx
movb $0x0, %al
callq 0x1130
cmpl $0x2, %eax
jne 0x1a0d
movq -0x30(%rbp), %rax
leaq -0xc40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1058(%rbp)
movq $-0x1, %rax
cmpq -0x1058(%rbp), %rax
jne 0x19f3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a8c
movq -0x10(%rbp), %rdi
movq -0x1058(%rbp), %rsi
movss -0x1064(%rbp), %xmm0
callq 0x1e40
jmp 0x1a81
movq -0x18(%rbp), %rdi
leaq -0xc40(%rbp), %rdx
leaq 0x6640(%rip), %rsi      # 0x805f
movb $0x0, %al
callq 0x1130
cmpl $0x1, %eax
jne 0x1a76
movq -0x30(%rbp), %rax
leaq -0xc40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq *%rax
movq %rax, -0x1058(%rbp)
movq $-0x1, %rax
cmpq -0x1058(%rbp), %rax
jne 0x1a5c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a8c
movq -0x10(%rbp), %rdi
movq -0x1058(%rbp), %rsi
movss -0x106c(%rbp), %xmm0
callq 0x1e40
jmp 0x1a7f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a8c
jmp 0x1a81
jmp 0x1a83
jmp 0x1a85
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x1080, %rsp           # imm = 0x1080
popq %rbp
retq
nopl (%rax,%rax)