	.file	"861710.c"
	.intel_syntax noprefix
	.text
	.globl	sd_genmat
	.type	sd_genmat, @function
sd_genmat:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 368
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 11664
	mov	edi, 1
	call	calloc@PLT
	mov	QWORD PTR -344[rbp], rax
	mov	DWORD PTR -356[rbp], 0
	mov	eax, DWORD PTR -356[rbp]
	mov	DWORD PTR -368[rbp], eax
	jmp	.L2
.L7:
	mov	DWORD PTR -364[rbp], 0
	jmp	.L3
.L6:
	mov	DWORD PTR -360[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -368[rbp]
	mov	edx, eax
	mov	eax, edx
	sal	eax, 3
	add	edx, eax
	mov	eax, DWORD PTR -364[rbp]
	lea	ecx, [rdx+rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR -356[rbp]
	movsx	rdx, edx
	add	rdx, 728
	mov	WORD PTR 8[rax+rdx*8], cx
	mov	eax, DWORD PTR -368[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	sub	edx, eax
	mov	eax, edx
	add	eax, eax
	lea	ecx, [rax+rdx]
	mov	eax, DWORD PTR -364[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1431655766
	shr	rdx, 32
	sar	eax, 31
	mov	esi, eax
	mov	eax, edx
	sub	eax, esi
	add	eax, ecx
	mov	edx, eax
	mov	eax, edx
	sal	eax, 3
	add	edx, eax
	mov	eax, DWORD PTR -360[rbp]
	add	eax, edx
	lea	ecx, 81[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR -356[rbp]
	movsx	rdx, edx
	mov	WORD PTR 5834[rax+rdx*8], cx
	mov	eax, DWORD PTR -368[rbp]
	mov	edx, eax
	mov	eax, edx
	sal	eax, 3
	add	edx, eax
	mov	eax, DWORD PTR -360[rbp]
	add	eax, edx
	lea	ecx, 162[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR -356[rbp]
	movsx	rdx, edx
	mov	WORD PTR 5836[rax+rdx*8], cx
	mov	eax, DWORD PTR -364[rbp]
	mov	edx, eax
	mov	eax, edx
	sal	eax, 3
	add	edx, eax
	mov	eax, DWORD PTR -360[rbp]
	add	eax, edx
	lea	ecx, 243[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR -356[rbp]
	movsx	rdx, edx
	mov	WORD PTR 5838[rax+rdx*8], cx
	add	DWORD PTR -356[rbp], 1
	add	DWORD PTR -360[rbp], 1
.L4:
	cmp	DWORD PTR -360[rbp], 8
	jle	.L5
	add	DWORD PTR -364[rbp], 1
.L3:
	cmp	DWORD PTR -364[rbp], 8
	jle	.L6
	add	DWORD PTR -368[rbp], 1
.L2:
	cmp	DWORD PTR -368[rbp], 8
	jle	.L7
	mov	DWORD PTR -352[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -352[rbp]
	cdqe
	mov	BYTE PTR -336[rbp+rax], 0
	add	DWORD PTR -352[rbp], 1
.L8:
	cmp	DWORD PTR -352[rbp], 323
	jle	.L9
	mov	DWORD PTR -356[rbp], 0
	jmp	.L10
.L13:
	mov	DWORD PTR -348[rbp], 0
	jmp	.L11
.L12:
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR -348[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -356[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	add	rdx, 2912
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	eax, ax
	mov	DWORD PTR -360[rbp], eax
	mov	eax, DWORD PTR -360[rbp]
	cdqe
	movzx	eax, BYTE PTR -336[rbp+rax]
	mov	edx, eax
	add	edx, 1
	mov	ecx, edx
	mov	edx, DWORD PTR -360[rbp]
	movsx	rdx, edx
	mov	BYTE PTR -336[rbp+rdx], cl
	movsx	eax, al
	mov	edx, DWORD PTR -356[rbp]
	mov	esi, edx
	mov	rdx, QWORD PTR -344[rbp]
	movsx	rdi, eax
	mov	eax, DWORD PTR -360[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rdi
	mov	WORD PTR [rdx+rax*2], si
	add	DWORD PTR -348[rbp], 1
.L11:
	cmp	DWORD PTR -348[rbp], 3
	jle	.L12
	add	DWORD PTR -356[rbp], 1
.L10:
	cmp	DWORD PTR -356[rbp], 728
	jle	.L13
	mov	rax, QWORD PTR -344[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sd_genmat, .-sd_genmat
	.type	sd_update, @function
sd_update:
.LFB7:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	DWORD PTR -76[rbp], ecx
	mov	DWORD PTR -80[rbp], r8d
	mov	DWORD PTR -36[rbp], 10
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -76[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	add	rdx, 2912
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	ecx, BYTE PTR [rax]
	mov	eax, DWORD PTR -80[rbp]
	sal	eax, 7
	mov	edi, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rsi, edx
	mov	edx, DWORD PTR -76[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rsi
	add	rdx, 2912
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	lea	edx, [rcx+rdi]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -40[rbp], 1
.L17:
	cmp	DWORD PTR -40[rbp], 3
	jle	.L18
	mov	DWORD PTR -40[rbp], 0
	jmp	.L19
.L33:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -40[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -76[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	add	rdx, 2912
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	eax, ax
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jle	.L20
	mov	DWORD PTR -28[rbp], 0
	jmp	.L21
.L27:
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	eax, ax
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	ecx, edx
	add	ecx, 1
	mov	BYTE PTR [rax], cl
	test	dl, dl
	jne	.L35
	mov	DWORD PTR -24[rbp], 0
	jmp	.L24
.L26:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -24[rbp]
	movsx	rcx, edx
	mov	edx, DWORD PTR -16[rbp]
	movsx	rdx, edx
	sal	rdx, 2
	add	rdx, rcx
	add	rdx, 2912
	movzx	eax, WORD PTR 8[rax+rdx*2]
	movzx	eax, ax
	mov	DWORD PTR -12[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	sub	edx, 1
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	cmp	DWORD PTR -36[rbp], eax
	jle	.L25
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -12[rbp]
	mov	DWORD PTR -32[rbp], eax
.L25:
	add	DWORD PTR -24[rbp], 1
.L24:
	cmp	DWORD PTR -24[rbp], 3
	jle	.L26
	jmp	.L23
.L35:
	nop
.L23:
	add	DWORD PTR -28[rbp], 1
.L21:
	cmp	DWORD PTR -28[rbp], 8
	jle	.L27
	jmp	.L28
.L20:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L29
.L32:
	mov	rdx, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -20[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	eax, ax
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	sub	edx, 1
	mov	BYTE PTR [rax], dl
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L36
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	add	rax, 728
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	add	rax, 8
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	add	edx, 1
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 2
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	add	edx, 1
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	add	edx, 1
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 6
	movzx	eax, WORD PTR [rax]
	movzx	edx, ax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	add	edx, 1
	mov	BYTE PTR [rax], dl
	jmp	.L31
.L36:
	nop
.L31:
	add	DWORD PTR -28[rbp], 1
.L29:
	cmp	DWORD PTR -28[rbp], 8
	jle	.L32
.L28:
	add	DWORD PTR -40[rbp], 1
.L19:
	cmp	DWORD PTR -40[rbp], 3
	jle	.L33
	mov	eax, DWORD PTR -36[rbp]
	sal	eax, 16
	or	eax, DWORD PTR -32[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sd_update, .-sd_update
	.globl	sd_solve
	.type	sd_solve, @function
sd_solve:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1520
	mov	QWORD PTR -1512[rbp], rdi
	mov	QWORD PTR -1520[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1472[rbp], 0
	mov	DWORD PTR -1464[rbp], 0
	mov	DWORD PTR -1492[rbp], 0
	jmp	.L38
.L39:
	mov	eax, DWORD PTR -1492[rbp]
	cdqe
	mov	BYTE PTR -752[rbp+rax], 0
	add	DWORD PTR -1492[rbp], 1
.L38:
	cmp	DWORD PTR -1492[rbp], 728
	jle	.L39
	mov	DWORD PTR -1488[rbp], 0
	jmp	.L40
.L41:
	mov	eax, DWORD PTR -1488[rbp]
	cdqe
	mov	BYTE PTR -1088[rbp+rax], 9
	add	DWORD PTR -1488[rbp], 1
.L40:
	cmp	DWORD PTR -1488[rbp], 323
	jle	.L41
	mov	DWORD PTR -1500[rbp], 0
	jmp	.L42
.L47:
	mov	eax, DWORD PTR -1500[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1520[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 48
	jle	.L43
	mov	eax, DWORD PTR -1500[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1520[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 57
	jg	.L43
	mov	eax, DWORD PTR -1500[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1520[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 49
	jmp	.L44
.L43:
	mov	eax, -1
.L44:
	mov	DWORD PTR -1460[rbp], eax
	cmp	DWORD PTR -1460[rbp], 0
	js	.L45
	mov	edx, DWORD PTR -1500[rbp]
	mov	eax, edx
	sal	eax, 3
	add	edx, eax
	mov	eax, DWORD PTR -1460[rbp]
	lea	ecx, [rdx+rax]
	lea	rdx, -1088[rbp]
	lea	rsi, -752[rbp]
	mov	rax, QWORD PTR -1512[rbp]
	mov	r8d, 1
	mov	rdi, rax
	call	sd_update
.L45:
	cmp	DWORD PTR -1460[rbp], 0
	js	.L46
	add	DWORD PTR -1464[rbp], 1
.L46:
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	mov	WORD PTR -1456[rbp+rax*2], -1
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	mov	BYTE PTR -1280[rbp+rax], -1
	mov	eax, DWORD PTR -1500[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -1520[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	mov	BYTE PTR -1184[rbp+rax], dl
	add	DWORD PTR -1500[rbp], 1
.L42:
	cmp	DWORD PTR -1500[rbp], 80
	jle	.L47
	mov	DWORD PTR -1500[rbp], 0
	mov	DWORD PTR -1480[rbp], 1
	mov	DWORD PTR -1476[rbp], 655360
	mov	BYTE PTR -1103[rbp], 0
	jmp	.L48
.L62:
	cmp	DWORD PTR -1480[rbp], 1
	jne	.L49
	mov	eax, DWORD PTR -1476[rbp]
	sar	eax, 16
	mov	DWORD PTR -1468[rbp], eax
	mov	eax, DWORD PTR -1476[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	mov	WORD PTR -1456[rbp+rax*2], dx
	cmp	DWORD PTR -1468[rbp], 1
	jle	.L50
	mov	DWORD PTR -1488[rbp], 0
	jmp	.L51
.L53:
	mov	eax, DWORD PTR -1488[rbp]
	cdqe
	movzx	eax, BYTE PTR -1088[rbp+rax]
	movzx	eax, al
	cmp	DWORD PTR -1468[rbp], eax
	jle	.L52
	mov	eax, DWORD PTR -1488[rbp]
	cdqe
	movzx	eax, BYTE PTR -1088[rbp+rax]
	movzx	eax, al
	mov	DWORD PTR -1468[rbp], eax
	mov	eax, DWORD PTR -1488[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	mov	WORD PTR -1456[rbp+rax*2], dx
	cmp	DWORD PTR -1468[rbp], 1
	jle	.L71
.L52:
	add	DWORD PTR -1488[rbp], 1
.L51:
	cmp	DWORD PTR -1488[rbp], 323
	jle	.L53
	jmp	.L50
.L71:
	nop
.L50:
	cmp	DWORD PTR -1468[rbp], 0
	je	.L54
	cmp	DWORD PTR -1468[rbp], 10
	jne	.L49
.L54:
	mov	DWORD PTR -1480[rbp], -1
	mov	eax, DWORD PTR -1500[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -1500[rbp], edx
	cdqe
	mov	BYTE PTR -1280[rbp+rax], -1
.L49:
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	movzx	eax, WORD PTR -1456[rbp+rax*2]
	cwde
	mov	DWORD PTR -1488[rbp], eax
	cmp	DWORD PTR -1480[rbp], -1
	jne	.L55
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	movzx	eax, BYTE PTR -1280[rbp+rax]
	test	al, al
	js	.L55
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	movzx	eax, BYTE PTR -1280[rbp+rax]
	movsx	eax, al
	mov	rdx, QWORD PTR -1512[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -1488[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	ecx, ax
	lea	rdx, -1088[rbp]
	lea	rsi, -752[rbp]
	mov	rax, QWORD PTR -1512[rbp]
	mov	r8d, -1
	mov	rdi, rax
	call	sd_update
.L55:
	mov	eax, DWORD PTR -1500[rbp]
	cdqe
	movzx	eax, BYTE PTR -1280[rbp+rax]
	movsx	eax, al
	add	eax, 1
	mov	DWORD PTR -1484[rbp], eax
	jmp	.L56
.L59:
	mov	rdx, QWORD PTR -1512[rbp]
	mov	eax, DWORD PTR -1484[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -1488[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	eax, ax
	cdqe
	movzx	eax, BYTE PTR -752[rbp+rax]
	test	al, al
	je	.L72
	add	DWORD PTR -1484[rbp], 1
.L56:
	cmp	DWORD PTR -1484[rbp], 8
	jle	.L59
	jmp	.L58
.L72:
	nop
.L58:
	cmp	DWORD PTR -1484[rbp], 8
	jg	.L60
	mov	rdx, QWORD PTR -1512[rbp]
	mov	eax, DWORD PTR -1484[rbp]
	movsx	rsi, eax
	mov	eax, DWORD PTR -1488[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	ecx, ax
	lea	rdx, -1088[rbp]
	lea	rsi, -752[rbp]
	mov	rax, QWORD PTR -1512[rbp]
	mov	r8d, 1
	mov	rdi, rax
	call	sd_update
	mov	DWORD PTR -1476[rbp], eax
	mov	eax, DWORD PTR -1500[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -1500[rbp], edx
	mov	edx, DWORD PTR -1484[rbp]
	cdqe
	mov	BYTE PTR -1280[rbp+rax], dl
	mov	DWORD PTR -1480[rbp], 1
	jmp	.L48
.L60:
	mov	DWORD PTR -1480[rbp], -1
	mov	eax, DWORD PTR -1500[rbp]
	lea	edx, -1[rax]
	mov	DWORD PTR -1500[rbp], edx
	cdqe
	mov	BYTE PTR -1280[rbp+rax], -1
.L48:
	cmp	DWORD PTR -1500[rbp], 0
	js	.L61
	mov	eax, 81
	sub	eax, DWORD PTR -1464[rbp]
	cmp	DWORD PTR -1500[rbp], eax
	jl	.L62
.L61:
	cmp	DWORD PTR -1500[rbp], 0
	js	.L73
	mov	DWORD PTR -1496[rbp], 0
	jmp	.L65
.L66:
	mov	eax, DWORD PTR -1496[rbp]
	cdqe
	movzx	eax, WORD PTR -1456[rbp+rax*2]
	movsx	ecx, ax
	mov	eax, DWORD PTR -1496[rbp]
	cdqe
	movzx	eax, BYTE PTR -1280[rbp+rax]
	movsx	eax, al
	mov	rdx, QWORD PTR -1512[rbp]
	movsx	rsi, eax
	movsx	rcx, ecx
	mov	rax, rcx
	sal	rax, 3
	add	rax, rcx
	add	rax, rsi
	movzx	eax, WORD PTR [rdx+rax*2]
	movzx	eax, ax
	mov	DWORD PTR -1492[rbp], eax
	mov	eax, DWORD PTR -1492[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 954437177
	shr	rdx, 32
	sar	edx
	mov	esi, eax
	sar	esi, 31
	mov	ecx, edx
	sub	ecx, esi
	mov	edx, ecx
	sal	edx, 3
	add	edx, ecx
	sub	eax, edx
	mov	ecx, eax
	mov	eax, ecx
	lea	ecx, 49[rax]
	mov	eax, DWORD PTR -1492[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 954437177
	shr	rdx, 32
	sar	edx
	sar	eax, 31
	mov	esi, eax
	mov	eax, edx
	sub	eax, esi
	mov	edx, ecx
	cdqe
	mov	BYTE PTR -1184[rbp+rax], dl
	add	DWORD PTR -1496[rbp], 1
.L65:
	mov	eax, DWORD PTR -1496[rbp]
	cmp	eax, DWORD PTR -1500[rbp]
	jl	.L66
	add	DWORD PTR -1472[rbp], 1
	sub	DWORD PTR -1500[rbp], 1
	mov	DWORD PTR -1480[rbp], -1
	jmp	.L48
.L73:
	nop
	mov	eax, DWORD PTR -1472[rbp]
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L69
	call	__stack_chk_fail@PLT
.L69:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	sd_solve, .-sd_solve
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, 0
	call	sd_genmat
	mov	QWORD PTR -1048[rbp], rax
	jmp	.L75
.L77:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 80
	ja	.L76
	jmp	.L75
.L76:
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -1048[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	sd_solve
.L75:
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L77
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L79
	call	__stack_chk_fail@PLT
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"861710.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sd_genmat
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_genmat, %function
sd_genmat:
	@ args = 0, pretend = 0, frame = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #360
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r1, .L16+4
	mov	r0, #1
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-336]
	mov	r3, #0
	str	r3, [fp, #-348]
	ldr	r3, [fp, #-348]
	str	r3, [fp, #-360]
	b	.L2
.L7:
	mov	r3, #0
	str	r3, [fp, #-356]
	b	.L3
.L6:
	mov	r3, #0
	str	r3, [fp, #-352]
	b	.L4
.L5:
	ldr	r3, [fp, #-360]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, r3	@ movhi
	lsl	r2, r2, #3
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-356]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-336]
	ldr	r3, [fp, #-348]
	add	r3, r3, #728
	add	r3, r3, #1
	lsl	r3, r3, #3
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-360]
	ldr	r2, .L16+8
	smull	r1, r2, r3, r2
	asr	r3, r3, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r2, r3, r2
	ldr	r3, [fp, #-356]
	ldr	r1, .L16+8
	smull	r0, r1, r3, r1
	asr	r3, r3, #31
	sub	r3, r1, r3
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, r3	@ movhi
	lsl	r2, r2, #3
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-352]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #81
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-336]
	ldr	r3, [fp, #-348]
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #5824
	add	r3, r3, #10
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-360]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, r3	@ movhi
	lsl	r2, r2, #3
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-352]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #162
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-336]
	ldr	r3, [fp, #-348]
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #5824
	add	r3, r3, #12
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-356]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r2, r3	@ movhi
	lsl	r2, r2, #3
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-352]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #243
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r1, [fp, #-336]
	ldr	r3, [fp, #-348]
	lsl	r3, r3, #3
	add	r3, r1, r3
	add	r3, r3, #5824
	add	r3, r3, #14
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-348]
	add	r3, r3, #1
	str	r3, [fp, #-348]
	ldr	r3, [fp, #-352]
	add	r3, r3, #1
	str	r3, [fp, #-352]
.L4:
	ldr	r3, [fp, #-352]
	cmp	r3, #8
	ble	.L5
	ldr	r3, [fp, #-356]
	add	r3, r3, #1
	str	r3, [fp, #-356]
.L3:
	ldr	r3, [fp, #-356]
	cmp	r3, #8
	ble	.L6
	ldr	r3, [fp, #-360]
	add	r3, r3, #1
	str	r3, [fp, #-360]
.L2:
	ldr	r3, [fp, #-360]
	cmp	r3, #8
	ble	.L7
	mov	r3, #0
	str	r3, [fp, #-344]
	b	.L8
.L9:
	sub	r2, fp, #332
	ldr	r3, [fp, #-344]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-344]
	add	r3, r3, #1
	str	r3, [fp, #-344]
.L8:
	ldr	r3, [fp, #-344]
	cmp	r3, #324
	blt	.L9
	mov	r3, #0
	str	r3, [fp, #-348]
	b	.L10
.L13:
	mov	r3, #0
	str	r3, [fp, #-340]
	b	.L11
.L12:
	ldr	r2, [fp, #-336]
	ldr	r3, [fp, #-348]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-340]
	add	r3, r1, r3
	add	r3, r3, #2912
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-352]
	sub	r2, fp, #332
	ldr	r3, [fp, #-352]
	add	r3, r2, r3
	ldrsb	r3, [r3]
	and	r2, r3, #255
	add	r2, r2, #1
	and	r2, r2, #255
	lsl	r2, r2, #24
	asr	r0, r2, #24
	sub	r1, fp, #332
	ldr	r2, [fp, #-352]
	add	r2, r1, r2
	mov	r1, r0
	strb	r1, [r2]
	mov	ip, r3
	ldr	r3, [fp, #-348]
	lsl	r3, r3, #16
	lsr	r1, r3, #16
	ldr	r0, [fp, #-336]
	ldr	r2, [fp, #-352]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r3, ip
	lsl	r3, r3, #1
	add	r3, r0, r3
	strh	r1, [r3]	@ movhi
	ldr	r3, [fp, #-340]
	add	r3, r3, #1
	str	r3, [fp, #-340]
.L11:
	ldr	r3, [fp, #-340]
	cmp	r3, #3
	ble	.L12
	ldr	r3, [fp, #-348]
	add	r3, r3, #1
	str	r3, [fp, #-348]
.L10:
	ldr	r3, [fp, #-348]
	cmp	r3, #728
	ble	.L13
	ldr	r3, [fp, #-336]
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	11664
	.word	1431655766
	.size	sd_genmat, .-sd_genmat
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_update, %function
sd_update:
	@ args = 4, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #60
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	mov	r3, #10
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L19
.L20:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-40]
	add	r3, r1, r3
	add	r3, r3, #2912
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #4]
	and	r3, r3, #255
	lsl	r3, r3, #7
	and	r2, r3, #255
	ldr	r0, [fp, #-48]
	ldr	r3, [fp, #-60]
	lsl	ip, r3, #2
	ldr	r3, [fp, #-40]
	add	r3, ip, r3
	add	r3, r3, #2912
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r0, r3
	ldrh	r3, [r3]
	mov	r0, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r0
	add	r2, r1, r2
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L19:
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L20
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L21
.L35:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-60]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-40]
	add	r3, r1, r3
	add	r3, r3, #2912
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #4]
	cmp	r3, #0
	ble	.L22
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L23
.L29:
	ldr	r1, [fp, #-48]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-28]
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-52]
	add	r2, r2, r3
	ldrsb	r3, [r2]
	and	r1, r3, #255
	add	r1, r1, #1
	and	r1, r1, #255
	lsl	r1, r1, #24
	asr	r1, r1, #24
	strb	r1, [r2]
	cmp	r3, #0
	bne	.L37
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L26
.L28:
	ldr	r2, [fp, #-48]
	ldr	r3, [fp, #-16]
	lsl	r1, r3, #2
	ldr	r3, [fp, #-24]
	add	r3, r1, r3
	add	r3, r3, #2912
	add	r3, r3, #4
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	sub	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-36]
	cmp	r3, r2
	ble	.L27
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-32]
.L27:
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L26:
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	ble	.L28
	b	.L25
.L37:
	nop
.L25:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L23:
	ldr	r3, [fp, #-28]
	cmp	r3, #8
	ble	.L29
	b	.L30
.L22:
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L31
.L34:
	ldr	r1, [fp, #-48]
	ldr	r2, [fp, #-20]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-28]
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-52]
	add	r3, r2, r3
	ldrsb	r2, [r3]
	and	r2, r2, #255
	sub	r2, r2, #1
	and	r2, r2, #255
	lsl	r2, r2, #24
	asr	r2, r2, #24
	strb	r2, [r3]
	ldrsb	r3, [r3]
	cmp	r3, #0
	bne	.L38
	ldr	r3, [fp, #-16]
	add	r3, r3, #728
	add	r3, r3, #1
	lsl	r3, r3, #3
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #2
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #4
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r3, #6
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-56]
	add	r3, r3, r2
	ldrb	r2, [r3]	@ zero_extendqisi2
	add	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	b	.L33
.L38:
	nop
.L33:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L31:
	ldr	r3, [fp, #-28]
	cmp	r3, #8
	ble	.L34
.L30:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L21:
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	ble	.L35
	ldr	r3, [fp, #-36]
	lsl	r2, r3, #16
	ldr	r3, [fp, #-32]
	orr	r3, r2, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	sd_update, .-sd_update
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sd_solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_solve, %function
sd_solve:
	@ args = 0, pretend = 0, frame = 1448
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1456
	str	r0, [fp, #-1448]
	str	r1, [fp, #-1452]
	ldr	r3, .L76
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1412]
	mov	r3, #0
	str	r3, [fp, #-1404]
	mov	r3, #0
	str	r3, [fp, #-1432]
	b	.L40
.L41:
	sub	r2, fp, #740
	ldr	r3, [fp, #-1432]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-1432]
	add	r3, r3, #1
	str	r3, [fp, #-1432]
.L40:
	ldr	r3, [fp, #-1432]
	cmp	r3, #728
	ble	.L41
	mov	r3, #0
	str	r3, [fp, #-1428]
	b	.L42
.L43:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1428]
	add	r3, r3, r2
	mov	r2, #9
	strb	r2, [r3]
	ldr	r3, [fp, #-1428]
	add	r3, r3, #1
	str	r3, [fp, #-1428]
.L42:
	ldr	r3, [fp, #-1428]
	cmp	r3, #324
	blt	.L43
	mov	r3, #0
	str	r3, [fp, #-1440]
	b	.L44
.L49:
	ldr	r3, [fp, #-1440]
	ldr	r2, [fp, #-1452]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #48
	bls	.L45
	ldr	r3, [fp, #-1440]
	ldr	r2, [fp, #-1452]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L45
	ldr	r3, [fp, #-1440]
	ldr	r2, [fp, #-1452]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #49
	b	.L46
.L45:
	mvn	r3, #0
.L46:
	str	r3, [fp, #-1400]
	ldr	r3, [fp, #-1400]
	cmp	r3, #0
	blt	.L47
	ldr	r2, [fp, #-1440]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r2, r3, r2
	ldr	r3, [fp, #-1400]
	add	r3, r2, r3
	sub	r2, fp, #1056
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #740
	mov	r0, #1
	str	r0, [sp]
	ldr	r0, [fp, #-1448]
	bl	sd_update
.L47:
	ldr	r3, [fp, #-1400]
	cmp	r3, #0
	blt	.L48
	ldr	r3, [fp, #-1404]
	add	r3, r3, #1
	str	r3, [fp, #-1404]
.L48:
	sub	r3, fp, #4
	sub	r2, r3, #1392
	ldr	r3, [fp, #-1440]
	lsl	r3, r3, #1
	add	r3, r2, r3
	mvn	r2, #0
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1440]
	add	r3, r3, r2
	mvn	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-1440]
	ldr	r2, [fp, #-1452]
	add	r3, r2, r3
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r3, fp, #1136
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1440]
	add	r3, r3, r2
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-1440]
	add	r3, r3, #1
	str	r3, [fp, #-1440]
.L44:
	ldr	r3, [fp, #-1440]
	cmp	r3, #80
	ble	.L49
	mov	r3, #0
	str	r3, [fp, #-1440]
	mov	r3, #1
	str	r3, [fp, #-1420]
	mov	r3, #655360
	str	r3, [fp, #-1416]
	mov	r3, #0
	strb	r3, [fp, #-1067]
	b	.L50
.L64:
	ldr	r3, [fp, #-1420]
	cmp	r3, #1
	bne	.L51
	ldr	r3, [fp, #-1416]
	asr	r3, r3, #16
	str	r3, [fp, #-1408]
	ldr	r3, [fp, #-1416]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #4
	sub	r1, r3, #1392
	ldr	r3, [fp, #-1440]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1408]
	cmp	r3, #1
	ble	.L52
	mov	r3, #0
	str	r3, [fp, #-1428]
	b	.L53
.L55:
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1428]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-1408]
	cmp	r3, r2
	ble	.L54
	sub	r3, fp, #1056
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1428]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-1408]
	ldr	r3, [fp, #-1428]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #4
	sub	r1, r3, #1392
	ldr	r3, [fp, #-1440]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1408]
	cmp	r3, #1
	ble	.L73
.L54:
	ldr	r3, [fp, #-1428]
	add	r3, r3, #1
	str	r3, [fp, #-1428]
.L53:
	ldr	r3, [fp, #-1428]
	cmp	r3, #324
	blt	.L55
	b	.L52
.L73:
	nop
.L52:
	ldr	r3, [fp, #-1408]
	cmp	r3, #0
	beq	.L56
	ldr	r3, [fp, #-1408]
	cmp	r3, #10
	bne	.L51
.L56:
	mvn	r3, #0
	str	r3, [fp, #-1420]
	ldr	r3, [fp, #-1440]
	sub	r2, r3, #1
	str	r2, [fp, #-1440]
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3, #-1228]
.L51:
	sub	r3, fp, #4
	sub	r2, r3, #1392
	ldr	r3, [fp, #-1440]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	str	r3, [fp, #-1428]
	ldr	r3, [fp, #-1420]
	cmn	r3, #1
	bne	.L57
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1440]
	add	r3, r3, r2
	ldrsb	r3, [r3]
	cmp	r3, #0
	blt	.L57
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1440]
	add	r3, r3, r2
	ldrsb	r3, [r3]
	mov	r0, r3
	ldr	r1, [fp, #-1448]
	ldr	r2, [fp, #-1428]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	add	r3, r3, r0
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldrh	r3, [r3]
	mov	r0, r3
	sub	r2, fp, #1056
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #740
	mvn	r3, #0
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-1448]
	bl	sd_update
.L57:
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1440]
	add	r3, r3, r2
	ldrsb	r3, [r3]
	add	r3, r3, #1
	str	r3, [fp, #-1424]
	b	.L58
.L61:
	ldr	r1, [fp, #-1448]
	ldr	r2, [fp, #-1428]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-1424]
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldrh	r3, [r3]
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	r3, r3, #736
	ldrsb	r3, [r3]
	cmp	r3, #0
	beq	.L74
	ldr	r3, [fp, #-1424]
	add	r3, r3, #1
	str	r3, [fp, #-1424]
.L58:
	ldr	r3, [fp, #-1424]
	cmp	r3, #8
	ble	.L61
	b	.L60
.L74:
	nop
.L60:
	ldr	r3, [fp, #-1424]
	cmp	r3, #8
	bgt	.L62
	ldr	r1, [fp, #-1448]
	ldr	r2, [fp, #-1428]
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	ldr	r2, [fp, #-1424]
	add	r3, r3, r2
	lsl	r3, r3, #1
	add	r3, r1, r3
	ldrh	r3, [r3]
	mov	r0, r3
	sub	r2, fp, #1056
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #740
	mov	r3, #1
	str	r3, [sp]
	mov	r3, r0
	ldr	r0, [fp, #-1448]
	bl	sd_update
	str	r0, [fp, #-1416]
	ldr	r3, [fp, #-1440]
	add	r2, r3, #1
	str	r2, [fp, #-1440]
	ldr	r2, [fp, #-1424]
	lsl	r2, r2, #24
	asr	r2, r2, #24
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-1228]
	mov	r3, #1
	str	r3, [fp, #-1420]
	b	.L50
.L62:
	mvn	r3, #0
	str	r3, [fp, #-1420]
	ldr	r3, [fp, #-1440]
	sub	r2, r3, #1
	str	r2, [fp, #-1440]
	sub	r2, fp, #4
	add	r3, r2, r3
	mvn	r2, #0
	strb	r2, [r3, #-1228]
.L50:
	ldr	r3, [fp, #-1440]
	cmp	r3, #0
	blt	.L63
	ldr	r3, [fp, #-1404]
	rsb	r3, r3, #81
	ldr	r2, [fp, #-1440]
	cmp	r2, r3
	blt	.L64
.L63:
	ldr	r3, [fp, #-1440]
	cmp	r3, #0
	blt	.L75
	mov	r3, #0
	str	r3, [fp, #-1436]
	b	.L67
.L68:
	sub	r3, fp, #4
	sub	r2, r3, #1392
	ldr	r3, [fp, #-1436]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r1, r3
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1436]
	add	r3, r3, r2
	ldrsb	r3, [r3]
	mov	r0, r3
	ldr	r2, [fp, #-1448]
	mov	r3, r1
	lsl	r3, r3, #3
	add	r3, r3, r1
	add	r3, r3, r0
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	str	r3, [fp, #-1432]
	ldr	r1, [fp, #-1432]
	ldr	r3, .L76+4
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #3
	add	r3, r3, r2
	sub	r2, r1, r3
	and	r2, r2, #255
	ldr	r3, [fp, #-1432]
	ldr	r1, .L76+4
	smull	r0, r1, r3, r1
	asr	r1, r1, #1
	asr	r3, r3, #31
	sub	r3, r1, r3
	add	r2, r2, #49
	and	r2, r2, #255
	sub	r1, fp, #4
	add	r3, r1, r3
	strb	r2, [r3, #-1144]
	ldr	r3, [fp, #-1436]
	add	r3, r3, #1
	str	r3, [fp, #-1436]
.L67:
	ldr	r2, [fp, #-1436]
	ldr	r3, [fp, #-1440]
	cmp	r2, r3
	blt	.L68
	ldr	r3, [fp, #-1412]
	add	r3, r3, #1
	str	r3, [fp, #-1412]
	ldr	r3, [fp, #-1440]
	sub	r3, r3, #1
	str	r3, [fp, #-1440]
	mvn	r3, #0
	str	r3, [fp, #-1420]
	b	.L50
.L75:
	nop
	ldr	r3, [fp, #-1412]
	ldr	r2, .L76
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L71
	bl	__stack_chk_fail
.L71:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC1
	.word	954437177
	.size	sd_solve, .-sd_solve
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1032
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1024
	sub	sp, sp, #8
	ldr	r3, .L84
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	sd_genmat
	str	r0, [fp, #-1036]
	b	.L79
.L81:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #80
	bhi	.L80
	b	.L79
.L80:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1036]
	bl	sd_solve
.L79:
	ldr	r3, .L84+4
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L81
	ldr	r0, [fp, #-1036]
	bl	free
	mov	r3, #0
	ldr	r2, .L84
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L83
	bl	__stack_chk_fail
.L83:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L85:
	.align	2
.L84:
	.word	.LC2
	.word	stdin
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
