Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define INF 33333333

#define KI_MAX (1 << 18) /* 262144 */

int set_value[KI_MAX * 2 - 1];
int get_value[KI_MAX * 2 - 1];

void ki_set_i(int idx, int qs, int qe, int ss, int se, int value) {
	if (qe <= ss || se <= qs) { /* 関係ない */
		/* nop */
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
		set_value[idx] = value;
		get_value[idx] = value - (se - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int li = idx * 2 + 1, ri = idx * 2 + 2;
		if (set_value[idx] >= 0) {
			set_value[li] = set_value[ri] = set_value[idx];
			get_value[li] = set_value[idx] - (sm - 1);
			get_value[ri] = set_value[idx] - (se - 1);
			set_value[idx] = -1;
		}
		ki_set_i(li, qs, qe, ss, sm, value);
		ki_set_i(ri, qs, qe, sm, se, value);
		get_value[idx] = get_value[li] <= get_value[ri] ? get_value[li] : get_value[ri];
	}
}

void ki_set(int qs, int qe, int value) {
	if (qs < qe) ki_set_i(0, qs, qe, 0, KI_MAX, value);
}

int ki_get_i(int idx, int qs, int qe, int ss, int se) {
	if (qe <= ss || se <= qs) { /* 関係ない */
#if 0
		printf("debug! (%d %d) %d %d -> INF\n", qs, qe, ss, se);
#endif
		return INF * 3;
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
#if 0
		printf("debug! (%d %d) %d %d -> %d\n", qs, qe, ss, se, get_value[idx]);
#endif
		return get_value[idx];
	} else if (set_value[idx] >= 0) {
#if 0
		printf("debug! (%d %d) %d %d --> %d\n", qs, qe, ss, se, set_value[idx] - ((qe <= se ? qe : se) - 1));
#endif
		return set_value[idx] - ((qe <= se ? qe : se) - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int left = ki_get_i(idx * 2 + 1, qs, qe, ss, sm);
		int right = ki_get_i(idx * 2 + 2, qs, qe, sm, se);
#if 0
		printf("debug! (%d %d) %d %d ---> %d\n", qs, qe, ss, se, left <= right ? left : right);
#endif
		return left <= right ? left : right;
	}
}

int ki_get(int qs, int qe) {
	return qs < qe ? ki_get_i(0, qs, qe, 0, KI_MAX) : INF;
}

int H, W;
int A[212345], B[212345];

int main(void) {
	int i;
	for (i = 0; i < KI_MAX * 2 - 1; i++) {
		set_value[i] = -1;
	}
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 0; i < H; i++) {
		if (scanf("%d%d", &A[i], &B[i]) != 2) return 1;
		A[i] = W - A[i];
		B[i] = W - B[i];
	}
	for (i = 0; i < W; i++) {
		ki_set(i, i + 1, i);
	}
	ki_set(W, W + 1, INF * 2);
	for (i = 0; i < H; i++) {
		int ret;
		ki_set(B[i], A[i] + 1, ki_get(A[i] + 1, A[i] + 2) + (A[i] + 1));
#if 0
		printf("debug [%d %d %d]", B[i], A[i], ki_get(A[i] + 1, A[i] + 2));
		for(int j = 0; j <= W; j++) printf(" %d", ki_get(j, j + 1));
		puts("");
#endif
		ret = ki_get(0, W);
		printf("%d\n", ret < INF ? ret + (i + 1) : -1);
	}
	return 0;
}

/*

右か下に移動 → 右に移動すると制約が強まる

右への移動回数min

.*** 0000
*... 0123
.**. x123
.*** xxx3
.... xxxx

上が*(下移動不可)のとき、左の数字+1
上が*(下移動不可)でないとき、min(左の数字+1, 上の数字)

セグ木
範囲set
indexを引き算した値のmin

左右反転
***. 0123
...* 3333
.**. 333*
***. 3***
.... ****

上が下移動不可の範囲を、その範囲の右の値にset

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	set_value
	.bss
	.align 32
	.type	set_value, @object
	.size	set_value, 2097148
set_value:
	.zero	2097148
	.globl	get_value
	.align 32
	.type	get_value, @object
	.size	get_value, 2097148
get_value:
	.zero	2097148
	.text
	.globl	ki_set_i
	.type	ki_set_i, @function
ki_set_i:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L5
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L3
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	-40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L5
.L3:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%eax, %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L4
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
.L4:
	movl	-40(%rbp), %r8d
	movl	-12(%rbp), %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-40(%rbp), %r8d
	movl	-36(%rbp), %edi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-4(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	get_value(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	get_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ki_set_i, .-ki_set_i
	.globl	ki_set
	.type	ki_set, @function
ki_set:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L8
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%ecx, %r9d
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_set_i
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ki_set, .-ki_set
	.globl	ki_get_i
	.type	ki_get_i, @function
ki_get_i:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L10
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L11
.L10:
	movl	$99999999, %eax
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L13
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	leal	-1(%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	jmp	.L12
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edi
	movl	-12(%rbp), %esi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	leal	(%rax,%rax), %edi
	movl	-36(%rbp), %esi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ki_get_i, .-ki_get_i
	.globl	ki_get
	.type	ki_get, @function
ki_get:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L16
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get_i
	jmp	.L18
.L16:
	movl	$33333333, %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	ki_get, .-ki_get
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 849380
A:
	.zero	849380
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 849380
B:
	.zero	849380
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L20
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L20:
	cmpl	$524286, -8(%rbp)
	jle	.L21
	leaq	W(%rip), %rax
	movq	%rax, %rdx
	leaq	H(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	movl	$0, -8(%rbp)
	jmp	.L24
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L25
	movl	$1, %eax
	jmp	.L23
.L25:
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L24:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L26
	movl	$0, -8(%rbp)
	jmp	.L27
.L28:
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	addl	$1, -8(%rbp)
.L27:
	movl	W(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	W(%rip), %eax
	leal	1(%rax), %ecx
	movl	W(%rip), %eax
	movl	$66666666, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	$0, -8(%rbp)
	jmp	.L29
.L32:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	2(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	ki_get
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	B(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	W(%rip), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get
	movl	%eax, -4(%rbp)
	cmpl	$33333332, -4(%rbp)
	jg	.L30
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	jmp	.L31
.L30:
	movl	$-1, %eax
.L31:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
.L29:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$0, %eax
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
user
	.file	"temp.c"
	.text
	.p2align 4
	.type	ki_set_i.part.0, @function
ki_set_i.part.0:
.LFB28:
	.cfi_startproc
	movl	%r8d, %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	subl	%ecx, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	movslq	%edi, %rbx
	leaq	set_value(%rip), %rax
	leal	(%rbx,%rbx), %r15d
	sarl	%r12d
	leal	1(%r15), %edi
	addl	%ecx, %r12d
	addl	$2, %r15d
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	(%rax,%rbx,4), %esi
	testl	%esi, %esi
	js	.L26
	movd	%esi, %xmm1
	movslq	%edi, %r10
	leal	-1(%r12), %r11d
	pshufd	$0xe0, %xmm1, %xmm0
	leaq	get_value(%rip), %r14
	movq	%xmm0, (%rax,%r10,4)
	movl	(%rax,%rbx,4), %esi
	movl	$-1, (%rax,%rbx,4)
	movl	%esi, %r8d
	subl	%r11d, %r8d
	movslq	%r15d, %r11
	movl	%r8d, (%r14,%r10,4)
	leal	-1(%rbp), %r8d
	subl	%r8d, %esi
	movl	%esi, (%r14,%r11,4)
.L2:
	cmpl	%edx, %ecx
	jge	.L3
	cmpl	%r13d, %r12d
	jle	.L3
	cmpl	%r13d, %ecx
	jl	.L4
	cmpl	%edx, %r12d
	jg	.L4
	leal	-1(%r12), %esi
	movl	%r9d, %ecx
	movl	%r9d, (%rax,%r10,4)
	subl	%esi, %ecx
	movl	%ecx, (%r14,%r10,4)
.L3:
	cmpl	%edx, %r12d
	jge	.L9
	cmpl	%r13d, %ebp
	jle	.L9
	cmpl	%r13d, %r12d
	jl	.L8
	cmpl	%edx, %ebp
	jg	.L8
	subl	$1, %ebp
	movl	%r9d, (%rax,%r11,4)
	subl	%ebp, %r9d
	movl	%r9d, (%r14,%r11,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%r14,%r11,4), %r9d
.L7:
	movl	(%r14,%r10,4), %eax
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	movl	%eax, (%r14,%rbx,4)
	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
.L8:
	.cfi_restore_state
	movl	%ebp, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %esi
	movl	%r15d, %edi
	movq	%r11, 8(%rsp)
	movq	%r10, (%rsp)
	call	ki_set_i.part.0
	movq	8(%rsp), %r11
	movq	(%rsp), %r10
	movl	(%r14,%r11,4), %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r12d, %r8d
	movl	%r13d, %esi
	movq	%r11, 24(%rsp)
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%edx, (%rsp)
	call	ki_set_i.part.0
	movq	24(%rsp), %r11
	movq	16(%rsp), %r10
	leaq	set_value(%rip), %rax
	movl	8(%rsp), %r9d
	movl	(%rsp), %edx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%edi, %r10
	leaq	get_value(%rip), %r14
	movslq	%r15d, %r11
	jmp	.L2
	.cfi_endproc
.LFE28:
	.size	ki_set_i.part.0, .-ki_set_i.part.0
	.p2align 4
	.type	ki_get_i.part.0, @function
ki_get_i.part.0:
.LFB30:
	.cfi_startproc
	movl	%r8d, %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	subl	%ecx, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	shrl	$31, %r12d
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	addl	%eax, %r12d
	leal	(%rdi,%rdi), %ebx
	sarl	%r12d
	addl	%ecx, %r12d
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%edx, %ecx
	jge	.L34
	cmpl	%esi, %r12d
	jle	.L34
	leal	1(%rbx), %edi
	cmpl	%esi, %ecx
	jl	.L29
	cmpl	%edx, %r12d
	jg	.L29
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %r15d
	leal	2(%rbx), %edi
	cmpl	%r13d, %r12d
	jl	.L49
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$99999999, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edi, %rax
	leaq	set_value(%rip), %rdx
	movl	(%rdx,%rax,4), %r15d
	testl	%r15d, %r15d
	js	.L30
	cmpl	%r13d, %r12d
	movl	%r13d, %eax
	cmovle	%r12d, %eax
	subl	$1, %eax
	subl	%eax, %r15d
.L28:
	leal	2(%rbx), %edi
	cmpl	%r13d, %r12d
	jge	.L35
.L49:
	cmpl	%esi, %ebp
	jle	.L35
	cmpl	%esi, %r12d
	jl	.L32
	cmpl	%r13d, %ebp
	jg	.L32
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %eax
.L31:
	cmpl	%r15d, %eax
	cmovg	%r15d, %eax
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	movslq	%edi, %rax
	leaq	set_value(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	testl	%eax, %eax
	js	.L33
	cmpl	%r13d, %ebp
	cmovle	%ebp, %r13d
	subl	$1, %r13d
	subl	%r13d, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L34:
	movl	$99999999, %r15d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L30:
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movl	%esi, 12(%rsp)
	call	ki_get_i.part.0
	movl	12(%rsp), %esi
	movl	%eax, %r15d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%ebp, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	call	ki_get_i.part.0
	jmp	.L31
	.cfi_endproc
.LFE30:
	.size	ki_get_i.part.0, .-ki_get_i.part.0
	.p2align 4
	.type	ki_set.part.0, @function
ki_set.part.0:
.LFB29:
	.cfi_startproc
	testl	%esi, %esi
	jle	.L78
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$262143, %edi
	jg	.L50
	testl	%edi, %edi
	movl	%esi, %r12d
	movl	%edx, %r13d
	setle	%al
	cmpl	$262143, %esi
	setg	%bl
	testb	%al, %al
	je	.L52
	testb	%bl, %bl
	je	.L52
	movl	%edx, set_value(%rip)
	leal	-262143(%rdx), %edx
	movl	%edx, get_value(%rip)
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	.cfi_restore_state
	movq	.LC0(%rip), %xmm1
	movl	set_value(%rip), %edx
	movd	%edx, %xmm2
	pshufd	$0xe0, %xmm2, %xmm0
	paddd	%xmm1, %xmm0
	testl	%edx, %edx
	js	.L53
	movl	%edx, 8+set_value(%rip)
	movl	%edx, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L53:
	cmpl	$131071, %ebp
	jle	.L83
.L54:
	cmpl	$131072, %r12d
	jle	.L82
	cmpl	$131072, %ebp
	jg	.L56
	testb	%bl, %bl
	je	.L56
	leal	-262143(%r13), %edx
	movl	%r13d, 8+set_value(%rip)
	movl	4+get_value(%rip), %eax
	movl	%edx, 8+get_value(%rip)
.L57:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	%edx, get_value(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L78:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	cmpl	$131071, %r12d
	jle	.L55
	testb	%al, %al
	je	.L55
	leal	-131071(%r13), %eax
	movl	%r13d, 4+set_value(%rip)
	movl	%eax, 4+get_value(%rip)
	cmpl	$131072, %r12d
	je	.L81
.L56:
	movl	%r13d, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebp, %esi
	movl	%r12d, %edx
	movl	$2, %edi
	call	ki_set_i.part.0
.L82:
	movl	4+get_value(%rip), %eax
.L81:
	movl	8+get_value(%rip), %edx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L55:
	movl	%r13d, %r9d
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i.part.0
	jmp	.L54
	.cfi_endproc
.LFE29:
	.size	ki_set.part.0, .-ki_set.part.0
	.p2align 4
	.globl	ki_set_i
	.type	ki_set_i, @function
ki_set_i:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	jle	.L114
	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
	movl	%r8d, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%esi, %r8d
	jle	.L84
	movl	%edx, %r12d
	cmpl	%esi, %ecx
	movslq	%edi, %rbp
	setge	%dl
	cmpl	%r8d, %r12d
	setge	%al
	testb	%dl, %dl
	je	.L86
	testb	%al, %al
	je	.L86
	leaq	set_value(%rip), %rax
	subl	$1, %ebx
	movl	%r9d, (%rax,%rbp,4)
	subl	%ebx, %r9d
	leaq	get_value(%rip), %rax
	movl	%r9d, (%rax,%rbp,4)
.L84:
	addq	$56, %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
.L86:
	.cfi_restore_state
	movl	%ebx, %edi
	leaq	set_value(%rip), %r15
	subl	%ecx, %edi
	movl	%edi, %r13d
	shrl	$31, %r13d
	addl	%edi, %r13d
	leal	(%rbp,%rbp), %edi
	leal	2(%rdi), %r8d
	leal	1(%rdi), %r11d
	movl	(%r15,%rbp,4), %edi
	sarl	%r13d
	movl	%r8d, 20(%rsp)
	addl	%ecx, %r13d
	movd	%edi, %xmm1
	pshufd	$0xe0, %xmm1, %xmm0
	testl	%edi, %edi
	js	.L119
	movslq	%r11d, %r10
	leal	-1(%r13), %r8d
	leaq	get_value(%rip), %r14
	movq	%xmm0, (%r15,%r10,4)
	movl	(%r15,%rbp,4), %edi
	subl	%r8d, %edi
	leal	-1(%rbx), %r8d
	movl	%edi, (%r14,%r10,4)
	movslq	20(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	movl	(%r15,%rbp,4), %edi
	movl	$-1, (%r15,%rbp,4)
	subl	%r8d, %edi
	movq	8(%rsp), %r8
	movl	%edi, (%r14,%r8,4)
	cmpl	%r13d, %esi
	jge	.L88
.L120:
	cmpl	%r13d, %r12d
	jl	.L89
	testb	%dl, %dl
	je	.L89
	leal	-1(%r13), %edx
	movl	%r9d, %eax
	movl	%r9d, (%r15,%r10,4)
	subl	%edx, %eax
	movl	%eax, (%r14,%r10,4)
	cmpl	%r13d, %r12d
	jne	.L90
	.p2align 4,,10
	.p2align 3
.L117:
	movq	8(%rsp), %rbx
	movl	(%r14,%rbx,4), %r9d
.L91:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	movl	%r9d, (%r14,%rbp,4)
	addq	$56, %rsp
	.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
.L114:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.p2align 4,,10
	.p2align 3
.L119:
	.cfi_def_cfa_offset 112
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movslq	%r8d, %rdi
	leaq	get_value(%rip), %r14
	movslq	%r11d, %r10
	movq	%rdi, 8(%rsp)
	cmpl	%r13d, %esi
	jl	.L120
.L88:
	cmpl	%r13d, %r12d
	jle	.L118
	cmpl	%r13d, %esi
	jg	.L90
	testb	%al, %al
	je	.L90
	movq	8(%rsp), %rax
	subl	$1, %ebx
	movl	%r9d, (%r15,%rax,4)
	subl	%ebx, %r9d
	movl	%r9d, (%r14,%rax,4)
	movl	(%r14,%r10,4), %eax
	jmp	.L91
	.p2align 4,,10
	.p2align 3
.L90:
	movl	20(%rsp), %edi
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movq	%r10, 24(%rsp)
	call	ki_set_i.part.0
	movq	24(%rsp), %r10
.L118:
	movl	(%r14,%r10,4), %eax
	jmp	.L117
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r13d, %r8d
	movl	%r12d, %edx
	movl	%r11d, %edi
	movq	%r10, 40(%rsp)
	movb	%al, 39(%rsp)
	movl	%r9d, 32(%rsp)
	movl	%esi, 24(%rsp)
	call	ki_set_i.part.0
	movq	40(%rsp), %r10
	movzbl	39(%rsp), %eax
	movl	32(%rsp), %r9d
	movl	24(%rsp), %esi
	jmp	.L88
	.cfi_endproc
.LFE23:
	.size	ki_set_i, .-ki_set_i
	.p2align 4
	.globl	ki_set
	.type	ki_set, @function
ki_set:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jl	.L145
	ret
	.p2align 4,,10
	.p2align 3
.L145:
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testl	%esi, %esi
	jle	.L121
	movl	%edi, %ebp
	cmpl	$262143, %edi
	jg	.L121
	cmpl	$262143, %esi
	movl	%edx, %ebx
	setg	%r13b
	testl	%edi, %edi
	jg	.L123
	testb	%r13b, %r13b
	je	.L123
	movl	%edx, set_value(%rip)
	leal	-262143(%rdx), %edx
	movl	%edx, get_value(%rip)
.L121:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L123:
	.cfi_restore_state
	movq	.LC0(%rip), %xmm1
	movl	set_value(%rip), %eax
	movd	%eax, %xmm2
	pshufd	$0xe0, %xmm2, %xmm0
	paddd	%xmm1, %xmm0
	testl	%eax, %eax
	js	.L124
	movl	%eax, 8+set_value(%rip)
	movl	%eax, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L124:
	xorl	%ecx, %ecx
	movl	%ebx, %r9d
	movl	$131072, %r8d
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i
	cmpl	$131072, %r12d
	jle	.L144
	cmpl	$131072, %ebp
	jg	.L127
	testb	%r13b, %r13b
	je	.L127
	leal	-262143(%rbx), %edx
	movl	%ebx, 8+set_value(%rip)
	movl	%edx, 8+get_value(%rip)
	jmp	.L126
	.p2align 4,,10
	.p2align 3
.L127:
	movl	%ebx, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebp, %esi
	movl	%r12d, %edx
	movl	$2, %edi
	call	ki_set_i.part.0
.L144:
	movl	8+get_value(%rip), %edx
.L126:
	movl	4+get_value(%rip), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, get_value(%rip)
	jmp	.L121
	.cfi_endproc
.LFE24:
	.size	ki_set, .-ki_set
	.p2align 4
	.globl	ki_get_i
	.type	ki_get_i, @function
ki_get_i:
.LFB25:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	jle	.L150
	cmpl	%esi, %r8d
	jle	.L150
	cmpl	%esi, %ecx
	jl	.L148
	cmpl	%r8d, %edx
	jl	.L148
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L148:
	movslq	%edi, %rax
	leaq	set_value(%rip), %r9
	movl	(%r9,%rax,4), %eax
	testl	%eax, %eax
	js	.L149
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L150:
	movl	$99999999, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L149:
	jmp	ki_get_i.part.0
	.cfi_endproc
.LFE25:
	.size	ki_get_i, .-ki_get_i
	.p2align 4
	.globl	ki_get
	.type	ki_get, @function
ki_get:
.LFB26:
	.cfi_startproc
	endbr64
	movl	$33333333, %eax
	cmpl	%esi, %edi
	jl	.L195
	ret
	.p2align 4,,10
	.p2align 3
.L195:
	movl	%esi, %r9d
	testl	%esi, %esi
	jle	.L168
	movl	%edi, %r11d
	cmpl	$262143, %edi
	jg	.L168
	testl	%edi, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	setle	%dl
	cmpl	$262143, %esi
	setg	%bl
	testb	%dl, %dl
	je	.L159
	movl	get_value(%rip), %eax
	testb	%bl, %bl
	je	.L159
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L159:
	.cfi_restore_state
	movl	set_value(%rip), %eax
	testl	%eax, %eax
	js	.L160
	movl	$262144, %edx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L160:
	.cfi_restore_state
	cmpl	$131071, %r11d
	jg	.L169
	cmpl	$131071, %r9d
	jle	.L162
	testb	%dl, %dl
	je	.L162
	movl	4+get_value(%rip), %r10d
	movl	$99999999, %eax
	cmpl	$131072, %r9d
	je	.L163
.L164:
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L166
	movl	$262144, %edx
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
.L163:
	cmpl	%eax, %r10d
	popq	%rbx
	.cfi_def_cfa_offset 8
	cmovle	%r10d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L168:
	.cfi_restore 3
	movl	$99999999, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L169:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$99999999, %r10d
.L161:
	movl	$99999999, %eax
	cmpl	$131072, %r9d
	jle	.L163
	cmpl	$131072, %r11d
	jg	.L164
	movl	8+get_value(%rip), %eax
	testb	%bl, %bl
	jne	.L163
	jmp	.L164
	.p2align 4,,10
	.p2align 3
.L162:
	movl	4+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L165
	movl	$131072, %edx
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %r10d
	jmp	.L161
.L166:
	movl	$131072, %ecx
	movl	%r9d, %edx
	movl	%r11d, %esi
	movl	$2, %edi
	movl	$262144, %r8d
	call	ki_get_i.part.0
	jmp	.L163
.L165:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r9d, %edx
	movl	%r11d, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L161
	.cfi_endproc
.LFE26:
	.size	ki_get, .-ki_get
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$2097148, %edx
	movl	$255, %esi
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	set_value(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	memset@PLT
	xorl	%eax, %eax
	leaq	W(%rip), %rdx
	movq	%r14, %rdi
	leaq	H(%rip), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L202
	xorl	%r12d, %r12d
	cmpl	$0, H(%rip)
	leaq	A(%rip), %rbp
	leaq	B(%rip), %rbx
	jg	.L203
	movl	W(%rip), %edi
.L204:
	movq	.LC0(%rip), %xmm2
	xorl	%ebx, %ebx
	testl	%edi, %edi
	jle	.L201
	.p2align 4,,10
	.p2align 3
.L200:
	movl	%ebx, %ebp
	addl	$1, %ebx
	cmpl	$262143, %ebp
	ja	.L205
	movl	0(%r13), %eax
	movd	%eax, %xmm1
	pshufd	$0xe0, %xmm1, %xmm0
	paddd	%xmm2, %xmm0
	testl	%eax, %eax
	js	.L206
	movl	%eax, 8+set_value(%rip)
	movl	%eax, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L206:
	cmpl	$131071, %ebp
	jg	.L207
	movl	%ebp, %r9d
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i.part.0
.L207:
	cmpl	$131072, %ebx
	jg	.L244
.L208:
	movl	4+get_value(%rip), %eax
	movl	8+get_value(%rip), %edx
	movl	W(%rip), %edi
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, get_value(%rip)
.L205:
	cmpl	%edi, %ebx
	jl	.L200
.L201:
	leal	1(%rdi), %esi
	movl	$66666666, %edx
	xorl	%ebx, %ebx
	call	ki_set.part.0
	cmpl	$0, H(%rip)
	leaq	A(%rip), %r14
	leaq	B(%rip), %r12
	leaq	.LC2(%rip), %rbp
	jg	.L209
	jmp	.L227
	.p2align 4,,10
	.p2align 3
.L216:
	movl	W(%rip), %r9d
	movl	$-1, %edx
	testl	%r9d, %r9d
	jle	.L217
	movl	get_value(%rip), %eax
	cmpl	$262143, %r9d
	jg	.L219
	movl	0(%r13), %eax
	testl	%eax, %eax
	js	.L220
	subl	$1, %r9d
	subl	%r9d, %eax
.L219:
	leal	1(%rax,%rbx), %edx
	cmpl	$33333333, %eax
	movl	$-1, %eax
	cmovge	%eax, %edx
.L217:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpl	%ebx, H(%rip)
	jle	.L227
.L209:
	movl	(%r14,%rbx,4), %edx
	movl	$99999999, %eax
	leal	1(%rdx), %r9d
	cmpl	$262143, %r9d
	ja	.L210
	movl	0(%r13), %eax
	leal	2(%rdx), %r11d
	testl	%eax, %eax
	js	.L211
	subl	%r9d, %eax
.L210:
	movl	(%r12,%rbx,4), %edi
	cmpl	%edi, %r9d
	jle	.L216
	leal	(%r9,%rax), %edx
	movl	%r9d, %esi
	call	ki_set.part.0
	jmp	.L216
	.p2align 4,,10
	.p2align 3
.L245:
	movl	W(%rip), %edi
	addl	$1, %r12d
	addq	$4, %rbp
	addq	$4, %rbx
	movl	%edi, %eax
	subl	-4(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	%edi, %eax
	subl	-4(%rbx), %eax
	movl	%eax, -4(%rbx)
	cmpl	%r12d, H(%rip)
	jle	.L204
.L203:
	xorl	%eax, %eax
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L245
.L202:
	movl	$1, %eax
.L196:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L211:
	.cfi_restore_state
	cmpl	$131071, %r9d
	jg	.L231
	movl	4+set_value(%rip), %r10d
	testl	%r10d, %r10d
	js	.L213
	movl	$131072, %eax
	cmpl	%eax, %r11d
	cmovle	%r11d, %eax
	subl	$1, %eax
	subl	%eax, %r10d
.L212:
	cmpl	$131072, %r11d
	jle	.L232
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L215
	subl	%r9d, %eax
.L214:
	cmpl	%r10d, %eax
	cmovg	%r10d, %eax
	jmp	.L210
.L227:
	xorl	%eax, %eax
	jmp	.L196
.L244:
	movl	%ebp, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movl	$2, %edi
	call	ki_set_i.part.0
	jmp	.L208
.L220:
	cmpl	$131071, %r9d
	jg	.L246
	movl	4+set_value(%rip), %r10d
	testl	%r10d, %r10d
	js	.L224
	subl	$1, %r9d
	subl	%r9d, %r10d
.L234:
	movl	$99999999, %eax
.L222:
	cmpl	%eax, %r10d
	cmovle	%r10d, %eax
	jmp	.L219
.L246:
	movl	4+get_value(%rip), %r10d
	cmpl	$131072, %r9d
	je	.L234
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L226
	subl	$1, %r9d
	subl	%r9d, %eax
	jmp	.L222
.L231:
	movl	$99999999, %r10d
	jmp	.L212
.L213:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r11d, %edx
	movl	%r9d, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L212
.L215:
	movl	$131072, %ecx
	movl	%r11d, %edx
	movl	%r9d, %esi
	movl	$2, %edi
	movl	$262144, %r8d
	call	ki_get_i.part.0
	jmp	.L214
.L232:
	movl	$99999999, %eax
	jmp	.L214
.L224:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r9d, %edx
	xorl	%esi, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L234
.L226:
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%r9d, %edx
	xorl	%esi, %esi
	movl	$2, %edi
	call	ki_get_i.part.0
	jmp	.L222
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 849380
B:
	.zero	849380
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 849380
A:
	.zero	849380
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	get_value
	.align 32
	.type	get_value, @object
	.size	get_value, 2097148
get_value:
	.zero	2097148
	.globl	set_value
	.align 32
	.type	set_value, @object
	.size	set_value, 2097148
set_value:
	.zero	2097148
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-131071
	.long	-262143
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

rule
	.file	"temp.c"
	.text
	.p2align 4
	.type	ki_set_i.part.0, @function
ki_set_i.part.0:
.LFB28:
	.cfi_startproc
	movl	%r8d, %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	subl	%ecx, %eax
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	movl	%esi, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	shrl	$31, %r12d
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	addl	%eax, %r12d
	movslq	%edi, %rbx
	leaq	set_value(%rip), %rax
	leal	(%rbx,%rbx), %r15d
	sarl	%r12d
	leal	1(%r15), %edi
	addl	%ecx, %r12d
	addl	$2, %r15d
	subq	$40, %rsp
	.cfi_def_cfa_offset 96
	movl	(%rax,%rbx,4), %esi
	testl	%esi, %esi
	js	.L26
	movd	%esi, %xmm1
	movslq	%edi, %r10
	leal	-1(%r12), %r11d
	pshufd	$0xe0, %xmm1, %xmm0
	leaq	get_value(%rip), %r14
	movq	%xmm0, (%rax,%r10,4)
	movl	(%rax,%rbx,4), %esi
	movl	$-1, (%rax,%rbx,4)
	movl	%esi, %r8d
	subl	%r11d, %r8d
	movslq	%r15d, %r11
	movl	%r8d, (%r14,%r10,4)
	leal	-1(%rbp), %r8d
	subl	%r8d, %esi
	movl	%esi, (%r14,%r11,4)
.L2:
	cmpl	%edx, %ecx
	jge	.L3
	cmpl	%r13d, %r12d
	jle	.L3
	cmpl	%r13d, %ecx
	jl	.L4
	cmpl	%edx, %r12d
	jg	.L4
	leal	-1(%r12), %esi
	movl	%r9d, %ecx
	movl	%r9d, (%rax,%r10,4)
	subl	%esi, %ecx
	movl	%ecx, (%r14,%r10,4)
.L3:
	cmpl	%edx, %r12d
	jge	.L9
	cmpl	%r13d, %ebp
	jle	.L9
	cmpl	%r13d, %r12d
	jl	.L8
	cmpl	%edx, %ebp
	jg	.L8
	subl	$1, %ebp
	movl	%r9d, (%rax,%r11,4)
	subl	%ebp, %r9d
	movl	%r9d, (%r14,%r11,4)
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L9:
	movl	(%r14,%r11,4), %r9d
.L7:
	movl	(%r14,%r10,4), %eax
	cmpl	%r9d, %eax
	cmovg	%r9d, %eax
	movl	%eax, (%r14,%rbx,4)
	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
.L8:
	.cfi_restore_state
	movl	%ebp, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %esi
	movl	%r15d, %edi
	movq	%r11, 8(%rsp)
	movq	%r10, (%rsp)
	call	ki_set_i.part.0
	movq	8(%rsp), %r11
	movq	(%rsp), %r10
	movl	(%r14,%r11,4), %r9d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	movl	%r12d, %r8d
	movl	%r13d, %esi
	movq	%r11, 24(%rsp)
	movq	%r10, 16(%rsp)
	movl	%r9d, 8(%rsp)
	movl	%edx, (%rsp)
	call	ki_set_i.part.0
	movq	24(%rsp), %r11
	movq	16(%rsp), %r10
	leaq	set_value(%rip), %rax
	movl	8(%rsp), %r9d
	movl	(%rsp), %edx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L26:
	movslq	%edi, %r10
	leaq	get_value(%rip), %r14
	movslq	%r15d, %r11
	jmp	.L2
	.cfi_endproc
.LFE28:
	.size	ki_set_i.part.0, .-ki_set_i.part.0
	.p2align 4
	.type	ki_get_i.part.0, @function
ki_get_i.part.0:
.LFB30:
	.cfi_startproc
	movl	%r8d, %eax
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	subl	%ecx, %eax
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movl	%edx, %r13d
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movl	%eax, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	shrl	$31, %r12d
	movl	%r8d, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	addl	%eax, %r12d
	leal	(%rdi,%rdi), %ebx
	sarl	%r12d
	addl	%ecx, %r12d
	subq	$16, %rsp
	.cfi_def_cfa_offset 64
	cmpl	%edx, %ecx
	jge	.L34
	cmpl	%esi, %r12d
	jle	.L34
	leal	1(%rbx), %edi
	cmpl	%esi, %ecx
	jl	.L29
	cmpl	%edx, %r12d
	jg	.L29
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %r15d
	leal	2(%rbx), %edi
	cmpl	%r13d, %r12d
	jl	.L49
	.p2align 4,,10
	.p2align 3
.L35:
	movl	$99999999, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L29:
	movslq	%edi, %rax
	leaq	set_value(%rip), %rdx
	movl	(%rdx,%rax,4), %r15d
	testl	%r15d, %r15d
	js	.L30
	cmpl	%r13d, %r12d
	movl	%r13d, %eax
	cmovle	%r12d, %eax
	subl	$1, %eax
	subl	%eax, %r15d
.L28:
	leal	2(%rbx), %edi
	cmpl	%r13d, %r12d
	jge	.L35
.L49:
	cmpl	%esi, %ebp
	jle	.L35
	cmpl	%esi, %r12d
	jl	.L32
	cmpl	%r13d, %ebp
	jg	.L32
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %eax
.L31:
	cmpl	%r15d, %eax
	cmovg	%r15d, %eax
	addq	$16, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L32:
	.cfi_restore_state
	movslq	%edi, %rax
	leaq	set_value(%rip), %rdx
	movl	(%rdx,%rax,4), %eax
	testl	%eax, %eax
	js	.L33
	cmpl	%r13d, %ebp
	cmovle	%ebp, %r13d
	subl	$1, %r13d
	subl	%r13d, %eax
	jmp	.L31
	.p2align 4,,10
	.p2align 3
.L34:
	movl	$99999999, %r15d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L30:
	movl	%r12d, %r8d
	movl	%r13d, %edx
	movl	%esi, 12(%rsp)
	call	ki_get_i.part.0
	movl	12(%rsp), %esi
	movl	%eax, %r15d
	jmp	.L28
	.p2align 4,,10
	.p2align 3
.L33:
	movl	%ebp, %r8d
	movl	%r12d, %ecx
	movl	%r13d, %edx
	call	ki_get_i.part.0
	jmp	.L31
	.cfi_endproc
.LFE30:
	.size	ki_get_i.part.0, .-ki_get_i.part.0
	.p2align 4
	.type	ki_set.part.0, @function
ki_set.part.0:
.LFB29:
	.cfi_startproc
	testl	%esi, %esi
	jle	.L78
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	movl	%edi, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	cmpl	$262143, %edi
	jg	.L50
	testl	%edi, %edi
	movl	%esi, %r12d
	movl	%edx, %r13d
	setle	%al
	cmpl	$262143, %esi
	setg	%bl
	testb	%al, %al
	je	.L52
	testb	%bl, %bl
	je	.L52
	movl	%edx, set_value(%rip)
	leal	-262143(%rdx), %edx
	movl	%edx, get_value(%rip)
.L50:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	.cfi_restore_state
	movq	.LC0(%rip), %xmm1
	movl	set_value(%rip), %edx
	movd	%edx, %xmm2
	pshufd	$0xe0, %xmm2, %xmm0
	paddd	%xmm1, %xmm0
	testl	%edx, %edx
	js	.L53
	movl	%edx, 8+set_value(%rip)
	movl	%edx, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L53:
	cmpl	$131071, %ebp
	jle	.L83
.L54:
	cmpl	$131072, %r12d
	jle	.L82
	cmpl	$131072, %ebp
	jg	.L56
	testb	%bl, %bl
	je	.L56
	leal	-262143(%r13), %edx
	movl	%r13d, 8+set_value(%rip)
	movl	4+get_value(%rip), %eax
	movl	%edx, 8+get_value(%rip)
.L57:
	cmpl	%eax, %edx
	cmovg	%eax, %edx
	movl	%edx, get_value(%rip)
	addq	$8, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L78:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	ret
	.p2align 4,,10
	.p2align 3
.L83:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	cmpl	$131071, %r12d
	jle	.L55
	testb	%al, %al
	je	.L55
	leal	-131071(%r13), %eax
	movl	%r13d, 4+set_value(%rip)
	movl	%eax, 4+get_value(%rip)
	cmpl	$131072, %r12d
	je	.L81
.L56:
	movl	%r13d, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebp, %esi
	movl	%r12d, %edx
	movl	$2, %edi
	call	ki_set_i.part.0
.L82:
	movl	4+get_value(%rip), %eax
.L81:
	movl	8+get_value(%rip), %edx
	jmp	.L57
	.p2align 4,,10
	.p2align 3
.L55:
	movl	%r13d, %r9d
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i.part.0
	jmp	.L54
	.cfi_endproc
.LFE29:
	.size	ki_set.part.0, .-ki_set.part.0
	.p2align 4
	.globl	ki_set_i
	.type	ki_set_i, @function
ki_set_i:
.LFB23:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	jle	.L114
	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
	movl	%r8d, %ebx
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	cmpl	%esi, %r8d
	jle	.L84
	movl	%edx, %r12d
	cmpl	%esi, %ecx
	movslq	%edi, %rbp
	setge	%dl
	cmpl	%r8d, %r12d
	setge	%al
	testb	%dl, %dl
	je	.L86
	testb	%al, %al
	je	.L86
	leaq	set_value(%rip), %rax
	subl	$1, %ebx
	movl	%r9d, (%rax,%rbp,4)
	subl	%ebx, %r9d
	leaq	get_value(%rip), %rax
	movl	%r9d, (%rax,%rbp,4)
.L84:
	addq	$56, %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
.L86:
	.cfi_restore_state
	movl	%ebx, %edi
	leaq	set_value(%rip), %r15
	subl	%ecx, %edi
	movl	%edi, %r13d
	shrl	$31, %r13d
	addl	%edi, %r13d
	leal	(%rbp,%rbp), %edi
	leal	2(%rdi), %r8d
	leal	1(%rdi), %r11d
	movl	(%r15,%rbp,4), %edi
	sarl	%r13d
	movl	%r8d, 20(%rsp)
	addl	%ecx, %r13d
	movd	%edi, %xmm1
	pshufd	$0xe0, %xmm1, %xmm0
	testl	%edi, %edi
	js	.L119
	movslq	%r11d, %r10
	leal	-1(%r13), %r8d
	leaq	get_value(%rip), %r14
	movq	%xmm0, (%r15,%r10,4)
	movl	(%r15,%rbp,4), %edi
	subl	%r8d, %edi
	leal	-1(%rbx), %r8d
	movl	%edi, (%r14,%r10,4)
	movslq	20(%rsp), %rdi
	movq	%rdi, 8(%rsp)
	movl	(%r15,%rbp,4), %edi
	movl	$-1, (%r15,%rbp,4)
	subl	%r8d, %edi
	movq	8(%rsp), %r8
	movl	%edi, (%r14,%r8,4)
	cmpl	%r13d, %esi
	jge	.L88
.L120:
	cmpl	%r13d, %r12d
	jl	.L89
	testb	%dl, %dl
	je	.L89
	leal	-1(%r13), %edx
	movl	%r9d, %eax
	movl	%r9d, (%r15,%r10,4)
	subl	%edx, %eax
	movl	%eax, (%r14,%r10,4)
	cmpl	%r13d, %r12d
	jne	.L90
	.p2align 4,,10
	.p2align 3
.L117:
	movq	8(%rsp), %rbx
	movl	(%r14,%rbx,4), %r9d
.L91:
	cmpl	%eax, %r9d
	cmovg	%eax, %r9d
	movl	%r9d, (%r14,%rbp,4)
	addq	$56, %rsp
	.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
.L114:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.p2align 4,,10
	.p2align 3
.L119:
	.cfi_def_cfa_offset 112
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	movslq	%r8d, %rdi
	leaq	get_value(%rip), %r14
	movslq	%r11d, %r10
	movq	%rdi, 8(%rsp)
	cmpl	%r13d, %esi
	jl	.L120
.L88:
	cmpl	%r13d, %r12d
	jle	.L118
	cmpl	%r13d, %esi
	jg	.L90
	testb	%al, %al
	je	.L90
	movq	8(%rsp), %rax
	subl	$1, %ebx
	movl	%r9d, (%r15,%rax,4)
	subl	%ebx, %r9d
	movl	%r9d, (%r14,%rax,4)
	movl	(%r14,%r10,4), %eax
	jmp	.L91
	.p2align 4,,10
	.p2align 3
.L90:
	movl	20(%rsp), %edi
	movl	%ebx, %r8d
	movl	%r13d, %ecx
	movl	%r12d, %edx
	movq	%r10, 24(%rsp)
	call	ki_set_i.part.0
	movq	24(%rsp), %r10
.L118:
	movl	(%r14,%r10,4), %eax
	jmp	.L117
	.p2align 4,,10
	.p2align 3
.L89:
	movl	%r13d, %r8d
	movl	%r12d, %edx
	movl	%r11d, %edi
	movq	%r10, 40(%rsp)
	movb	%al, 39(%rsp)
	movl	%r9d, 32(%rsp)
	movl	%esi, 24(%rsp)
	call	ki_set_i.part.0
	movq	40(%rsp), %r10
	movzbl	39(%rsp), %eax
	movl	32(%rsp), %r9d
	movl	24(%rsp), %esi
	jmp	.L88
	.cfi_endproc
.LFE23:
	.size	ki_set_i, .-ki_set_i
	.p2align 4
	.globl	ki_set
	.type	ki_set, @function
ki_set:
.LFB24:
	.cfi_startproc
	endbr64
	cmpl	%esi, %edi
	jl	.L145
	ret
	.p2align 4,,10
	.p2align 3
.L145:
	pushq	%r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	pushq	%r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	movl	%esi, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	subq	$8, %rsp
	.cfi_def_cfa_offset 48
	testl	%esi, %esi
	jle	.L121
	movl	%edi, %ebp
	cmpl	$262143, %edi
	jg	.L121
	cmpl	$262143, %esi
	movl	%edx, %ebx
	setg	%r13b
	testl	%edi, %edi
	jg	.L123
	testb	%r13b, %r13b
	je	.L123
	movl	%edx, set_value(%rip)
	leal	-262143(%rdx), %edx
	movl	%edx, get_value(%rip)
.L121:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%rbp
	.cfi_def_cfa_offset 24
	popq	%r12
	.cfi_def_cfa_offset 16
	popq	%r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L123:
	.cfi_restore_state
	movq	.LC0(%rip), %xmm1
	movl	set_value(%rip), %eax
	movd	%eax, %xmm2
	pshufd	$0xe0, %xmm2, %xmm0
	paddd	%xmm1, %xmm0
	testl	%eax, %eax
	js	.L124
	movl	%eax, 8+set_value(%rip)
	movl	%eax, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L124:
	xorl	%ecx, %ecx
	movl	%ebx, %r9d
	movl	$131072, %r8d
	movl	%r12d, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i
	cmpl	$131072, %r12d
	jle	.L144
	cmpl	$131072, %ebp
	jg	.L127
	testb	%r13b, %r13b
	je	.L127
	leal	-262143(%rbx), %edx
	movl	%ebx, 8+set_value(%rip)
	movl	%edx, 8+get_value(%rip)
	jmp	.L126
	.p2align 4,,10
	.p2align 3
.L127:
	movl	%ebx, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebp, %esi
	movl	%r12d, %edx
	movl	$2, %edi
	call	ki_set_i.part.0
.L144:
	movl	8+get_value(%rip), %edx
.L126:
	movl	4+get_value(%rip), %eax
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, get_value(%rip)
	jmp	.L121
	.cfi_endproc
.LFE24:
	.size	ki_set, .-ki_set
	.p2align 4
	.globl	ki_get_i
	.type	ki_get_i, @function
ki_get_i:
.LFB25:
	.cfi_startproc
	endbr64
	cmpl	%ecx, %edx
	jle	.L150
	cmpl	%esi, %r8d
	jle	.L150
	cmpl	%esi, %ecx
	jl	.L148
	cmpl	%r8d, %edx
	jl	.L148
	movslq	%edi, %rdi
	leaq	get_value(%rip), %rax
	movl	(%rax,%rdi,4), %eax
	ret
	.p2align 4,,10
	.p2align 3
.L148:
	movslq	%edi, %rax
	leaq	set_value(%rip), %r9
	movl	(%r9,%rax,4), %eax
	testl	%eax, %eax
	js	.L149
	cmpl	%r8d, %edx
	cmovg	%r8d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L150:
	movl	$99999999, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L149:
	jmp	ki_get_i.part.0
	.cfi_endproc
.LFE25:
	.size	ki_get_i, .-ki_get_i
	.p2align 4
	.globl	ki_get
	.type	ki_get, @function
ki_get:
.LFB26:
	.cfi_startproc
	endbr64
	movl	$33333333, %eax
	cmpl	%esi, %edi
	jl	.L195
	ret
	.p2align 4,,10
	.p2align 3
.L195:
	movl	%esi, %r9d
	testl	%esi, %esi
	jle	.L168
	movl	%edi, %r11d
	cmpl	$262143, %edi
	jg	.L168
	testl	%edi, %edi
	pushq	%rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	setle	%dl
	cmpl	$262143, %esi
	setg	%bl
	testb	%dl, %dl
	je	.L159
	movl	get_value(%rip), %eax
	testb	%bl, %bl
	je	.L159
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L159:
	.cfi_restore_state
	movl	set_value(%rip), %eax
	testl	%eax, %eax
	js	.L160
	movl	$262144, %edx
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L160:
	.cfi_restore_state
	cmpl	$131071, %r11d
	jg	.L169
	cmpl	$131071, %r9d
	jle	.L162
	testb	%dl, %dl
	je	.L162
	movl	4+get_value(%rip), %r10d
	movl	$99999999, %eax
	cmpl	$131072, %r9d
	je	.L163
.L164:
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L166
	movl	$262144, %edx
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
.L163:
	cmpl	%eax, %r10d
	popq	%rbx
	.cfi_def_cfa_offset 8
	cmovle	%r10d, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L168:
	.cfi_restore 3
	movl	$99999999, %eax
	ret
	.p2align 4,,10
	.p2align 3
.L169:
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	movl	$99999999, %r10d
.L161:
	movl	$99999999, %eax
	cmpl	$131072, %r9d
	jle	.L163
	cmpl	$131072, %r11d
	jg	.L164
	movl	8+get_value(%rip), %eax
	testb	%bl, %bl
	jne	.L163
	jmp	.L164
	.p2align 4,,10
	.p2align 3
.L162:
	movl	4+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L165
	movl	$131072, %edx
	cmpl	%edx, %r9d
	cmovle	%r9d, %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %r10d
	jmp	.L161
.L166:
	movl	$131072, %ecx
	movl	%r9d, %edx
	movl	%r11d, %esi
	movl	$2, %edi
	movl	$262144, %r8d
	call	ki_get_i.part.0
	jmp	.L163
.L165:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r9d, %edx
	movl	%r11d, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L161
	.cfi_endproc
.LFE26:
	.size	ki_get, .-ki_get
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%d\n"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB27:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	movl	$2097148, %edx
	movl	$255, %esi
	leaq	.LC1(%rip), %r14
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	leaq	set_value(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	movq	%r13, %rdi
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	memset@PLT
	xorl	%eax, %eax
	leaq	W(%rip), %rdx
	movq	%r14, %rdi
	leaq	H(%rip), %rsi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	jne	.L202
	xorl	%r12d, %r12d
	cmpl	$0, H(%rip)
	leaq	A(%rip), %rbp
	leaq	B(%rip), %rbx
	jg	.L203
	movl	W(%rip), %edi
.L204:
	movq	.LC0(%rip), %xmm2
	xorl	%ebx, %ebx
	testl	%edi, %edi
	jle	.L201
	.p2align 4,,10
	.p2align 3
.L200:
	movl	%ebx, %ebp
	addl	$1, %ebx
	cmpl	$262143, %ebp
	ja	.L205
	movl	0(%r13), %eax
	movd	%eax, %xmm1
	pshufd	$0xe0, %xmm1, %xmm0
	paddd	%xmm2, %xmm0
	testl	%eax, %eax
	js	.L206
	movl	%eax, 8+set_value(%rip)
	movl	%eax, 4+set_value(%rip)
	movl	$-1, set_value(%rip)
	movq	%xmm0, 4+get_value(%rip)
.L206:
	cmpl	$131071, %ebp
	jg	.L207
	movl	%ebp, %r9d
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movl	$1, %edi
	call	ki_set_i.part.0
.L207:
	cmpl	$131072, %ebx
	jg	.L244
.L208:
	movl	4+get_value(%rip), %eax
	movl	8+get_value(%rip), %edx
	movl	W(%rip), %edi
	cmpl	%edx, %eax
	cmovg	%edx, %eax
	movl	%eax, get_value(%rip)
.L205:
	cmpl	%edi, %ebx
	jl	.L200
.L201:
	leal	1(%rdi), %esi
	movl	$66666666, %edx
	xorl	%ebx, %ebx
	call	ki_set.part.0
	cmpl	$0, H(%rip)
	leaq	A(%rip), %r14
	leaq	B(%rip), %r12
	leaq	.LC2(%rip), %rbp
	jg	.L209
	jmp	.L227
	.p2align 4,,10
	.p2align 3
.L216:
	movl	W(%rip), %r9d
	movl	$-1, %edx
	testl	%r9d, %r9d
	jle	.L217
	movl	get_value(%rip), %eax
	cmpl	$262143, %r9d
	jg	.L219
	movl	0(%r13), %eax
	testl	%eax, %eax
	js	.L220
	subl	$1, %r9d
	subl	%r9d, %eax
.L219:
	leal	1(%rax,%rbx), %edx
	cmpl	$33333333, %eax
	movl	$-1, %eax
	cmovge	%eax, %edx
.L217:
	xorl	%eax, %eax
	movq	%rbp, %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	addq	$1, %rbx
	cmpl	%ebx, H(%rip)
	jle	.L227
.L209:
	movl	(%r14,%rbx,4), %edx
	movl	$99999999, %eax
	leal	1(%rdx), %r9d
	cmpl	$262143, %r9d
	ja	.L210
	movl	0(%r13), %eax
	leal	2(%rdx), %r11d
	testl	%eax, %eax
	js	.L211
	subl	%r9d, %eax
.L210:
	movl	(%r12,%rbx,4), %edi
	cmpl	%edi, %r9d
	jle	.L216
	leal	(%r9,%rax), %edx
	movl	%r9d, %esi
	call	ki_set.part.0
	jmp	.L216
	.p2align 4,,10
	.p2align 3
.L245:
	movl	W(%rip), %edi
	addl	$1, %r12d
	addq	$4, %rbp
	addq	$4, %rbx
	movl	%edi, %eax
	subl	-4(%rbp), %eax
	movl	%eax, -4(%rbp)
	movl	%edi, %eax
	subl	-4(%rbx), %eax
	movl	%eax, -4(%rbx)
	cmpl	%r12d, H(%rip)
	jle	.L204
.L203:
	xorl	%eax, %eax
	movq	%rbx, %rdx
	movq	%rbp, %rsi
	movq	%r14, %rdi
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L245
.L202:
	movl	$1, %eax
.L196:
	popq	%rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
.L211:
	.cfi_restore_state
	cmpl	$131071, %r9d
	jg	.L231
	movl	4+set_value(%rip), %r10d
	testl	%r10d, %r10d
	js	.L213
	movl	$131072, %eax
	cmpl	%eax, %r11d
	cmovle	%r11d, %eax
	subl	$1, %eax
	subl	%eax, %r10d
.L212:
	cmpl	$131072, %r11d
	jle	.L232
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L215
	subl	%r9d, %eax
.L214:
	cmpl	%r10d, %eax
	cmovg	%r10d, %eax
	jmp	.L210
.L227:
	xorl	%eax, %eax
	jmp	.L196
.L244:
	movl	%ebp, %r9d
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%ebx, %edx
	movl	%ebp, %esi
	movl	$2, %edi
	call	ki_set_i.part.0
	jmp	.L208
.L220:
	cmpl	$131071, %r9d
	jg	.L246
	movl	4+set_value(%rip), %r10d
	testl	%r10d, %r10d
	js	.L224
	subl	$1, %r9d
	subl	%r9d, %r10d
.L234:
	movl	$99999999, %eax
.L222:
	cmpl	%eax, %r10d
	cmovle	%r10d, %eax
	jmp	.L219
.L246:
	movl	4+get_value(%rip), %r10d
	cmpl	$131072, %r9d
	je	.L234
	movl	8+set_value(%rip), %eax
	testl	%eax, %eax
	js	.L226
	subl	$1, %r9d
	subl	%r9d, %eax
	jmp	.L222
.L231:
	movl	$99999999, %r10d
	jmp	.L212
.L213:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r11d, %edx
	movl	%r9d, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L212
.L215:
	movl	$131072, %ecx
	movl	%r11d, %edx
	movl	%r9d, %esi
	movl	$2, %edi
	movl	$262144, %r8d
	call	ki_get_i.part.0
	jmp	.L214
.L232:
	movl	$99999999, %eax
	jmp	.L214
.L224:
	movl	$131072, %r8d
	xorl	%ecx, %ecx
	movl	%r9d, %edx
	xorl	%esi, %esi
	movl	$1, %edi
	call	ki_get_i.part.0
	movl	%eax, %r10d
	jmp	.L234
.L226:
	movl	$262144, %r8d
	movl	$131072, %ecx
	movl	%r9d, %edx
	xorl	%esi, %esi
	movl	$2, %edi
	call	ki_get_i.part.0
	jmp	.L222
	.cfi_endproc
.LFE27:
	.size	main, .-main
	.globl	B
	.bss
	.align 32
	.type	B, @object
	.size	B, 849380
B:
	.zero	849380
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 849380
A:
	.zero	849380
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	H
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	get_value
	.align 32
	.type	get_value, @object
	.size	get_value, 2097148
get_value:
	.zero	2097148
	.globl	set_value
	.align 32
	.type	set_value, @object
	.size	set_value, 2097148
set_value:
	.zero	2097148
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	-131071
	.long	-262143
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:

#include <stdio.h>

#define INF 33333333

#define KI_MAX (1 << 18) /* 262144 */

int set_value[KI_MAX * 2 - 1];
int get_value[KI_MAX * 2 - 1];

void ki_set_i(int idx, int qs, int qe, int ss, int se, int value) {
	if (qe <= ss || se <= qs) { /* 関係ない */
		/* nop */
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
		set_value[idx] = value;
		get_value[idx] = value - (se - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int li = idx * 2 + 1, ri = idx * 2 + 2;
		if (set_value[idx] >= 0) {
			set_value[li] = set_value[ri] = set_value[idx];
			get_value[li] = set_value[idx] - (sm - 1);
			get_value[ri] = set_value[idx] - (se - 1);
			set_value[idx] = -1;
		}
		ki_set_i(li, qs, qe, ss, sm, value);
		ki_set_i(ri, qs, qe, sm, se, value);
		get_value[idx] = get_value[li] <= get_value[ri] ? get_value[li] : get_value[ri];
	}
}

void ki_set(int qs, int qe, int value) {
	if (qs < qe) ki_set_i(0, qs, qe, 0, KI_MAX, value);
}

int ki_get_i(int idx, int qs, int qe, int ss, int se) {
	if (qe <= ss || se <= qs) { /* 関係ない */
#if 0
		printf("debug! (%d %d) %d %d -> INF\n", qs, qe, ss, se);
#endif
		return INF * 3;
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
#if 0
		printf("debug! (%d %d) %d %d -> %d\n", qs, qe, ss, se, get_value[idx]);
#endif
		return get_value[idx];
	} else if (set_value[idx] >= 0) {
#if 0
		printf("debug! (%d %d) %d %d --> %d\n", qs, qe, ss, se, set_value[idx] - ((qe <= se ? qe : se) - 1));
#endif
		return set_value[idx] - ((qe <= se ? qe : se) - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int left = ki_get_i(idx * 2 + 1, qs, qe, ss, sm);
		int right = ki_get_i(idx * 2 + 2, qs, qe, sm, se);
#if 0
		printf("debug! (%d %d) %d %d ---> %d\n", qs, qe, ss, se, left <= right ? left : right);
#endif
		return left <= right ? left : right;
	}
}

int ki_get(int qs, int qe) {
	return qs < qe ? ki_get_i(0, qs, qe, 0, KI_MAX) : INF;
}

int H, W;
int A[212345], B[212345];

int main(void) {
	int i;
	for (i = 0; i < KI_MAX * 2 - 1; i++) {
		set_value[i] = -1;
	}
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 0; i < H; i++) {
		if (scanf("%d%d", &A[i], &B[i]) != 2) return 1;
		A[i] = W - A[i];
		B[i] = W - B[i];
	}
	for (i = 0; i < W; i++) {
		ki_set(i, i + 1, i);
	}
	ki_set(W, W + 1, INF * 2);
	for (i = 0; i < H; i++) {
		int ret;
		ki_set(B[i], A[i] + 1, ki_get(A[i] + 1, A[i] + 2) + (A[i] + 1));
#if 0
		printf("debug [%d %d %d]", B[i], A[i], ki_get(A[i] + 1, A[i] + 2));
		for(int j = 0; j <= W; j++) printf(" %d", ki_get(j, j + 1));
		puts("");
#endif
		ret = ki_get(0, W);
		printf("%d\n", ret < INF ? ret + (i + 1) : -1);
	}
	return 0;
}

/*

右か下に移動 → 右に移動すると制約が強まる

右への移動回数min

.*** 0000
*... 0123
.**. x123
.*** xxx3
.... xxxx

上が*(下移動不可)のとき、左の数字+1
上が*(下移動不可)でないとき、min(左の数字+1, 上の数字)

セグ木
範囲set
indexを引き算した値のmin

左右反転
***. 0123
...* 3333
.**. 333*
***. 3***
.... ****

上が下移動不可の範囲を、その範囲の右の値にset

*/

4 7
2 4
1 1
2 3
2 4
 4 4
2 4
1 1
2 0
2 4
 4 4
3 4
1 1
2 3
2 4
 4 4
2 4
1 1
2 0
3 4
 4 4
1 4
1 1
2 0
3 4
 4 5
0 4
0 1
4 5
3 4
 4 7
2 4
0 1
2 3
5 7
 4 7
1 3
0 1
4 1
3 7
 4 7
2 4
0 1
2 3
2 4
 4 7
2 4
0 1
4 3
2 4

1
2
3
4
 1
3
4
-1
 1
2
5
-1
 1
3
4
5
 -1
-1
-1
-1
 1
2
5
6
 1
2
3
6
 1
2
3
6
 1
2
3
4
 1
2
3
4

Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

#define INF 33333333

#define KI_MAX (1 << 18) /* 262144 */

int set_value[KI_MAX * 2 - 1];
int get_value[KI_MAX * 2 - 1];

void ki_set_i(int idx, int qs, int qe, int ss, int se, int value) {
	if (qe <= ss || se <= qs) { /* 関係ない */
		/* nop */
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
		set_value[idx] = value;
		get_value[idx] = value - (se - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int li = idx * 2 + 1, ri = idx * 2 + 2;
		if (set_value[idx] >= 0) {
			set_value[li] = set_value[ri] = set_value[idx];
			get_value[li] = set_value[idx] - (sm - 1);
			get_value[ri] = set_value[idx] - (se - 1);
			set_value[idx] = -1;
		}
		ki_set_i(li, qs, qe, ss, sm, value);
		ki_set_i(ri, qs, qe, sm, se, value);
		get_value[idx] = get_value[li] <= get_value[ri] ? get_value[li] : get_value[ri];
	}
}

void ki_set(int qs, int qe, int value) {
	if (qs < qe) ki_set_i(0, qs, qe, 0, KI_MAX, value);
}

int ki_get_i(int idx, int qs, int qe, int ss, int se) {
	if (qe <= ss || se <= qs) { /* 関係ない */
#if 0
		printf("debug! (%d %d) %d %d -> INF\n", qs, qe, ss, se);
#endif
		return INF * 3;
	} else if (qs <= ss && se <= qe) { /* セグメントがクエリに完全に含まれる */
#if 0
		printf("debug! (%d %d) %d %d -> %d\n", qs, qe, ss, se, get_value[idx]);
#endif
		return get_value[idx];
	} else if (set_value[idx] >= 0) {
#if 0
		printf("debug! (%d %d) %d %d --> %d\n", qs, qe, ss, se, set_value[idx] - ((qe <= se ? qe : se) - 1));
#endif
		return set_value[idx] - ((qe <= se ? qe : se) - 1);
	} else {
		int sm = ss + (se - ss) / 2;
		int left = ki_get_i(idx * 2 + 1, qs, qe, ss, sm);
		int right = ki_get_i(idx * 2 + 2, qs, qe, sm, se);
#if 0
		printf("debug! (%d %d) %d %d ---> %d\n", qs, qe, ss, se, left <= right ? left : right);
#endif
		return left <= right ? left : right;
	}
}

int ki_get(int qs, int qe) {
	return qs < qe ? ki_get_i(0, qs, qe, 0, KI_MAX) : INF;
}

int H, W;
int A[212345], B[212345];

int main(void) {
	int i;
	for (i = 0; i < KI_MAX * 2 - 1; i++) {
		set_value[i] = -1;
	}
	if (scanf("%d%d", &H, &W) != 2) return 1;
	for (i = 0; i < H; i++) {
		if (scanf("%d%d", &A[i], &B[i]) != 2) return 1;
		A[i] = W - A[i];
		B[i] = W - B[i];
	}
	for (i = 0; i < W; i++) {
		ki_set(i, i + 1, i);
	}
	ki_set(W, W + 1, INF * 2);
	for (i = 0; i < H; i++) {
		int ret;
		ki_set(B[i], A[i] + 1, ki_get(A[i] + 1, A[i] + 2) + (A[i] + 1));
#if 0
		printf("debug [%d %d %d]", B[i], A[i], ki_get(A[i] + 1, A[i] + 2));
		for(int j = 0; j <= W; j++) printf(" %d", ki_get(j, j + 1));
		puts("");
#endif
		ret = ki_get(0, W);
		printf("%d\n", ret < INF ? ret + (i + 1) : -1);
	}
	return 0;
}

/*

右か下に移動 → 右に移動すると制約が強まる

右への移動回数min

.*** 0000
*... 0123
.**. x123
.*** xxx3
.... xxxx

上が*(下移動不可)のとき、左の数字+1
上が*(下移動不可)でないとき、min(左の数字+1, 上の数字)

セグ木
範囲set
indexを引き算した値のmin

左右反転
***. 0123
...* 3333
.**. 333*
***. 3***
.... ****

上が下移動不可の範囲を、その範囲の右の値にset

*/
```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	set_value
	.bss
	.align 32
	.type	set_value, @object
	.size	set_value, 2097148
set_value:
	.zero	2097148
	.globl	get_value
	.align 32
	.type	get_value, @object
	.size	get_value, 2097148
get_value:
	.zero	2097148
	.text
	.globl	ki_set_i
	.type	ki_set_i, @function
ki_set_i:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L5
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L3
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	-40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L5
.L3:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%eax, %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L4
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
.L4:
	movl	-40(%rbp), %r8d
	movl	-12(%rbp), %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-40(%rbp), %r8d
	movl	-36(%rbp), %edi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-4(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	get_value(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	get_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ki_set_i, .-ki_set_i
	.globl	ki_set
	.type	ki_set, @function
ki_set:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L8
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%ecx, %r9d
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_set_i
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ki_set, .-ki_set
	.globl	ki_get_i
	.type	ki_get_i, @function
ki_get_i:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L10
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L11
.L10:
	movl	$99999999, %eax
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L13
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	leal	-1(%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	jmp	.L12
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edi
	movl	-12(%rbp), %esi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	leal	(%rax,%rax), %edi
	movl	-36(%rbp), %esi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ki_get_i, .-ki_get_i
	.globl	ki_get
	.type	ki_get, @function
ki_get:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L16
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get_i
	jmp	.L18
.L16:
	movl	$33333333, %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	ki_get, .-ki_get
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 849380
A:
	.zero	849380
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 849380
B:
	.zero	849380
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L20
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L20:
	cmpl	$524286, -8(%rbp)
	jle	.L21
	leaq	W(%rip), %rax
	movq	%rax, %rdx
	leaq	H(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	movl	$0, -8(%rbp)
	jmp	.L24
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L25
	movl	$1, %eax
	jmp	.L23
.L25:
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L24:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L26
	movl	$0, -8(%rbp)
	jmp	.L27
.L28:
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	addl	$1, -8(%rbp)
.L27:
	movl	W(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	W(%rip), %eax
	leal	1(%rax), %ecx
	movl	W(%rip), %eax
	movl	$66666666, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	$0, -8(%rbp)
	jmp	.L29
.L32:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	2(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	ki_get
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	B(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	W(%rip), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get
	movl	%eax, -4(%rbp)
	cmpl	$33333332, -4(%rbp)
	jg	.L30
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	jmp	.L31
.L30:
	movl	$-1, %eax
.L31:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
.L29:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$0, %eax
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
train
	.file	"temp.c"
	.text
	.globl	set_value
	.bss
	.align 32
	.type	set_value, @object
	.size	set_value, 2097148
set_value:
	.zero	2097148
	.globl	get_value
	.align 32
	.type	get_value, @object
	.size	get_value, 2097148
get_value:
	.zero	2097148
	.text
	.globl	ki_set_i
	.type	ki_set_i, @function
ki_set_i:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	%r9d, -40(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L5
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jle	.L5
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L3
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L3
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	-40(%rbp), %eax
	movl	%eax, (%rcx,%rdx)
	movl	-36(%rbp), %eax
	leal	-1(%rax), %edx
	movl	-40(%rbp), %eax
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	jmp	.L5
.L3:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	addl	$1, %eax
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	addl	%eax, %eax
	movl	%eax, -4(%rbp)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L4
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-4(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	set_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-12(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	movl	-36(%rbp), %edx
	subl	$1, %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
.L4:
	movl	-40(%rbp), %r8d
	movl	-12(%rbp), %edi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-8(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-40(%rbp), %r8d
	movl	-36(%rbp), %edi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %esi
	movl	-4(%rbp), %eax
	movl	%r8d, %r9d
	movl	%edi, %r8d
	movl	%eax, %edi
	call	ki_set_i
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %edx
	movl	-4(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	get_value(%rip), %rax
	movl	(%rcx,%rax), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	movl	-20(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	get_value(%rip), %rdx
	movl	%eax, (%rcx,%rdx)
.L5:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	ki_set_i, .-ki_set_i
	.globl	ki_set
	.type	ki_set, @function
ki_set:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	%edx, -12(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L8
	movl	-12(%rbp), %ecx
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	%ecx, %r9d
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_set_i
.L8:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	ki_set, .-ki_set
	.globl	ki_get_i
	.type	ki_get_i, @function
ki_get_i:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movl	%edi, -20(%rbp)
	movl	%esi, -24(%rbp)
	movl	%edx, -28(%rbp)
	movl	%ecx, -32(%rbp)
	movl	%r8d, -36(%rbp)
	movl	-28(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jle	.L10
	movl	-36(%rbp), %eax
	cmpl	-24(%rbp), %eax
	jg	.L11
.L10:
	movl	$99999999, %eax
	jmp	.L12
.L11:
	movl	-24(%rbp), %eax
	cmpl	-32(%rbp), %eax
	jg	.L13
	movl	-36(%rbp), %eax
	cmpl	-28(%rbp), %eax
	jg	.L13
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	get_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	jmp	.L12
.L13:
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %eax
	testl	%eax, %eax
	js	.L14
	movl	-20(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	(%rdx,%rax), %ecx
	movl	-28(%rbp), %edx
	movl	-36(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
	leal	-1(%rax), %edx
	movl	%ecx, %eax
	subl	%edx, %eax
	jmp	.L12
.L14:
	movl	-36(%rbp), %eax
	subl	-32(%rbp), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-32(%rbp), %eax
	addl	%edx, %eax
	movl	%eax, -12(%rbp)
	movl	-20(%rbp), %eax
	addl	%eax, %eax
	leal	1(%rax), %edi
	movl	-12(%rbp), %esi
	movl	-32(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -8(%rbp)
	movl	-20(%rbp), %eax
	addl	$1, %eax
	leal	(%rax,%rax), %edi
	movl	-36(%rbp), %esi
	movl	-12(%rbp), %ecx
	movl	-28(%rbp), %edx
	movl	-24(%rbp), %eax
	movl	%esi, %r8d
	movl	%eax, %esi
	call	ki_get_i
	movl	%eax, -4(%rbp)
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovle	%edx, %eax
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ki_get_i, .-ki_get_i
	.globl	ki_get
	.type	ki_get, @function
ki_get:
.LFB3:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	%edi, -4(%rbp)
	movl	%esi, -8(%rbp)
	movl	-4(%rbp), %eax
	cmpl	-8(%rbp), %eax
	jge	.L16
	movl	-8(%rbp), %edx
	movl	-4(%rbp), %eax
	movl	$262144, %r8d
	movl	$0, %ecx
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get_i
	jmp	.L18
.L16:
	movl	$33333333, %eax
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	ki_get, .-ki_get
	.globl	H
	.bss
	.align 4
	.type	H, @object
	.size	H, 4
H:
	.zero	4
	.globl	W
	.align 4
	.type	W, @object
	.size	W, 4
W:
	.zero	4
	.globl	A
	.align 32
	.type	A, @object
	.size	A, 849380
A:
	.zero	849380
	.globl	B
	.align 32
	.type	B, @object
	.size	B, 849380
B:
	.zero	849380
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC1:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB4:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movl	$0, -8(%rbp)
	jmp	.L20
.L21:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	set_value(%rip), %rax
	movl	$-1, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L20:
	cmpl	$524286, -8(%rbp)
	jle	.L21
	leaq	W(%rip), %rax
	movq	%rax, %rdx
	leaq	H(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L22
	movl	$1, %eax
	jmp	.L23
.L22:
	movl	$0, -8(%rbp)
	jmp	.L24
.L26:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	addq	%rax, %rdx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	addq	%rcx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	cmpl	$2, %eax
	je	.L25
	movl	$1, %eax
	jmp	.L23
.L25:
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	A(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	movl	W(%rip), %eax
	movl	-8(%rbp), %edx
	movslq	%edx, %rdx
	leaq	0(,%rdx,4), %rcx
	leaq	B(%rip), %rdx
	movl	(%rcx,%rdx), %edx
	subl	%edx, %eax
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	B(%rip), %rax
	movl	%ecx, (%rdx,%rax)
	addl	$1, -8(%rbp)
.L24:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L26
	movl	$0, -8(%rbp)
	jmp	.L27
.L28:
	movl	-8(%rbp), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %edx
	movl	-8(%rbp), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	addl	$1, -8(%rbp)
.L27:
	movl	W(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L28
	movl	W(%rip), %eax
	leal	1(%rax), %ecx
	movl	W(%rip), %eax
	movl	$66666666, %edx
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	$0, -8(%rbp)
	jmp	.L29
.L32:
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	leal	2(%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	addl	$1, %eax
	movl	%edx, %esi
	movl	%eax, %edi
	call	ki_get
	movl	%eax, %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rdx
	leaq	A(%rip), %rax
	movl	(%rdx,%rax), %eax
	addl	$1, %eax
	leal	(%rcx,%rax), %edx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rcx
	leaq	A(%rip), %rax
	movl	(%rcx,%rax), %eax
	leal	1(%rax), %ecx
	movl	-8(%rbp), %eax
	cltq
	leaq	0(,%rax,4), %rsi
	leaq	B(%rip), %rax
	movl	(%rsi,%rax), %eax
	movl	%ecx, %esi
	movl	%eax, %edi
	call	ki_set
	movl	W(%rip), %eax
	movl	%eax, %esi
	movl	$0, %edi
	call	ki_get
	movl	%eax, -4(%rbp)
	cmpl	$33333332, -4(%rbp)
	jg	.L30
	movl	-8(%rbp), %eax
	leal	1(%rax), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	jmp	.L31
.L30:
	movl	$-1, %eax
.L31:
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	addl	$1, -8(%rbp)
.L29:
	movl	H(%rip), %eax
	cmpl	%eax, -8(%rbp)
	jl	.L32
	movl	$0, %eax
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
