	.file	"70449661.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%s"
.LC1:
	.string	"PM"
.LC2:
	.string	"pm"
.LC3:
	.string	"%02d%c%02d%c%02d"
	.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
	sub	rsp, 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	BYTE PTR -73[rbp], 58
	mov	edi, 10240
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L2
	mov	eax, 1
	jmp	.L16
.L2:
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	mov	QWORD PTR -20[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	QWORD PTR -40[rbp], 3
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	DWORD PTR -72[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	jmp	.L4
.L8:
	mov	DWORD PTR -72[rbp], 0
	jmp	.L5
.L6:
	mov	edx, DWORD PTR -72[rbp]
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	mov	edx, eax
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	add	eax, edx
	sub	eax, 48
	mov	DWORD PTR -72[rbp], eax
	add	QWORD PTR -64[rbp], 1
.L5:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 2048
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR -64[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -73[rbp], al
	jne	.L7
	add	QWORD PTR -64[rbp], 1
.L7:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR -72[rbp]
	mov	DWORD PTR -20[rbp+rax*4], edx
	add	QWORD PTR -56[rbp], 1
.L4:
	mov	rax, QWORD PTR -56[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jb	.L8
	mov	DWORD PTR -68[rbp], 0
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L9
	mov	rax, QWORD PTR -64[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L10
.L9:
	mov	DWORD PTR -68[rbp], 1
.L10:
	cmp	DWORD PTR -68[rbp], 1
	jne	.L11
	mov	eax, DWORD PTR -20[rbp]
	cmp	eax, 11
	jg	.L12
	mov	eax, DWORD PTR -20[rbp]
	lea	ecx, 12[rax]
	movsx	rax, ecx
	imul	rax, rax, 715827883
	shr	rax, 32
	sar	eax, 2
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	sal	eax, 3
	sub	ecx, eax
	mov	edx, ecx
	jmp	.L13
.L12:
	mov	edx, DWORD PTR -20[rbp]
.L13:
	mov	DWORD PTR -20[rbp], edx
	jmp	.L14
.L11:
	mov	ecx, DWORD PTR -20[rbp]
	movsx	rax, ecx
	imul	rax, rax, 715827883
	shr	rax, 32
	sar	eax
	mov	esi, ecx
	sar	esi, 31
	sub	eax, esi
	mov	edx, eax
	mov	eax, edx
	add	eax, eax
	add	eax, edx
	sal	eax, 2
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR -20[rbp], edx
.L14:
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 1
	add	rax, rax
	add	rax, 1
	mov	esi, 1
	mov	rdi, rax
	call	calloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	jne	.L15
	mov	eax, 1
	jmp	.L16
.L15:
	mov	esi, DWORD PTR -12[rbp]
	movsx	r8d, BYTE PTR -73[rbp]
	mov	edi, DWORD PTR -16[rbp]
	movsx	ecx, BYTE PTR -73[rbp]
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -32[rbp]
	sub	rsp, 8
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	add	rsp, 16
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L16:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"70449661.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%s\000"
	.align	2
.LC1:
	.ascii	"PM\000"
	.align	2
.LC2:
	.ascii	"pm\000"
	.align	2
.LC3:
	.ascii	"%02d%c%02d%c%02d\000"
	.align	2
.LC4:
	.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	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #58
	strb	r3, [fp, #-49]
	mov	r0, #10240
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L2
	mov	r3, #1
	b	.L16
.L2:
	ldr	r1, [fp, #-32]
	ldr	r0, .L18+4
	bl	__isoc99_scanf
	sub	r3, fp, #20
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	mov	r3, #3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-40]
	b	.L4
.L8:
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L5
.L6:
	ldr	r2, [fp, #-44]
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-48]
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r2, r3
	sub	r3, r3, #48
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L5:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldr	r3, [fp, #-48]
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #2048
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-48]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-49]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L7
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
.L7:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-44]
	str	r2, [r3, #-16]
	ldr	r3, [fp, #-40]
	add	r3, r3, #1
	str	r3, [fp, #-40]
.L4:
	ldr	r2, [fp, #-40]
	ldr	r3, [fp, #-28]
	cmp	r2, r3
	bcc	.L8
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r1, .L18+8
	ldr	r0, [fp, #-48]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r1, .L18+12
	ldr	r0, [fp, #-48]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
.L9:
	mov	r3, #1
	str	r3, [fp, #-36]
.L10:
	ldr	r3, [fp, #-36]
	cmp	r3, #1
	bne	.L11
	ldr	r3, [fp, #-20]
	cmp	r3, #11
	bgt	.L12
	ldr	r3, [fp, #-20]
	add	r1, r3, #12
	ldr	r3, .L18+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #2
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #3
	sub	r2, r1, r3
	b	.L13
.L12:
	ldr	r2, [fp, #-20]
.L13:
	str	r2, [fp, #-20]
	b	.L14
.L11:
	ldr	r1, [fp, #-20]
	ldr	r3, .L18+16
	smull	r2, r3, r1, r3
	asr	r2, r3, #1
	asr	r3, r1, #31
	sub	r2, r2, r3
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	sub	r2, r1, r3
	str	r2, [fp, #-20]
.L14:
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	lsl	r3, r3, #1
	add	r3, r3, #1
	mov	r1, #1
	mov	r0, r3
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L15
	mov	r3, #1
	b	.L16
.L15:
	ldr	r0, [fp, #-20]
	ldrb	ip, [fp, #-49]	@ zero_extendqisi2
	ldr	r3, [fp, #-16]
	ldrb	r2, [fp, #-49]	@ zero_extendqisi2
	ldr	r1, [fp, #-12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r0
	ldr	r1, .L18+20
	ldr	r0, [fp, #-24]
	bl	sprintf
	ldr	r0, [fp, #-24]
	bl	puts
	ldr	r0, [fp, #-32]
	bl	free
	ldr	r0, [fp, #-24]
	bl	free
	mov	r3, #0
.L16:
	ldr	r2, .L18
	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}
.L19:
	.align	2
.L18:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	715827883
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
