	.file	"832372.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	"%0*lX\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 120
	.cfi_offset 3, -24
	mov	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -116[rbp], 7
	jne	.L2
	mov	rax, QWORD PTR -128[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L3
.L2:
	mov	eax, 1
	jmp	.L23
.L3:
	mov	QWORD PTR -40[rbp], 0
	jmp	.L5
.L8:
	mov	rax, QWORD PTR -40[rbp]
	test	rax, rax
	jne	.L6
	mov	edx, 10
	jmp	.L7
.L6:
	mov	edx, 16
.L7:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 2
	lea	rcx, 0[0+rax*8]
	mov	rax, QWORD PTR -128[rbp]
	add	rax, rcx
	mov	rax, QWORD PTR [rax]
	mov	rbx, QWORD PTR -40[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -96[rbp+rbx*8], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
.L5:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, 4
	jbe	.L8
	mov	rax, QWORD PTR -72[rbp]
	mov	QWORD PTR -56[rbp], rax
	jmp	.L9
.L18:
	mov	rax, QWORD PTR -80[rbp]
	test	rax, rax
	je	.L10
	mov	QWORD PTR -40[rbp], 0
	jmp	.L11
.L13:
	mov	rax, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	ecx, edx
	shr	rax, cl
	mov	rsi, rax
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, eax
	mov	eax, 7
	sub	eax, ecx
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	xor	rax, rsi
	and	eax, 1
	test	rax, rax
	je	.L12
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	esi, cl
	mov	rax, QWORD PTR -40[rbp]
	mov	ecx, eax
	mov	eax, 7
	sub	eax, ecx
	mov	edi, 1
	mov	ecx, eax
	sal	edi, cl
	mov	eax, edi
	xor	eax, esi
	cdqe
	xor	rax, rdx
	mov	QWORD PTR -48[rbp], rax
.L12:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
.L11:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, 3
	jbe	.L13
.L10:
	mov	rsi, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -96[rbp]
	sub	eax, 8
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	xor	rax, rsi
	mov	QWORD PTR -56[rbp], rax
	mov	QWORD PTR -40[rbp], 0
	jmp	.L14
.L17:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -96[rbp]
	sub	eax, 1
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	and	eax, 1
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR -56[rbp]
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -88[rbp]
	xor	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	jmp	.L16
.L15:
	mov	rax, QWORD PTR -56[rbp]
	add	rax, rax
	mov	QWORD PTR -56[rbp], rax
.L16:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
.L14:
	mov	rax, QWORD PTR -40[rbp]
	cmp	rax, 7
	jbe	.L17
.L9:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	getc@PLT
	cdqe
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, -1
	jne	.L18
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -96[rbp]
	sub	eax, 1
	mov	esi, 1
	mov	ecx, eax
	sal	rsi, cl
	mov	rax, rsi
	sub	rax, 1
	add	rax, rax
	or	rax, 1
	and	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -80[rbp]
	test	rax, rax
	je	.L19
	mov	QWORD PTR -40[rbp], 0
	jmp	.L20
.L22:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	ecx, edx
	shr	rax, cl
	mov	rsi, rax
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -96[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	edi, eax
	mov	eax, ecx
	sub	eax, edi
	sub	eax, 1
	mov	ecx, eax
	shr	rdx, cl
	mov	rax, rdx
	xor	rax, rsi
	and	eax, 1
	test	rax, rax
	je	.L21
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	esi, 1
	mov	ecx, eax
	sal	rsi, cl
	mov	rax, QWORD PTR -96[rbp]
	mov	ecx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	edi, eax
	mov	eax, ecx
	sub	eax, edi
	sub	eax, 1
	mov	edi, 1
	mov	ecx, eax
	sal	rdi, cl
	mov	rax, rdi
	xor	rax, rsi
	xor	rax, rdx
	mov	QWORD PTR -56[rbp], rax
.L21:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	mov	QWORD PTR -40[rbp], rax
.L20:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	shr	rdx
	cmp	rax, rdx
	jb	.L22
.L19:
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	xor	rax, rdx
	mov	QWORD PTR -56[rbp], rax
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR -96[rbp]
	add	edx, 3
	mov	ecx, edx
	sar	ecx, 2
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L23:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L24
	call	__stack_chk_fail@PLT
.L24:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"832372.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	"%0*lX\012\000"
	.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 = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	str	r0, [fp, #-56]
	str	r1, [fp, #-60]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-56]
	cmp	r3, #7
	bne	.L2
	ldr	r3, [fp, #-60]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L25+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L3
.L2:
	mov	r3, #1
	b	.L23
.L3:
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L5
.L8:
	ldr	r3, [fp, #-20]
	add	r3, r3, #2
	lsl	r3, r3, #2
	ldr	r2, [fp, #-60]
	add	r3, r2, r3
	ldr	r0, [r3]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L6
	mov	r3, #10
	b	.L7
.L6:
	mov	r3, #16
.L7:
	ldr	r4, [fp, #-20]
	mov	r2, r3
	mov	r1, #0
	bl	strtoul
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-36]
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L5:
	ldr	r3, [fp, #-20]
	cmp	r3, #4
	bls	.L8
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-28]
	b	.L9
.L18:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L10
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L11
.L13:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	lsr	r2, r2, r3
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-20]
	rsb	r3, r3, #7
	lsr	r3, r1, r3
	eor	r3, r3, r2
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	mov	r1, #1
	lsl	r1, r1, r2
	ldr	r2, [fp, #-20]
	rsb	r2, r2, #7
	mov	r0, #1
	lsl	r2, r0, r2
	eor	r2, r2, r1
	eor	r3, r3, r2
	str	r3, [fp, #-24]
.L12:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L11:
	ldr	r3, [fp, #-20]
	cmp	r3, #3
	bls	.L13
.L10:
	ldr	r2, [fp, #-28]
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #8
	lsl	r3, r1, r3
	eor	r3, r3, r2
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L14
.L17:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	lsr	r3, r2, r3
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-28]
	lsl	r2, r3, #1
	ldr	r3, [fp, #-44]
	eor	r3, r3, r2
	str	r3, [fp, #-28]
	b	.L16
.L15:
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	str	r3, [fp, #-28]
.L16:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L14:
	ldr	r3, [fp, #-20]
	cmp	r3, #7
	bls	.L17
.L9:
	ldr	r0, [fp, #-52]
	bl	getc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmn	r3, #1
	bne	.L18
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-48]
	sub	r3, r3, #1
	mov	r1, #1
	lsl	r3, r1, r3
	sub	r3, r3, #1
	lsl	r3, r3, #1
	orr	r3, r3, #1
	and	r3, r3, r2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L19
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L20
.L22:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	lsr	r2, r2, r3
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-48]
	ldr	r3, [fp, #-20]
	sub	r3, r0, r3
	sub	r3, r3, #1
	lsr	r3, r1, r3
	eor	r3, r3, r2
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L21
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	mov	r1, #1
	lsl	r1, r1, r3
	ldr	r0, [fp, #-48]
	ldr	r3, [fp, #-20]
	sub	r3, r0, r3
	sub	r3, r3, #1
	mov	r0, #1
	lsl	r3, r0, r3
	eor	r3, r3, r1
	eor	r3, r3, r2
	str	r3, [fp, #-28]
.L21:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L20:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-48]
	lsr	r3, r3, #1
	cmp	r2, r3
	bcc	.L22
.L19:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-32]
	eor	r3, r3, r2
	str	r3, [fp, #-28]
	ldr	r0, [fp, #-52]
	bl	fclose
	ldr	r3, [fp, #-48]
	add	r3, r3, #3
	asr	r3, r3, #2
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, .L25+8
	bl	printf
	mov	r3, #0
.L23:
	ldr	r2, .L25
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
