Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "dynamic-segtree.cpp"
- .text
- .section .text._ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev,"axG",@progbits,_ZNSt6vectorI11SegTreeNodeSaIS0_EED5Ev,comdat
- .align 2
- .p2align 4
- .weak _ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev
- .type _ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev, @function
- _ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev:
- .LFB1130:
- .cfi_startproc
- movq (%rdi), %rax
- testq %rax, %rax
- je .L1
- movq 16(%rdi), %rsi
- movq %rax, %rdi
- subq %rax, %rsi
- jmp _ZdlPvm@PLT
- .p2align 4,,10
- .p2align 3
- .L1:
- ret
- .cfi_endproc
- .LFE1130:
- .size _ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev, .-_ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev
- .weak _ZNSt6vectorI11SegTreeNodeSaIS0_EED1Ev
- .set _ZNSt6vectorI11SegTreeNodeSaIS0_EED1Ev,_ZNSt6vectorI11SegTreeNodeSaIS0_EED2Ev
- .text
- .p2align 4
- .globl _Z5queryiii
- .type _Z5queryiii, @function
- _Z5queryiii:
- .LFB1038:
- .cfi_startproc
- pushq %r15
- .cfi_def_cfa_offset 16
- .cfi_offset 15, -16
- xorl %r15d, %r15d
- pushq %r14
- .cfi_def_cfa_offset 24
- .cfi_offset 14, -24
- pushq %r13
- .cfi_def_cfa_offset 32
- .cfi_offset 13, -32
- movl %edx, %r13d
- pushq %r12
- .cfi_def_cfa_offset 40
- .cfi_offset 12, -40
- movl %esi, %r12d
- pushq %rbp
- .cfi_def_cfa_offset 48
- .cfi_offset 6, -48
- pushq %rbx
- .cfi_def_cfa_offset 56
- .cfi_offset 3, -56
- subq $8, %rsp
- .cfi_def_cfa_offset 64
- movq sgt(%rip), %r14
- jmp .L8
- .p2align 4,,10
- .p2align 3
- .L7:
- cmpl %ebx, %r13d
- jle .L4
- .L11:
- movl 8(%rbp), %edi
- .L8:
- movslq %edi, %rdi
- leaq (%rdi,%rdi,4), %rax
- leaq (%r14,%rax,4), %rbp
- movl 12(%rbp), %eax
- movl 16(%rbp), %edx
- cmpl %r12d, %eax
- jl .L5
- cmpl %edx, %r13d
- jge .L10
- .L5:
- leal (%rax,%rdx), %ebx
- sarl %ebx
- cmpl %ebx, %r12d
- jg .L7
- movl 4(%rbp), %edi
- movl %r13d, %edx
- movl %r12d, %esi
- call _Z5queryiii
- addl %eax, %r15d
- cmpl %ebx, %r13d
- jg .L11
- .L4:
- addq $8, %rsp
- .cfi_remember_state
- .cfi_def_cfa_offset 56
- movl %r15d, %eax
- popq %rbx
- .cfi_def_cfa_offset 48
- popq %rbp
- .cfi_def_cfa_offset 40
- popq %r12
- .cfi_def_cfa_offset 32
- popq %r13
- .cfi_def_cfa_offset 24
- popq %r14
- .cfi_def_cfa_offset 16
- popq %r15
- .cfi_def_cfa_offset 8
- ret
- .p2align 4,,10
- .p2align 3
- .L10:
- .cfi_restore_state
- addl 0(%rbp), %r15d
- jmp .L4
- .cfi_endproc
- .LFE1038:
- .size _Z5queryiii, .-_Z5queryiii
- .section .rodata._ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_.str1.1,"aMS",@progbits,1
- .LC0:
- .string "vector::_M_realloc_insert"
- .section .text._ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,"axG",@progbits,_ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_,comdat
- .align 2
- .p2align 4
- .weak _ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
- .type _ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_, @function
- _ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_:
- .LFB1074:
- .cfi_startproc
- movabsq $-3689348814741910323, %rcx
- pushq %r15
- .cfi_def_cfa_offset 16
- .cfi_offset 15, -16
- pushq %r14
- .cfi_def_cfa_offset 24
- .cfi_offset 14, -24
- pushq %r13
- .cfi_def_cfa_offset 32
- .cfi_offset 13, -32
- pushq %r12
- .cfi_def_cfa_offset 40
- .cfi_offset 12, -40
- pushq %rbp
- .cfi_def_cfa_offset 48
- .cfi_offset 6, -48
- pushq %rbx
- .cfi_def_cfa_offset 56
- .cfi_offset 3, -56
- subq $40, %rsp
- .cfi_def_cfa_offset 96
- movq 8(%rdi), %r14
- movq (%rdi), %rbp
- movq %r14, %rax
- subq %rbp, %rax
- sarq $2, %rax
- imulq %rcx, %rax
- movabsq $461168601842738790, %rcx
- cmpq %rcx, %rax
- je .L34
- movq %rsi, %rcx
- movq %rdi, %r13
- movq %rsi, %rbx
- subq %rbp, %rcx
- cmpq %r14, %rbp
- je .L35
- leaq (%rax,%rax), %rsi
- cmpq %rax, %rsi
- jb .L26
- testq %rsi, %rsi
- jne .L36
- movdqu (%rdx), %xmm2
- movl 16(%rdx), %eax
- xorl %r15d, %r15d
- movl $20, %r12d
- movq $0, 8(%rsp)
- movl %eax, 16(%rcx)
- movups %xmm2, (%rcx)
- cmpq %rbp, %rbx
- je .L24
- .L19:
- movq %r15, %rdx
- movq %rbp, %rax
- .p2align 4,,10
- .p2align 3
- .L21:
- movdqu (%rax), %xmm0
- movl 16(%rax), %ecx
- addq $20, %rax
- addq $20, %rdx
- movups %xmm0, -20(%rdx)
- movl %ecx, -4(%rdx)
- cmpq %rbx, %rax
- jne .L21
- leaq -20(%rbx), %rax
- subq %rbp, %rax
- andq $-4, %rax
- leaq 40(%r15,%rax), %r12
- .L20:
- cmpq %r14, %rbx
- je .L22
- .L24:
- subq %rbx, %r14
- movq %r12, %rdi
- movq %rbx, %rsi
- leaq -20(%r14), %rax
- shrq $2, %rax
- leaq 20(,%rax,4), %r14
- movq %r14, %rdx
- addq %r14, %r12
- call memcpy@PLT
- .L22:
- testq %rbp, %rbp
- je .L23
- movq 16(%r13), %rsi
- movq %rbp, %rdi
- subq %rbp, %rsi
- call _ZdlPvm@PLT
- .L23:
- movq 8(%rsp), %rax
- movq %r15, 0(%r13)
- movq %r12, 8(%r13)
- movq %rax, 16(%r13)
- addq $40, %rsp
- .cfi_remember_state
- .cfi_def_cfa_offset 56
- popq %rbx
- .cfi_def_cfa_offset 48
- popq %rbp
- .cfi_def_cfa_offset 40
- popq %r12
- .cfi_def_cfa_offset 32
- popq %r13
- .cfi_def_cfa_offset 24
- popq %r14
- .cfi_def_cfa_offset 16
- popq %r15
- .cfi_def_cfa_offset 8
- ret
- .p2align 4,,10
- .p2align 3
- .L26:
- .cfi_restore_state
- movabsq $9223372036854775800, %r12
- .L17:
- movq %r12, %rdi
- movq %rdx, 24(%rsp)
- movq %rcx, 16(%rsp)
- call _Znwm@PLT
- movq 24(%rsp), %rdx
- movq 16(%rsp), %rcx
- movq %rax, %r15
- leaq (%rax,%r12), %rax
- movq %rax, 8(%rsp)
- movdqu (%rdx), %xmm1
- leaq 20(%r15), %r12
- movl 16(%rdx), %eax
- movups %xmm1, (%r15,%rcx)
- movl %eax, 16(%r15,%rcx)
- cmpq %rbp, %rbx
- jne .L19
- jmp .L20
- .p2align 4,,10
- .p2align 3
- .L35:
- addq $1, %rax
- jc .L26
- movabsq $461168601842738790, %rsi
- cmpq %rsi, %rax
- cmova %rsi, %rax
- leaq (%rax,%rax,4), %r12
- salq $2, %r12
- jmp .L17
- .L36:
- movabsq $461168601842738790, %rax
- cmpq %rax, %rsi
- cmova %rax, %rsi
- leaq (%rsi,%rsi,4), %r12
- salq $2, %r12
- jmp .L17
- .L34:
- leaq .LC0(%rip), %rdi
- call _ZSt20__throw_length_errorPKc@PLT
- .cfi_endproc
- .LFE1074:
- .size _ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_, .-_ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
- .text
- .p2align 4
- .globl _Z5buildii
- .type _Z5buildii, @function
- _Z5buildii:
- .LFB1037:
- .cfi_startproc
- pushq %r15
- .cfi_def_cfa_offset 16
- .cfi_offset 15, -16
- pushq %r14
- .cfi_def_cfa_offset 24
- .cfi_offset 14, -24
- pushq %r13
- .cfi_def_cfa_offset 32
- .cfi_offset 13, -32
- pushq %r12
- .cfi_def_cfa_offset 40
- .cfi_offset 12, -40
- movl %esi, %r12d
- pushq %rbp
- .cfi_def_cfa_offset 48
- .cfi_offset 6, -48
- movslq %edi, %rbp
- pushq %rbx
- .cfi_def_cfa_offset 56
- .cfi_offset 3, -56
- subq $40, %rsp
- .cfi_def_cfa_offset 96
- movq %fs:40, %rax
- movq %rax, 24(%rsp)
- xorl %eax, %eax
- movq .LC1(%rip), %rax
- movl %esi, 16(%rsp)
- movq 8+sgt(%rip), %rsi
- cmpq 16+sgt(%rip), %rsi
- movl $-1, 8(%rsp)
- movq %rax, (%rsp)
- movl %ebp, 12(%rsp)
- je .L38
- movdqa (%rsp), %xmm0
- movl %r12d, 16(%rsi)
- addq $20, %rsi
- movups %xmm0, -20(%rsi)
- movq %rsi, 8+sgt(%rip)
- .L39:
- movq sgt(%rip), %rax
- subq %rax, %rsi
- sarq $2, %rsi
- imull $-858993459, %esi, %esi
- leal -1(%rsi), %r15d
- movslq %r15d, %rdx
- leaq (%rdx,%rdx,4), %rbx
- salq $2, %rbx
- leaq (%rax,%rbx), %r13
- cmpl %r12d, %ebp
- je .L44
- leal 0(%rbp,%r12), %r14d
- movl %ebp, %edi
- sarl %r14d
- movl %r14d, %esi
- call _Z5buildii
- leal 1(%r14), %edi
- movl %r12d, %esi
- movq sgt(%rip), %rbp
- movl %eax, 4(%r13)
- addq %rbx, %rbp
- call _Z5buildii
- movq sgt(%rip), %rdx
- movl %eax, 8(%rbp)
- addq %rdx, %rbx
- movslq 4(%rbx), %rax
- leaq (%rax,%rax,4), %rcx
- movslq 8(%rbx), %rax
- leaq (%rax,%rax,4), %rax
- movl (%rdx,%rax,4), %eax
- addl (%rdx,%rcx,4), %eax
- movl %eax, (%rbx)
- .L37:
- movq 24(%rsp), %rax
- subq %fs:40, %rax
- jne .L45
- addq $40, %rsp
- .cfi_remember_state
- .cfi_def_cfa_offset 56
- movl %r15d, %eax
- popq %rbx
- .cfi_def_cfa_offset 48
- popq %rbp
- .cfi_def_cfa_offset 40
- popq %r12
- .cfi_def_cfa_offset 32
- popq %r13
- .cfi_def_cfa_offset 24
- popq %r14
- .cfi_def_cfa_offset 16
- popq %r15
- .cfi_def_cfa_offset 8
- ret
- .p2align 4,,10
- .p2align 3
- .L44:
- .cfi_restore_state
- leaq arr(%rip), %rax
- movl (%rax,%rbp,4), %eax
- movl %eax, 0(%r13)
- jmp .L37
- .p2align 4,,10
- .p2align 3
- .L38:
- movq %rsp, %rdx
- leaq sgt(%rip), %rdi
- call _ZNSt6vectorI11SegTreeNodeSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_
- movq 8+sgt(%rip), %rsi
- jmp .L39
- .L45:
- call __stack_chk_fail@PLT
- .cfi_endproc
- .LFE1037:
- .size _Z5buildii, .-_Z5buildii
- .section .rodata.str1.1,"aMS",@progbits,1
- .LC2:
- .string "r"
- .LC3:
- .string "input.txt"
- .LC4:
- .string "%d"
- .LC5:
- .string "%d %d"
- .LC6:
- .string "%d\n"
- .LC7:
- .string "%d "
- .section .text.startup,"ax",@progbits
- .p2align 4
- .globl main
- .type main, @function
- main:
- .LFB1039:
- .cfi_startproc
- pushq %r12
- .cfi_def_cfa_offset 16
- .cfi_offset 12, -16
- leaq .LC2(%rip), %rsi
- leaq .LC3(%rip), %rdi
- pushq %rbp
- .cfi_def_cfa_offset 24
- .cfi_offset 6, -24
- leaq .LC4(%rip), %r12
- pushq %rbx
- .cfi_def_cfa_offset 32
- .cfi_offset 3, -32
- subq $16, %rsp
- .cfi_def_cfa_offset 48
- movq stdin(%rip), %rdx
- movq %fs:40, %rax
- movq %rax, 8(%rsp)
- xorl %eax, %eax
- call freopen@PLT
- leaq n(%rip), %rsi
- movq %r12, %rdi
- xorl %eax, %eax
- call __isoc23_scanf@PLT
- movl n(%rip), %esi
- testl %esi, %esi
- jle .L47
- leaq 4+arr(%rip), %rbp
- movl $1, %ebx
- .p2align 4,,10
- .p2align 3
- .L48:
- movq %rbp, %rsi
- movq %r12, %rdi
- xorl %eax, %eax
- addl $1, %ebx
- call __isoc23_scanf@PLT
- movl n(%rip), %esi
- addq $4, %rbp
- cmpl %ebx, %esi
- jge .L48
- .L47:
- movl $1, %edi
- call _Z5buildii
- leaq 4(%rsp), %rdx
- movq %rsp, %rsi
- leaq .LC5(%rip), %rdi
- movl %eax, root(%rip)
- xorl %eax, %eax
- call __isoc23_scanf@PLT
- movl (%rsp), %esi
- movl root(%rip), %edi
- movl 4(%rsp), %edx
- call _Z5queryiii
- leaq .LC6(%rip), %rdi
- movl %eax, %esi
- xorl %eax, %eax
- call printf@PLT
- movl n(%rip), %eax
- testl %eax, %eax
- jle .L49
- movl $1, %ebx
- leaq .LC7(%rip), %rbp
- .p2align 4,,10
- .p2align 3
- .L50:
- movl root(%rip), %edi
- movl %ebx, %edx
- movl %ebx, %esi
- addl $1, %ebx
- call _Z5queryiii
- movq %rbp, %rdi
- movl %eax, %esi
- xorl %eax, %eax
- call printf@PLT
- cmpl %ebx, n(%rip)
- jge .L50
- .L49:
- movl $10, %edi
- call putchar@PLT
- movq 8(%rsp), %rax
- subq %fs:40, %rax
- jne .L55
- addq $16, %rsp
- .cfi_remember_state
- .cfi_def_cfa_offset 32
- xorl %eax, %eax
- popq %rbx
- .cfi_def_cfa_offset 24
- popq %rbp
- .cfi_def_cfa_offset 16
- popq %r12
- .cfi_def_cfa_offset 8
- ret
- .L55:
- .cfi_restore_state
- call __stack_chk_fail@PLT
- .cfi_endproc
- .LFE1039:
- .size main, .-main
- .p2align 4
- .type _GLOBAL__sub_I_n, @function
- _GLOBAL__sub_I_n:
- .LFB1132:
- .cfi_startproc
- pxor %xmm0, %xmm0
- leaq __dso_handle(%rip), %rdx
- leaq sgt(%rip), %rsi
- movq $0, 16+sgt(%rip)
- leaq _ZNSt6vectorI11SegTreeNodeSaIS0_EED1Ev(%rip), %rdi
- movaps %xmm0, sgt(%rip)
- jmp __cxa_atexit@PLT
- .cfi_endproc
- .LFE1132:
- .size _GLOBAL__sub_I_n, .-_GLOBAL__sub_I_n
- .section .init_array,"aw"
- .align 8
- .quad _GLOBAL__sub_I_n
- .globl root
- .bss
- .align 4
- .type root, @object
- .size root, 4
- root:
- .zero 4
- .globl sgt
- .align 16
- .type sgt, @object
- .size sgt, 24
- sgt:
- .zero 24
- .globl arr
- .align 32
- .type arr, @object
- .size arr, 4000024
- arr:
- .zero 4000024
- .globl n
- .align 4
- .type n, @object
- .size n, 4
- n:
- .zero 4
- .section .rodata.cst8,"aM",@progbits,8
- .align 8
- .LC1:
- .long 0
- .long -1
- .hidden __dso_handle
- .ident "GCC: (GNU) 13.2.1 20230801"
- .section .note.GNU-stack,"",@progbits
Advertisement
Add Comment
Please, Sign In to add comment