// File: TooruAkagi[P]GCIS_Index/gcis_nep_locate.cpp
// Function: leftopennd(unsigned int*, int*, int*, int, int, int)
int leftopennd(unsigned int *D,int *D_2,int *D_3,int round,int count,int tround){ //左の[0][1]をcount回開ける
     if(DEBUGFLAG==1){
         printf("\n[2-左%dオープン(%d)]",count,round);
         if(occart2[tround][1] > -1){alldr(D,D_2,D_3,occart2[tround][1],tround-1);}
         if(occart2[tround][0] > -1){alldr(D,D_2,D_3,occart2[tround][0],tround-1);}
    }
    int rofs=0;
    if(round>1){rofs=dc2s[round-1];}
    if(occart2[tround][1] > -1){ //左辺文字Aが指定されていれば
         if(DEBUGFLAG==1){printf("open [%d,%d--%d] >>",occart2[tround][1],dc2s[round],rofs);}
        int a1 = rofs+D[D_2[1+occart2[tround][1]] - 1];
        if(DEBUGFLAG==1){printf("\na1 = %d(%d)",a1,count);}
        if(count>1){occart2[tround][1] = a1;return leftopennd(D,D_2,D_3,round-1,count-1,tround);}
        int a2;
        if(D_2[occart2[tround][1]]<2){printf("a2を消す");a2 = -1;}
        a2 = rofs+D[D_2[1+occart2[tround][1]] - 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 $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpl $0x1, -0x24(%rbp)
jle 0x3c92
movl -0x24(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x9a24(%rip), %rax      # 0xd6b0
movl (%rax,%rcx,4), %eax
movl %eax, -0x30(%rbp)
movslq -0x2c(%rbp), %rcx
leaq 0x94e3(%rip), %rax      # 0xd180
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x4(%rax)
jle 0x3dc5
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq -0x2c(%rbp), %rdi
leaq 0x94bc(%rip), %rsi      # 0xd180
imulq $0x28, %rdi, %rdi
addq %rdi, %rsi
movl 0x4(%rsi), %esi
addl $0x1, %esi
movslq %esi, %rsi
movl (%rdx,%rsi,4), %edx
subl $0x1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x34(%rbp)
cmpl $0x1, -0x28(%rbp)
jle 0x3d2c
movl -0x34(%rbp), %ecx
movslq -0x2c(%rbp), %rdx
leaq 0x9489(%rip), %rax      # 0xd180
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movl -0x28(%rbp), %r8d
subl $0x1, %r8d
movl -0x2c(%rbp), %r9d
callq 0x3c50
movl %eax, -0x4(%rbp)
jmp 0x3dcc
movq -0x18(%rbp), %rax
movslq -0x2c(%rbp), %rdx
leaq 0x9445(%rip), %rcx      # 0xd180
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
movslq 0x4(%rcx), %rcx
cmpl $0x2, (%rax,%rcx,4)
jge 0x3d61
leaq 0x53be(%rip), %rdi      # 0x9111
movb $0x0, %al
callq 0x2030
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
movslq -0x2c(%rbp), %rdi
leaq 0x9409(%rip), %rsi      # 0xd180
imulq $0x28, %rdi, %rdi
addq %rdi, %rsi
movl 0x4(%rsi), %esi
addl $0x1, %esi
movslq %esi, %rsi
movl (%rdx,%rsi,4), %edx
subl $0x2, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %ecx
movslq -0x2c(%rbp), %rdx
leaq 0x93dc(%rip), %rax      # 0xd180
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movl -0x38(%rbp), %ecx
movslq -0x2c(%rbp), %rdx
leaq 0x93c4(%rip), %rax      # 0xd180
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)