// File: TooruAkagi[P]GCIS_Index/gcis_uni_locate.cpp
// Function: leftopennd(int*, int, int, int)
int leftopennd(int *m,int round,int count,int tround){ //左の[0][1]をcount回開ける
     if(DEBUGFLAG==1){
         printf("\n[2-左%dオープン(%d)]",count,round);
         if(occart2[tround][1] > -1){uhdisp(occart2[tround][1]);}
         if(occart2[tround][0] > -1){uhdisp(occart2[tround][0]);;}
    }
    int rofs=0;
    if(round>1){rofs=dc2s[round-1];}
    if(occart2[tround][1] > -1){ //左辺文字Aが指定されていれば
        std::vector<int> x;
        xdisp(x,occart2[tround][1]);
         if(DEBUGFLAG==1){printf("open [%d,%d--%d] >>",occart2[tround][1],dc2s[round],rofs);}
        int a1 = rofs+x[x.size() - 1];
        if(DEBUGFLAG==1){printf("\na1 = %d(%d)",a1,count);}
        if(count>1){occart2[tround][1] = a1;return leftopennd(m,round-1,count-1,tround);}
        int a2;
        //if(D_2[occart2[tround][1]]<2){printf("a2を消す");a2 = -1;}
        a2 = rofs+x[x.size() - 2];
        occart2[tround][1] = a1;
        occart2[tround][0] = a2;
        if(DEBUGFLAG==1){printf("\n更新 = %d & %d",a1,a2);}
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpl $0x1, -0x14(%rbp)
jle 0x4fb8
movl -0x14(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x933e(%rip), %rax      # 0xe2f0
movl (%rax,%rcx,4), %eax
movl %eax, -0x20(%rbp)
movslq -0x1c(%rbp), %rcx
leaq 0xc4fd(%rip), %rax      # 0x114c0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x4(%rax)
jle 0x50ff
leaq -0x38(%rbp), %rdi
movq %rdi, -0x58(%rbp)
callq 0x9db0
movq -0x58(%rbp), %rdi
movslq -0x1c(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0xc4cc(%rip), %rax      # 0x114c0
movl 0x4(%rax,%rcx,8), %esi
callq 0x34c0
jmp 0x4fff
movl -0x20(%rbp), %eax
movl %eax, -0x5c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9d90
movq %rax, %rsi
subq $0x1, %rsi
leaq -0x38(%rbp), %rdi
callq 0x9dd0
movq %rax, %rcx
movl -0x5c(%rbp), %eax
addl (%rcx), %eax
movl %eax, -0x48(%rbp)
cmpl $0x1, -0x18(%rbp)
jle 0x5089
movl -0x48(%rbp), %edx
movslq -0x1c(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0xc47f(%rip), %rax      # 0x114c0
movl %edx, 0x4(%rax,%rcx,8)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
decl %esi
movl -0x18(%rbp), %edx
decl %edx
movl -0x1c(%rbp), %ecx
callq 0x4f80
movl %eax, -0x60(%rbp)
jmp 0x5060
movl -0x60(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x50e9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9df0
jmp 0x510f
movl -0x20(%rbp), %eax
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9d90
movq %rax, %rsi
subq $0x2, %rsi
leaq -0x38(%rbp), %rdi
callq 0x9dd0
movq %rax, %rcx
movl -0x64(%rbp), %eax
addl (%rcx), %eax
movl %eax, -0x50(%rbp)
movl -0x48(%rbp), %ecx
movslq -0x1c(%rbp), %rdx
leaq 0xc3ff(%rip), %rax      # 0x114c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x50(%rbp), %ecx
movslq -0x1c(%rbp), %rdx
leaq 0xc3e7(%rip), %rax      # 0x114c0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl $0x0, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x9df0
movl -0x4c(%rbp), %eax
testl %eax, %eax
je 0x50fd
jmp 0x50fb
jmp 0x5106
jmp 0x50ff
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x2250
nopl (%rax,%rax)