	.file	"485745.c"
	.intel_syntax noprefix
	.text
	.globl	numRookCaptures
	.type	numRookCaptures, @function
numRookCaptures:
.LFB6:
	.cfi_startproc
	endbr64
	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	DWORD PTR -60[rbp], esi
	mov	QWORD PTR -72[rbp], rdx
	cmp	QWORD PTR -56[rbp], 0
	je	.L2
	cmp	DWORD PTR -60[rbp], 0
	jle	.L2
	cmp	QWORD PTR -72[rbp], 0
	jne	.L3
.L2:
	mov	eax, 0
	jmp	.L4
.L3:
	mov	DWORD PTR -40[rbp], -1
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -32[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L5
.L12:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -4[rbp], eax
	mov	DWORD PTR -24[rbp], 0
	jmp	.L6
.L9:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -24[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 82
	jne	.L7
	mov	eax, DWORD PTR -28[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -24[rbp]
	mov	DWORD PTR -32[rbp], eax
	mov	DWORD PTR -40[rbp], 0
	jmp	.L8
.L7:
	add	DWORD PTR -24[rbp], 1
.L6:
	mov	eax, DWORD PTR -24[rbp]
	cmp	eax, DWORD PTR -4[rbp]
	jl	.L9
.L8:
	cmp	DWORD PTR -40[rbp], 0
	je	.L34
	add	DWORD PTR -28[rbp], 1
.L5:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L12
	jmp	.L11
.L34:
	nop
.L11:
	cmp	DWORD PTR -40[rbp], -1
	jne	.L13
	mov	eax, 0
	jmp	.L4
.L13:
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
	jmp	.L14
.L18:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 66
	je	.L35
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L17
	add	DWORD PTR -40[rbp], 1
	jmp	.L16
.L17:
	sub	DWORD PTR -20[rbp], 1
.L14:
	cmp	DWORD PTR -20[rbp], 0
	jns	.L18
	jmp	.L16
.L35:
	nop
.L16:
	mov	eax, DWORD PTR -36[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	jmp	.L19
.L23:
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 66
	je	.L36
	mov	eax, DWORD PTR -16[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -32[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L22
	add	DWORD PTR -40[rbp], 1
	jmp	.L21
.L22:
	add	DWORD PTR -16[rbp], 1
.L19:
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L23
	jmp	.L21
.L36:
	nop
.L21:
	mov	eax, DWORD PTR -32[rbp]
	sub	eax, 1
	mov	DWORD PTR -12[rbp], eax
	jmp	.L24
.L28:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 66
	je	.L37
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L27
	add	DWORD PTR -40[rbp], 1
	jmp	.L26
.L27:
	sub	DWORD PTR -12[rbp], 1
.L24:
	cmp	DWORD PTR -12[rbp], 0
	jns	.L28
	jmp	.L26
.L37:
	nop
.L26:
	mov	eax, DWORD PTR -32[rbp]
	add	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L29
.L33:
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 66
	je	.L38
	mov	eax, DWORD PTR -36[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -8[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 112
	jne	.L32
	add	DWORD PTR -40[rbp], 1
	jmp	.L31
.L32:
	add	DWORD PTR -8[rbp], 1
.L29:
	mov	eax, DWORD PTR -8[rbp]
	cmp	eax, DWORD PTR -60[rbp]
	jl	.L33
	jmp	.L31
.L38:
	nop
.L31:
	mov	eax, DWORD PTR -40[rbp]
.L4:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	numRookCaptures, .-numRookCaptures
	.section	.rodata
.LC0:
	.string	"........"
.LC1:
	.string	"...p...."
.LC2:
	.string	"pp.R.pB."
.LC3:
	.string	"...B...."
.LC4:
	.string	"ans = %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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 64
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, .LC0[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 8
	lea	rdx, .LC1[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 16
	lea	rdx, .LC1[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 24
	lea	rdx, .LC2[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 32
	lea	rdx, .LC0[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 40
	lea	rdx, .LC3[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 48
	lea	rdx, .LC1[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 56
	lea	rdx, .LC0[rip]
	mov	QWORD PTR [rax], rdx
	mov	DWORD PTR -64[rbp], 8
	mov	DWORD PTR -48[rbp], 8
	mov	DWORD PTR -44[rbp], 8
	mov	DWORD PTR -40[rbp], 8
	mov	DWORD PTR -36[rbp], 8
	mov	DWORD PTR -32[rbp], 8
	mov	DWORD PTR -28[rbp], 8
	mov	DWORD PTR -24[rbp], 8
	mov	DWORD PTR -20[rbp], 8
	lea	rdx, -48[rbp]
	mov	ecx, DWORD PTR -64[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, ecx
	mov	rdi, rax
	call	numRookCaptures
	mov	DWORD PTR -60[rbp], eax
	mov	eax, DWORD PTR -60[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	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	"485745.c"
	.text
	.align	2
	.global	numRookCaptures
	.syntax unified
	.arm
	.fpu softvfp
	.type	numRookCaptures, %function
numRookCaptures:
	@ args = 0, 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]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L3
.L2:
	mov	r3, #0
	b	.L4
.L3:
	mvn	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L5
.L12:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-56]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-28]
	b	.L6
.L9:
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #82
	bne	.L7
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-36]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L8
.L7:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L6:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	blt	.L9
.L8:
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L34
	ldr	r3, [fp, #-32]
	add	r3, r3, #1
	str	r3, [fp, #-32]
.L5:
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L12
	b	.L11
.L34:
	nop
.L11:
	ldr	r3, [fp, #-44]
	cmn	r3, #1
	bne	.L13
	mov	r3, #0
	b	.L4
.L13:
	ldr	r3, [fp, #-40]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
	b	.L14
.L18:
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L35
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L17
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L16
.L17:
	ldr	r3, [fp, #-24]
	sub	r3, r3, #1
	str	r3, [fp, #-24]
.L14:
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bge	.L18
	b	.L16
.L35:
	nop
.L16:
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L19
.L23:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L36
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-36]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L22
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L21
.L22:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L19:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L23
	b	.L21
.L36:
	nop
.L21:
	ldr	r3, [fp, #-36]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L24
.L28:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L37
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L27
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L26
.L27:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #1
	str	r3, [fp, #-16]
.L24:
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L28
	b	.L26
.L37:
	nop
.L26:
	ldr	r3, [fp, #-36]
	add	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L29
.L33:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #66
	beq	.L38
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-48]
	add	r3, r2, r3
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #112
	bne	.L32
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
	b	.L31
.L32:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L29:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-52]
	cmp	r2, r3
	blt	.L33
	b	.L31
.L38:
	nop
.L31:
	ldr	r3, [fp, #-44]
.L4:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	numRookCaptures, .-numRookCaptures
	.section	.rodata
	.align	2
.LC1:
	.ascii	"........\000"
	.align	2
.LC2:
	.ascii	"...p....\000"
	.align	2
.LC3:
	.ascii	"pp.R.pB.\000"
	.align	2
.LC4:
	.ascii	"...B....\000"
	.align	2
.LC5:
	.ascii	"ans = %d\012\000"
	.align	2
.LC0:
	.word	8
	.word	8
	.word	8
	.word	8
	.word	8
	.word	8
	.word	8
	.word	8
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #32
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	ldr	r2, .L42+4
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r2, .L42+8
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r2, .L42+8
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #12
	ldr	r2, .L42+12
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #16
	ldr	r2, .L42+4
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #20
	ldr	r2, .L42+16
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #24
	ldr	r2, .L42+8
	str	r2, [r3]
	ldr	r3, [fp, #-52]
	add	r3, r3, #28
	ldr	r2, .L42+4
	str	r2, [r3]
	mov	r3, #8
	str	r3, [fp, #-48]
	ldr	r3, .L42+20
	sub	ip, fp, #40
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, [fp, #-48]
	ldr	r0, [fp, #-52]
	bl	numRookCaptures
	str	r0, [fp, #-44]
	ldr	r1, [fp, #-44]
	ldr	r0, .L42+24
	bl	printf
	mov	r3, #0
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L41
	bl	__stack_chk_fail
.L41:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC6
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC0
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
