	.file	"1028372.c"
	.intel_syntax noprefix
	.text
	.globl	solve
	.type	solve, @function
solve:
.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, 80
	mov	DWORD PTR -52[rbp], edi
	mov	DWORD PTR -56[rbp], esi
	mov	QWORD PTR -64[rbp], rdx
	mov	QWORD PTR -72[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -48[rbp], -1
	mov	DWORD PTR -36[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	cmp	QWORD PTR -64[rbp], 0
	je	.L18
	cmp	QWORD PTR -72[rbp], 0
	je	.L18
	cmp	DWORD PTR -52[rbp], 0
	js	.L19
	cmp	DWORD PTR -52[rbp], 16
	jg	.L19
	cmp	DWORD PTR -56[rbp], 0
	js	.L20
	cmp	DWORD PTR -56[rbp], 16
	jg	.L20
	mov	DWORD PTR -44[rbp], 0
	jmp	.L9
.L13:
	mov	DWORD PTR -40[rbp], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 4
	lea	rdx, -16[rax]
	mov	rax, QWORD PTR -64[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -44[rbp]
	cdqe
	mov	edx, DWORD PTR [rdx+rax*4]
	mov	eax, DWORD PTR -56[rbp]
	cdqe
	sal	rax, 4
	lea	rcx, -16[rax]
	mov	rax, QWORD PTR -72[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -40[rbp]
	cdqe
	mov	eax, DWORD PTR [rcx+rax*4]
	cmp	edx, eax
	jne	.L11
	mov	eax, DWORD PTR -52[rbp]
	cdqe
	sal	rax, 4
	lea	rdx, -16[rax]
	mov	rax, QWORD PTR -64[rbp]
	lea	rcx, [rdx+rax]
	mov	eax, DWORD PTR -36[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -36[rbp], edx
	mov	edx, DWORD PTR -44[rbp]
	movsx	rdx, edx
	mov	edx, DWORD PTR [rcx+rdx*4]
	cdqe
	mov	DWORD PTR -32[rbp+rax*4], edx
.L11:
	add	DWORD PTR -40[rbp], 1
.L10:
	cmp	DWORD PTR -40[rbp], 3
	jle	.L12
	add	DWORD PTR -44[rbp], 1
.L9:
	cmp	DWORD PTR -44[rbp], 3
	jle	.L13
	cmp	DWORD PTR -36[rbp], 0
	jne	.L14
	mov	DWORD PTR -48[rbp], -1
	jmp	.L4
.L14:
	cmp	DWORD PTR -36[rbp], 1
	jne	.L15
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -48[rbp], eax
	jmp	.L4
.L15:
	mov	DWORD PTR -48[rbp], 0
	jmp	.L4
.L18:
	nop
	jmp	.L4
.L19:
	nop
	jmp	.L4
.L20:
	nop
.L4:
	mov	eax, DWORD PTR -48[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	solve, .-solve
	.section	.rodata
.LC0:
	.string	"%d"
	.align 8
.LC1:
	.string	"Illegal number of tests (1 <= T <= 100)"
.LC2:
	.string	"%d %d %d %d"
.LC3:
	.string	"Case #%d: "
.LC4:
	.string	"Bad magician!"
.LC5:
	.string	"Volunteer cheated!"
.LC6:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -160[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	DWORD PTR -152[rbp], 1
	lea	rax, -172[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	eax, DWORD PTR -172[rbp]
	test	eax, eax
	jle	.L22
	mov	eax, DWORD PTR -172[rbp]
	cmp	eax, 100
	jle	.L25
.L22:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L24
.L32:
	lea	rax, -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -156[rbp], 0
	jmp	.L26
.L27:
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 12
	lea	rsi, [rdx+rax]
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 8
	lea	rcx, [rdx+rax]
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 4
	add	rdx, rax
	lea	rdi, -144[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdi
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -156[rbp], 1
.L26:
	cmp	DWORD PTR -156[rbp], 3
	jle	.L27
	lea	rax, -164[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	DWORD PTR -156[rbp], 0
	jmp	.L28
.L29:
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 12
	lea	rsi, [rdx+rax]
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 8
	lea	rcx, [rdx+rax]
	lea	rdx, -80[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, 4
	add	rdx, rax
	lea	rdi, -80[rbp]
	mov	eax, DWORD PTR -156[rbp]
	cdqe
	sal	rax, 4
	add	rax, rdi
	mov	r8, rsi
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	add	DWORD PTR -156[rbp], 1
.L28:
	cmp	DWORD PTR -156[rbp], 3
	jle	.L29
	mov	esi, DWORD PTR -164[rbp]
	mov	eax, DWORD PTR -168[rbp]
	lea	rcx, -80[rbp]
	lea	rdx, -144[rbp]
	mov	edi, eax
	call	solve
	mov	DWORD PTR -148[rbp], eax
	mov	eax, DWORD PTR -160[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -148[rbp], -1
	je	.L30
	cmp	DWORD PTR -148[rbp], 0
	jne	.L31
	lea	rdi, .LC4[rip]
	call	puts@PLT
	jmp	.L25
.L30:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	jmp	.L25
.L31:
	mov	eax, DWORD PTR -148[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	mov	eax, DWORD PTR -160[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -160[rbp], edx
	mov	edx, DWORD PTR -172[rbp]
	cmp	eax, edx
	jl	.L32
	mov	DWORD PTR -152[rbp], 0
.L24:
	mov	eax, DWORD PTR -152[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L34
	call	__stack_chk_fail@PLT
.L34:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"1028372.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	solve
	.syntax unified
	.arm
	.fpu softvfp
	.type	solve, %function
solve:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	str	r2, [fp, #-56]
	str	r3, [fp, #-60]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-28]
	sub	r3, fp, #24
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	blt	.L19
	ldr	r3, [fp, #-48]
	cmp	r3, #16
	bgt	.L19
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	blt	.L20
	ldr	r3, [fp, #-52]
	cmp	r3, #16
	bgt	.L20
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L9
.L13:
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L10
.L12:
	ldr	r3, [fp, #-48]
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r2, [fp, #-36]
	ldr	r2, [r3, r2, lsl #2]
	ldr	r3, [fp, #-52]
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r1, [fp, #-60]
	add	r3, r1, r3
	ldr	r1, [fp, #-32]
	ldr	r3, [r3, r1, lsl #2]
	cmp	r2, r3
	bne	.L11
	ldr	r3, [fp, #-48]
	sub	r3, r3, #-268435455
	lsl	r3, r3, #4
	ldr	r2, [fp, #-56]
	add	r2, r2, r3
	ldr	r3, [fp, #-28]
	add	r1, r3, #1
	str	r1, [fp, #-28]
	ldr	r1, [fp, #-36]
	ldr	r2, [r2, r1, lsl #2]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-20]
.L11:
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L10:
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	ble	.L12
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-36]
.L9:
	ldr	r3, [fp, #-36]
	cmp	r3, #3
	ble	.L13
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L14
	mvn	r3, #0
	str	r3, [fp, #-40]
	b	.L4
.L14:
	ldr	r3, [fp, #-28]
	cmp	r3, #1
	bne	.L15
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-40]
	b	.L4
.L15:
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L4
.L18:
	nop
	b	.L4
.L19:
	nop
	b	.L4
.L20:
	nop
.L4:
	ldr	r3, [fp, #-40]
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC0
	.size	solve, .-solve
	.section	.rodata
	.align	2
.LC1:
	.ascii	"%d\000"
	.align	2
.LC2:
	.ascii	"Illegal number of tests (1 <= T <= 100)\000"
	.align	2
.LC3:
	.ascii	"%d %d %d %d\000"
	.align	2
.LC4:
	.ascii	"Case #%d: \000"
	.align	2
.LC5:
	.ascii	"Bad magician!\000"
	.align	2
.LC6:
	.ascii	"Volunteer cheated!\000"
	.align	2
.LC7:
	.ascii	"%d\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #168
	ldr	r3, .L37
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-152]
	sub	r3, fp, #136
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #72
	mov	r2, #64
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-144]
	sub	r3, fp, #164
	mov	r1, r3
	ldr	r0, .L37+4
	bl	__isoc99_scanf
	ldr	r3, [fp, #-164]
	cmp	r3, #0
	ble	.L24
	ldr	r3, [fp, #-164]
	cmp	r3, #100
	ble	.L27
.L24:
	ldr	r0, .L37+8
	bl	puts
	b	.L26
.L34:
	sub	r3, fp, #160
	mov	r1, r3
	ldr	r0, .L37+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L28
.L29:
	sub	r2, fp, #136
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r1, r2, r3
	sub	r2, fp, #136
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #4
	add	r0, r2, r3
	sub	r2, fp, #136
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #8
	add	ip, r2, r3
	sub	r2, fp, #136
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #12
	add	r3, r2, r3
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L37+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L28:
	ldr	r3, [fp, #-148]
	cmp	r3, #3
	ble	.L29
	sub	r3, fp, #156
	mov	r1, r3
	ldr	r0, .L37+4
	bl	__isoc99_scanf
	mov	r3, #0
	str	r3, [fp, #-148]
	b	.L30
.L31:
	sub	r2, fp, #72
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r1, r2, r3
	sub	r2, fp, #72
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #4
	add	r0, r2, r3
	sub	r2, fp, #72
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #8
	add	ip, r2, r3
	sub	r2, fp, #72
	ldr	r3, [fp, #-148]
	lsl	r3, r3, #4
	add	r3, r3, #12
	add	r3, r2, r3
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r0, .L37+12
	bl	__isoc99_scanf
	ldr	r3, [fp, #-148]
	add	r3, r3, #1
	str	r3, [fp, #-148]
.L30:
	ldr	r3, [fp, #-148]
	cmp	r3, #3
	ble	.L31
	ldr	r0, [fp, #-160]
	ldr	r1, [fp, #-156]
	sub	r3, fp, #72
	sub	r2, fp, #136
	bl	solve
	str	r0, [fp, #-140]
	ldr	r1, [fp, #-152]
	ldr	r0, .L37+16
	bl	printf
	ldr	r3, [fp, #-140]
	cmn	r3, #1
	beq	.L32
	ldr	r3, [fp, #-140]
	cmp	r3, #0
	bne	.L33
	ldr	r0, .L37+20
	bl	puts
	b	.L27
.L32:
	ldr	r0, .L37+24
	bl	puts
	b	.L27
.L33:
	ldr	r1, [fp, #-140]
	ldr	r0, .L37+28
	bl	printf
.L27:
	ldr	r3, [fp, #-152]
	add	r2, r3, #1
	str	r2, [fp, #-152]
	ldr	r2, [fp, #-164]
	cmp	r3, r2
	blt	.L34
	mov	r3, #0
	str	r3, [fp, #-144]
.L26:
	ldr	r3, [fp, #-144]
	ldr	r2, .L37
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L36
	bl	__stack_chk_fail
.L36:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC8
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
