	.file	"537557.c"
	.intel_syntax noprefix
	.text
	.globl	match
	.type	match, @function
match:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	cmp	DWORD PTR -20[rbp], 99999
	ja	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	DWORD PTR -12[rbp], 1
	mov	DWORD PTR -8[rbp], -1
	mov	BYTE PTR -13[rbp], 0
.L9:
	mov	ecx, DWORD PTR -20[rbp]
	mov	edx, ecx
	mov	eax, 3435973837
	imul	rax, rdx
	shr	rax, 32
	mov	edx, eax
	shr	edx, 3
	mov	eax, edx
	sal	eax, 2
	add	eax, edx
	add	eax, eax
	sub	ecx, eax
	mov	edx, ecx
	mov	DWORD PTR -4[rbp], edx
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	eax, 3435973837
	imul	rax, rdx
	shr	rax, 32
	shr	eax, 3
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	js	.L4
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jne	.L5
	add	DWORD PTR -12[rbp], 1
	jmp	.L6
.L5:
	cmp	DWORD PTR -12[rbp], 1
	jle	.L7
	or	BYTE PTR -13[rbp], 1
.L7:
	cmp	DWORD PTR -12[rbp], 2
	jne	.L8
	or	BYTE PTR -13[rbp], 2
.L8:
	mov	DWORD PTR -12[rbp], 1
.L6:
	mov	eax, DWORD PTR -4[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jle	.L4
	mov	eax, 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jne	.L9
	cmp	DWORD PTR -12[rbp], 1
	jle	.L10
	or	BYTE PTR -13[rbp], 1
.L10:
	cmp	DWORD PTR -12[rbp], 2
	jne	.L11
	or	BYTE PTR -13[rbp], 2
.L11:
	movzx	eax, BYTE PTR -13[rbp]
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	match, .-match
	.section	.rodata
.LC0:
	.string	"Part 1: %u\n"
.LC1:
	.string	"Part 2: %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.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	WORD PTR -8[rbp], 0
	mov	WORD PTR -6[rbp], 0
	mov	DWORD PTR -4[rbp], 137683
	jmp	.L13
.L16:
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	match
	mov	BYTE PTR -9[rbp], al
	movzx	eax, BYTE PTR -9[rbp]
	and	eax, 1
	test	eax, eax
	je	.L14
	add	WORD PTR -8[rbp], 1
.L14:
	movzx	eax, BYTE PTR -9[rbp]
	and	eax, 2
	test	eax, eax
	je	.L15
	add	WORD PTR -6[rbp], 1
.L15:
	add	DWORD PTR -4[rbp], 1
.L13:
	cmp	DWORD PTR -4[rbp], 596253
	jbe	.L16
	movzx	eax, WORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, WORD PTR -6[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.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	"537557.c"
	.text
	.align	2
	.global	match
	.syntax unified
	.arm
	.fpu softvfp
	.type	match, %function
match:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #28
	str	r0, [fp, #-24]
	ldr	r3, [fp, #-24]
	ldr	r2, .L12
	cmp	r3, r2
	bcs	.L2
	mov	r3, #0
	b	.L3
.L2:
	mov	r3, #1
	str	r3, [fp, #-16]
	mvn	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	strb	r3, [fp, #-17]
.L9:
	ldr	r1, [fp, #-24]
	ldr	r3, .L12+4
	umull	r2, r3, r1, r3
	lsr	r2, r3, #3
	mov	r3, r2
	lsl	r3, r3, #2
	add	r3, r3, r2
	lsl	r3, r3, #1
	sub	r2, r1, r3
	str	r2, [fp, #-8]
	ldr	r3, [fp, #-24]
	ldr	r2, .L12+4
	umull	r1, r3, r2, r3
	lsr	r3, r3, #3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	blt	.L4
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bne	.L5
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L6
.L5:
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L7
	ldrb	r3, [fp, #-17]
	orr	r3, r3, #1
	strb	r3, [fp, #-17]
.L7:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L8
	ldrb	r3, [fp, #-17]
	orr	r3, r3, #2
	strb	r3, [fp, #-17]
.L8:
	mov	r3, #1
	str	r3, [fp, #-16]
.L6:
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	ble	.L4
	mov	r3, #0
	b	.L3
.L4:
	ldr	r3, [fp, #-8]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L9
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	ble	.L10
	ldrb	r3, [fp, #-17]
	orr	r3, r3, #1
	strb	r3, [fp, #-17]
.L10:
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	bne	.L11
	ldrb	r3, [fp, #-17]
	orr	r3, r3, #2
	strb	r3, [fp, #-17]
.L11:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L13:
	.align	2
.L12:
	.word	100000
	.word	-858993459
	.size	match, .-match
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Part 1: %u\012\000"
	.align	2
.LC1:
	.ascii	"Part 2: %u\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #0
	strh	r3, [fp, #-12]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-10]	@ movhi
	ldr	r3, .L20
	str	r3, [fp, #-8]
	b	.L15
.L18:
	ldr	r0, [fp, #-8]
	bl	match
	mov	r3, r0
	strb	r3, [fp, #-13]
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L16
	ldrh	r3, [fp, #-12]	@ movhi
	add	r3, r3, #1
	strh	r3, [fp, #-12]	@ movhi
.L16:
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L17
	ldrh	r3, [fp, #-10]	@ movhi
	add	r3, r3, #1
	strh	r3, [fp, #-10]	@ movhi
.L17:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L15:
	ldr	r3, [fp, #-8]
	ldr	r2, .L20+4
	cmp	r3, r2
	bls	.L18
	ldrh	r3, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L20+8
	bl	printf
	ldrh	r3, [fp, #-10]
	mov	r1, r3
	ldr	r0, .L20+12
	bl	printf
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	137683
	.word	596253
	.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
