	.file	"109205.c"
	.intel_syntax noprefix
	.text
	.globl	solution
	.type	solution, @function
solution:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	DWORD PTR -164[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -144[rbp]
	mov	eax, 0
	mov	ecx, 16
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -160[rbp], 0
	mov	DWORD PTR -156[rbp], 0
	mov	DWORD PTR -152[rbp], 0
	mov	DWORD PTR -148[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -148[rbp]
	mov	edx, -2147483648
	mov	ecx, eax
	shr	edx, cl
	mov	eax, edx
	and	eax, DWORD PTR -164[rbp]
	mov	edx, eax
	mov	eax, 31
	sub	eax, DWORD PTR -148[rbp]
	mov	ecx, eax
	sar	edx, cl
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	DWORD PTR -144[rbp+rax*4], edx
	add	DWORD PTR -148[rbp], 1
.L2:
	cmp	DWORD PTR -148[rbp], 31
	jle	.L3
	mov	DWORD PTR -148[rbp], 0
	jmp	.L4
.L9:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 1
	jne	.L5
	mov	eax, DWORD PTR -148[rbp]
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 1
	je	.L6
.L5:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 1
	jne	.L7
	mov	eax, DWORD PTR -148[rbp]
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	test	eax, eax
	jne	.L7
	mov	DWORD PTR -160[rbp], 1
	mov	DWORD PTR -156[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	test	eax, eax
	jne	.L8
	mov	eax, DWORD PTR -148[rbp]
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	test	eax, eax
	jne	.L8
	cmp	DWORD PTR -160[rbp], 1
	jne	.L8
	add	DWORD PTR -156[rbp], 1
	jmp	.L6
.L8:
	mov	eax, DWORD PTR -148[rbp]
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	test	eax, eax
	jne	.L6
	mov	eax, DWORD PTR -148[rbp]
	add	eax, 1
	cdqe
	mov	eax, DWORD PTR -144[rbp+rax*4]
	cmp	eax, 1
	jne	.L6
	cmp	DWORD PTR -160[rbp], 1
	jne	.L6
	add	DWORD PTR -156[rbp], 1
	mov	DWORD PTR -160[rbp], 0
	mov	eax, DWORD PTR -156[rbp]
	cmp	eax, DWORD PTR -152[rbp]
	jle	.L6
	mov	eax, DWORD PTR -156[rbp]
	mov	DWORD PTR -152[rbp], eax
.L6:
	add	DWORD PTR -148[rbp], 1
.L4:
	cmp	DWORD PTR -148[rbp], 31
	jle	.L9
	mov	eax, DWORD PTR -152[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	solution, .-solution
	.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	"109205.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	solution
	.syntax unified
	.arm
	.fpu softvfp
	.type	solution, %function
solution:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-144]
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L2
.L3:
	mov	r2, #-2147483648
	ldr	r3, [fp, #-140]
	lsr	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-160]
	and	r2, r2, r3
	ldr	r3, [fp, #-140]
	rsb	r3, r3, #31
	asr	r2, r2, r3
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-132]
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L2:
	ldr	r3, [fp, #-140]
	cmp	r3, #31
	ble	.L3
	mov	r3, #0
	str	r3, [fp, #-140]
	b	.L4
.L9:
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #1
	bne	.L5
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #1
	beq	.L6
.L5:
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #1
	bne	.L7
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #0
	bne	.L7
	mov	r3, #1
	str	r3, [fp, #-152]
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L6
.L7:
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	bne	.L8
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
	b	.L6
.L8:
	ldr	r3, [fp, #-140]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-132]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-152]
	cmp	r3, #1
	bne	.L6
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
	mov	r3, #0
	str	r3, [fp, #-152]
	ldr	r2, [fp, #-148]
	ldr	r3, [fp, #-144]
	cmp	r2, r3
	ble	.L6
	ldr	r3, [fp, #-148]
	str	r3, [fp, #-144]
.L6:
	ldr	r3, [fp, #-140]
	add	r3, r3, #1
	str	r3, [fp, #-140]
.L4:
	ldr	r3, [fp, #-140]
	cmp	r3, #31
	ble	.L9
	ldr	r3, [fp, #-144]
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC0
	.size	solution, .-solution
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
