	.file	"237644039.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage:\n\tDay16 <input data> <characters needed>\n\n"
.LC1:
	.string	"Error allocation memory: %s\n\n"
.LC2:
	.string	"Checksum: "
	.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 48
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rax
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L3
.L4:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L5
.L6:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	lea	ecx, -48[rax]
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -28[rbp], 1
.L5:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	ja	.L6
	jmp	.L7
.L10:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	DWORD PTR -28[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, rdx
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	mov	edx, eax
	mov	eax, 1
	sub	eax, edx
	mov	ecx, eax
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -28[rbp], 1
.L8:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	ja	.L9
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rax
	add	rax, 1
	mov	QWORD PTR -24[rbp], rax
.L7:
	mov	rax, QWORD PTR -24[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jb	.L10
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L11
.L16:
	mov	DWORD PTR -28[rbp], 0
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	edx, BYTE PTR [rax]
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rcx, 1[rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	cmp	dl, al
	jne	.L13
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 1
	jmp	.L14
.L13:
	mov	eax, DWORD PTR -28[rbp]
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
.L14:
	add	DWORD PTR -28[rbp], 2
.L12:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	ja	.L15
	mov	rax, QWORD PTR -24[rbp]
	shr	rax
	mov	QWORD PTR -24[rbp], rax
.L11:
	mov	rax, QWORD PTR -24[rbp]
	and	eax, 1
	test	rax, rax
	je	.L16
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L17
.L18:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	add	eax, 48
	mov	edi, eax
	call	putchar@PLT
	add	DWORD PTR -28[rbp], 1
.L17:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	cmp	QWORD PTR -24[rbp], rax
	ja	.L18
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
.L3:
	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	"237644039.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage:\012\011Day16 <input data> <characters needed"
	.ascii	">\012\012\000"
	.align	2
.LC1:
	.ascii	"Error allocation memory: %s\012\012\000"
	.align	2
.LC2:
	.ascii	"Checksum: \000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #28
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r2, #48
	mov	r1, #1
	ldr	r0, .L19+4
	bl	fwrite
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L19
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L19+8
	mov	r0, r4
	bl	fprintf
	mov	r3, #1
	b	.L3
.L4:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L5
.L6:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-24]
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	sub	r2, r2, #48
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L5:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bhi	.L6
	b	.L7
.L10:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L8
.L9:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	sub	r3, r2, r3
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r1, [fp, #-24]
	ldr	r3, [fp, #-28]
	add	r3, r1, r3
	add	r3, r3, #1
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	rsb	r2, r2, #1
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bhi	.L9
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r3, #1
	str	r3, [fp, #-28]
.L7:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcc	.L10
	ldr	r3, [fp, #-20]
	str	r3, [fp, #-28]
	b	.L11
.L16:
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L12
.L15:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	ldr	r1, [fp, #-16]
	add	r3, r1, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r2, r3
	bne	.L13
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #1
	strb	r2, [r3]
	b	.L14
.L13:
	ldr	r3, [fp, #-24]
	lsr	r2, r3, #31
	add	r3, r2, r3
	asr	r3, r3, #1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
.L14:
	ldr	r3, [fp, #-24]
	add	r3, r3, #2
	str	r3, [fp, #-24]
.L12:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bhi	.L15
	ldr	r3, [fp, #-28]
	lsr	r3, r3, #1
	str	r3, [fp, #-28]
.L11:
	ldr	r3, [fp, #-28]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L16
	ldr	r0, .L19+12
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L17
.L18:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	add	r3, r3, #48
	mov	r0, r3
	bl	putchar
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L17:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-28]
	cmp	r2, r3
	bhi	.L18
	mov	r0, #10
	bl	putchar
	mov	r3, #0
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
