	.file	"112532.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"%hu"
.LC1:
	.string	"%hu %s"
.LC2:
	.string	"%hu %hu %hu %hu %hu %hu %hu\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
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdin[rip]
	lea	rdx, -28[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	mov	WORD PTR -26[rbp], 0
	mov	DWORD PTR -21[rbp], 0
	mov	WORD PTR -17[rbp], 0
	mov	BYTE PTR -15[rbp], 0
	mov	WORD PTR -24[rbp], 0
	jmp	.L2
.L3:
	mov	rax, QWORD PTR stdin[rip]
	lea	rcx, -14[rbp]
	lea	rdx, -26[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rdx, -14[rbp]
	lea	rax, -21[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	Days_according_to_first
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -15[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	r8d, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -16[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	edi, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -17[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	esi, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -18[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	r9d, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -19[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	r10d, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -20[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	ecx, eax
	mov	eax, edx
	sub	eax, ecx
	lea	ecx, 1[rax]
	movzx	eax, WORD PTR -26[rbp]
	movzx	eax, ax
	movzx	edx, BYTE PTR -21[rbp]
	movzx	edx, dl
	sub	eax, edx
	movsx	rdx, eax
	imul	rdx, rdx, -1840700269
	shr	rdx, 32
	add	edx, eax
	sar	edx, 2
	sar	eax, 31
	mov	r11d, eax
	mov	eax, edx
	sub	eax, r11d
	lea	edx, 1[rax]
	mov	rax, QWORD PTR stdout[rip]
	sub	rsp, 8
	push	r8
	push	rdi
	push	rsi
	mov	r8d, r10d
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 32
	movzx	eax, WORD PTR -24[rbp]
	add	eax, 1
	mov	WORD PTR -24[rbp], ax
.L2:
	movzx	eax, WORD PTR -28[rbp]
	cmp	WORD PTR -24[rbp], ax
	jb	.L3
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	Days_according_to_first
	.type	Days_according_to_first, @function
Days_according_to_first:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 1
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 101
	cmp	eax, 16
	ja	.L7
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L9[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L9[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L9:
	.long	.L13-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L12-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L11-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L10-.L9
	.long	.L7-.L9
	.long	.L7-.L9
	.long	.L8-.L9
	.text
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 1
	jmp	.L14
.L8:
	mov	rax, QWORD PTR -16[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 116
	jne	.L15
	mov	edx, 7
	jmp	.L16
.L15:
	mov	edx, 2
.L16:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 6
	jmp	.L14
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 5
	jmp	.L14
.L10:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 4
	jmp	.L14
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 3
	nop
.L14:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	Days_from_monday_
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	Days_according_to_first, .-Days_according_to_first
	.globl	Days_from_monday_
	.type	Days_from_monday_, @function
Days_from_monday_:
.LFB8:
	.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 -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 6
	ja	.L18
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	lea	edx, 1[rax]
	jmp	.L19
.L18:
	mov	edx, 1
.L19:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 1[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 1[rax]
	cmp	al, 6
	ja	.L20
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 1[rax]
	lea	edx, 1[rax]
	jmp	.L21
.L20:
	mov	edx, 1
.L21:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 2[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 2[rax]
	cmp	al, 6
	ja	.L22
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 2[rax]
	lea	edx, 1[rax]
	jmp	.L23
.L22:
	mov	edx, 1
.L23:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 3[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 3[rax]
	cmp	al, 6
	ja	.L24
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 3[rax]
	lea	edx, 1[rax]
	jmp	.L25
.L24:
	mov	edx, 1
.L25:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 4[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 4[rax]
	cmp	al, 6
	ja	.L26
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 4[rax]
	lea	edx, 1[rax]
	jmp	.L27
.L26:
	mov	edx, 1
.L27:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 5[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 5[rax]
	cmp	al, 6
	ja	.L28
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 5[rax]
	lea	edx, 1[rax]
	jmp	.L29
.L28:
	mov	edx, 1
.L29:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 6[rax], dl
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Days_from_monday_, .-Days_from_monday_
	.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	"112532.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%hu\000"
	.align	2
.LC1:
	.ascii	"%hu %s\000"
	.align	2
.LC2:
	.ascii	"%hu %hu %hu %hu %hu %hu %hu\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, fp, lr}
	add	fp, sp, #20
	sub	sp, sp, #56
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	mov	r3,#0
	ldr	r3, .L6+4
	ldr	r3, [r3]
	sub	r2, fp, #46
	ldr	r1, .L6+8
	mov	r0, r3
	bl	__isoc99_fscanf
	mov	r3, #0
	strh	r3, [fp, #-44]	@ movhi
	sub	r3, fp, #40
	mov	r2, #0
	str	r2, [r3]
	strh	r2, [r3, #4]	@ movhi
	strb	r2, [r3, #6]
	mov	r3, #0
	strh	r3, [fp, #-42]	@ movhi
	b	.L2
.L3:
	ldr	r3, .L6+4
	ldr	r0, [r3]
	sub	r3, fp, #32
	sub	r2, fp, #44
	ldr	r1, .L6+12
	bl	__isoc99_fscanf
	sub	r2, fp, #32
	sub	r3, fp, #40
	mov	r1, r2
	mov	r0, r3
	bl	Days_according_to_first
	ldr	r3, .L6+16
	ldr	r4, [r3]
	ldrh	r3, [fp, #-44]
	mov	r2, r3
	ldrb	r3, [fp, #-40]	@ zero_extendqisi2
	sub	r3, r2, r3
	ldr	r2, .L6+20
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	add	r5, r3, #1
	ldrh	r3, [fp, #-44]
	mov	r2, r3
	ldrb	r3, [fp, #-39]	@ zero_extendqisi2
	sub	r3, r2, r3
	ldr	r2, .L6+20
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	add	r6, r3, #1
	ldrh	r3, [fp, #-44]
	mov	r2, r3
	ldrb	r3, [fp, #-38]	@ zero_extendqisi2
	sub	r3, r2, r3
	ldr	r2, .L6+20
	smull	r1, r2, r3, r2
	add	r2, r2, r3
	asr	r2, r2, #2
	asr	r3, r3, #31
	sub	r3, r2, r3
	add	r2, r3, #1
	ldrh	r3, [fp, #-44]
	mov	r1, r3
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	sub	r3, r1, r3
	ldr	r1, .L6+20
	smull	r0, r1, r3, r1
	add	r1, r1, r3
	asr	r1, r1, #2
	asr	r3, r3, #31
	sub	r3, r1, r3
	add	r1, r3, #1
	ldrh	r3, [fp, #-44]
	mov	r0, r3
	ldrb	r3, [fp, #-36]	@ zero_extendqisi2
	sub	r3, r0, r3
	ldr	r0, .L6+20
	smull	ip, r0, r3, r0
	add	r0, r0, r3
	asr	r0, r0, #2
	asr	r3, r3, #31
	sub	r3, r0, r3
	add	r0, r3, #1
	ldrh	r3, [fp, #-44]
	mov	ip, r3
	ldrb	r3, [fp, #-35]	@ zero_extendqisi2
	sub	r3, ip, r3
	ldr	ip, .L6+20
	smull	lr, ip, r3, ip
	add	ip, ip, r3
	asr	ip, ip, #2
	asr	r3, r3, #31
	sub	r3, ip, r3
	add	ip, r3, #1
	ldrh	r3, [fp, #-44]
	mov	lr, r3
	ldrb	r3, [fp, #-34]	@ zero_extendqisi2
	sub	r3, lr, r3
	ldr	lr, .L6+20
	smull	r7, lr, r3, lr
	add	lr, lr, r3
	asr	lr, lr, #2
	asr	r3, r3, #31
	sub	r3, lr, r3
	add	r3, r3, #1
	str	r3, [sp, #16]
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, r6
	mov	r2, r5
	ldr	r1, .L6+24
	mov	r0, r4
	bl	fprintf
	ldrh	r3, [fp, #-42]
	add	r3, r3, #1
	strh	r3, [fp, #-42]	@ movhi
.L2:
	ldrh	r3, [fp, #-46]
	ldrh	r2, [fp, #-42]
	cmp	r2, r3
	bcc	.L3
	mov	r3, #0
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-24]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	stdin
	.word	.LC0
	.word	.LC1
	.word	stdout
	.word	-1840700269
	.word	.LC2
	.size	main, .-main
	.align	2
	.global	Days_according_to_first
	.syntax unified
	.arm
	.fpu softvfp
	.type	Days_according_to_first, %function
Days_according_to_first:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #101
	cmp	r3, #16
	ldrls	pc, [pc, r3, asl #2]
	b	.L9
.L11:
	.word	.L15
	.word	.L9
	.word	.L9
	.word	.L14
	.word	.L9
	.word	.L9
	.word	.L9
	.word	.L9
	.word	.L9
	.word	.L9
	.word	.L13
	.word	.L9
	.word	.L9
	.word	.L12
	.word	.L9
	.word	.L9
	.word	.L10
.L13:
	ldr	r3, [fp, #-8]
	mov	r2, #1
	strb	r2, [r3]
	b	.L16
.L10:
	ldr	r3, [fp, #-12]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #116
	bne	.L17
	mov	r2, #7
	b	.L18
.L17:
	mov	r2, #2
.L18:
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	b	.L16
.L15:
	ldr	r3, [fp, #-8]
	mov	r2, #6
	strb	r2, [r3]
	b	.L16
.L14:
	ldr	r3, [fp, #-8]
	mov	r2, #5
	strb	r2, [r3]
	b	.L16
.L12:
	ldr	r3, [fp, #-8]
	mov	r2, #4
	strb	r2, [r3]
	b	.L16
.L9:
	ldr	r3, [fp, #-8]
	mov	r2, #3
	strb	r2, [r3]
	nop
.L16:
	ldr	r0, [fp, #-8]
	bl	Days_from_monday_
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	Days_according_to_first, .-Days_according_to_first
	.align	2
	.global	Days_from_monday_
	.syntax unified
	.arm
	.fpu softvfp
	.type	Days_from_monday_, %function
Days_from_monday_:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L20
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L21
.L20:
	mov	r2, #1
.L21:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L22
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L23
.L22:
	mov	r2, #1
.L23:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #2]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L24
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L25
.L24:
	mov	r2, #1
.L25:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L26
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L27
.L26:
	mov	r2, #1
.L27:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L28
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L29
.L28:
	mov	r2, #1
.L29:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #5]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	cmp	r3, #6
	bhi	.L30
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	add	r3, r3, #1
	and	r2, r3, #255
	b	.L31
.L30:
	mov	r2, #1
.L31:
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #6]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	Days_from_monday_, .-Days_from_monday_
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
