	.file	"753482.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"The title array takes up %ld bytes of memory.\n\n"
.LC1:
	.string	"Title of DVD #%d: "
	.align 8
.LC2:
	.string	"*** ERROR reported by fgets ***"
.LC3:
	.string	"----\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 1024
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	jns	.L2
	mov	eax, -1
	jmp	.L12
.L2:
	mov	WORD PTR -1054[rbp], 0
	jmp	.L4
.L7:
	movsx	eax, WORD PTR -1054[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	jns	.L5
	mov	eax, -1
	jmp	.L12
.L5:
	mov	rax, QWORD PTR stdin[rip]
	movsx	edx, WORD PTR -1054[rbp]
	lea	rcx, -1040[rbp]
	movsx	rdx, edx
	sal	rdx, 8
	add	rcx, rdx
	mov	rdx, rax
	mov	esi, 256
	mov	rdi, rcx
	call	fgets@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L6
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1052[rbp], eax
	mov	eax, -2
	jmp	.L12
.L6:
	movsx	eax, WORD PTR -1054[rbp]
	lea	rdx, -1040[rbp]
	cdqe
	sal	rax, 8
	add	rax, rdx
	mov	rdi, rax
	call	ReplaceReturnAtEndOfString
	movzx	eax, WORD PTR -1054[rbp]
	add	eax, 1
	mov	WORD PTR -1054[rbp], ax
.L4:
	cmp	WORD PTR -1054[rbp], 3
	jle	.L7
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	jns	.L8
	mov	eax, -1
	jmp	.L12
.L8:
	mov	WORD PTR -1054[rbp], 0
	jmp	.L9
.L11:
	movsx	eax, WORD PTR -1054[rbp]
	lea	rdx, -1040[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	PrintDVDTitle
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	je	.L10
	mov	eax, DWORD PTR -1052[rbp]
	jmp	.L12
.L10:
	movzx	eax, WORD PTR -1054[rbp]
	add	eax, 1
	mov	WORD PTR -1054[rbp], ax
.L9:
	cmp	WORD PTR -1054[rbp], 3
	jle	.L11
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC4:
	.string	"Title of DVD #%d: %s\n"
	.text
	.globl	PrintDVDTitle
	.type	PrintDVDTitle, @function
PrintDVDTitle:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	sal	rax, 8
	mov	rdx, rax
	mov	rax, QWORD PTR -32[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L15
	mov	eax, -1
	jmp	.L16
.L15:
	mov	eax, 0
.L16:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	PrintDVDTitle, .-PrintDVDTitle
	.globl	ReplaceReturnAtEndOfString
	.type	ReplaceReturnAtEndOfString, @function
ReplaceReturnAtEndOfString:
.LFB2:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	ReplaceReturnAtEndOfString, .-ReplaceReturnAtEndOfString
	.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	"753482.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"The title array takes up %ld bytes of memory.\012\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"Title of DVD #%d: \000"
	.align	2
.LC2:
	.ascii	"*** ERROR reported by fgets ***\000"
	.align	2
.LC3:
	.ascii	"----\012\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 = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r1, #1024
	ldr	r0, .L14+4
	bl	printf
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L2
	mvn	r3, #0
	b	.L12
.L2:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	b	.L4
.L7:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L14+8
	bl	printf
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L5
	mvn	r3, #0
	b	.L12
.L5:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #8
	add	r3, r3, r2
	ldr	r2, .L14+12
	ldr	r2, [r2]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L14+16
	bl	printf
	str	r0, [fp, #-1040]
	mvn	r3, #1
	b	.L12
.L6:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	lsl	r2, r2, #8
	add	r3, r3, r2
	mov	r0, r3
	bl	ReplaceReturnAtEndOfString
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	strh	r2, [r3]	@ movhi
.L4:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	cmp	r3, #3
	ble	.L7
	ldr	r0, .L14+20
	bl	printf
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bge	.L8
	mvn	r3, #0
	b	.L12
.L8:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	mov	r2, #0
	strh	r2, [r3]	@ movhi
	b	.L9
.L11:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	PrintDVDTitle
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-1040]
	b	.L12
.L10:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r3, #1
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	strh	r2, [r3]	@ movhi
.L9:
	sub	r3, fp, #4
	sub	r3, r3, #1024
	sub	r3, r3, #14
	ldrsh	r3, [r3]
	cmp	r3, #3
	ble	.L11
	mov	r3, #0
.L12:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	stdin
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Title of DVD #%d: %s\012\000"
	.text
	.align	2
	.global	PrintDVDTitle
	.syntax unified
	.arm
	.fpu softvfp
	.type	PrintDVDTitle, %function
PrintDVDTitle:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	add	r1, r3, #1
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #8
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, r3
	ldr	r0, .L19
	bl	printf
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L17
	mvn	r3, #0
	b	.L18
.L17:
	mov	r3, #0
.L18:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC5
	.size	PrintDVDTitle, .-PrintDVDTitle
	.align	2
	.global	ReplaceReturnAtEndOfString
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReplaceReturnAtEndOfString, %function
ReplaceReturnAtEndOfString:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ReplaceReturnAtEndOfString, .-ReplaceReturnAtEndOfString
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
