	.file	"392731.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Enter char to check: "
.LC1:
	.string	"done"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 20
	call	print_header
	lea	rax, -32[rbp]
	mov	esi, 21
	mov	rdi, rax
	call	mygets
	test	rax, rax
	je	.L2
	jmp	.L3
.L4:
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	is_within
	mov	edx, eax
	mov	eax, DWORD PTR -36[rbp]
	movsx	eax, al
	mov	esi, edx
	mov	edi, eax
	call	print_result
.L3:
	lea	rdi, .LC0[rip]
	call	getnextch
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 10
	jne	.L4
.L2:
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.globl	getnextch
	.type	getnextch, @function
getnextch:
.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	QWORD PTR -24[rbp], rdi
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	call	getchar@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L8
	mov	DWORD PTR -4[rbp], 10
	jmp	.L9
.L8:
	cmp	DWORD PTR -4[rbp], 10
	je	.L9
	jmp	.L10
.L11:
	nop
.L10:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L11
.L9:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	getnextch, .-getnextch
	.globl	is_within
	.type	is_within, @function
is_within:
.LFB2:
	.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
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
.L17:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	cmp	DWORD PTR -20[rbp], eax
	jne	.L14
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 1
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L16
	mov	eax, 0
	jmp	.L15
.L16:
	add	DWORD PTR -4[rbp], 1
	jmp	.L17
.L15:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	is_within, .-is_within
	.globl	mygets
	.type	mygets, @function
mygets:
.LFB3:
	.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	DWORD PTR -28[rbp], esi
	mov	QWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	jmp	.L19
.L21:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -16[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -12[rbp], 1
.L19:
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, 1
	cmp	DWORD PTR -12[rbp], eax
	jge	.L20
	call	getchar@PLT
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], -1
	je	.L20
	cmp	DWORD PTR -16[rbp], 10
	je	.L20
	cmp	DWORD PTR -16[rbp], 0
	jne	.L21
.L20:
	cmp	DWORD PTR -16[rbp], 10
	jne	.L22
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	jmp	.L23
.L22:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	cmp	DWORD PTR -16[rbp], -1
	je	.L23
	jmp	.L24
.L25:
	nop
.L24:
	call	getchar@PLT
	cmp	eax, 10
	jne	.L25
.L23:
	cmp	DWORD PTR -12[rbp], 0
	jle	.L26
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
.L26:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	mygets, .-mygets
	.section	.rodata
	.align 8
.LC2:
	.string	"*** Test the is_within() function ***"
	.align 8
.LC3:
	.string	"Enter the string up to %d characters. "
.LC4:
	.string	"(Return to quit):"
	.text
	.globl	print_header
	.type	print_header, @function
print_header:
.LFB4:
	.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	DWORD PTR -4[rbp], edi
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	print_header, .-print_header
	.section	.rodata
	.align 8
.LC5:
	.string	"'%c' is on position %d in the string.\n"
.LC6:
	.string	"'%c' is not in the string.\n"
	.text
	.globl	print_result
	.type	print_result, @function
print_result:
.LFB5:
	.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	eax, edi
	mov	DWORD PTR -8[rbp], esi
	mov	BYTE PTR -4[rbp], al
	cmp	DWORD PTR -8[rbp], 0
	je	.L30
	movsx	eax, BYTE PTR -4[rbp]
	mov	edx, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L32
.L30:
	movsx	eax, BYTE PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L32:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	print_result, .-print_result
	.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	"392731.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Enter char to check: \000"
	.align	2
.LC1:
	.ascii	"done\000"
	.align	2
.LC2:
	.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, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #36
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r0, #20
	bl	print_header
	sub	r3, fp, #40
	mov	r1, #21
	mov	r0, r3
	bl	mygets
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	b	.L3
.L4:
	ldr	r3, [fp, #-44]
	and	r4, r3, #255
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	is_within
	mov	r3, r0
	mov	r1, r3
	mov	r0, r4
	bl	print_result
.L3:
	ldr	r0, .L7+4
	bl	getnextch
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #10
	bne	.L4
.L2:
	ldr	r0, .L7+8
	bl	puts
	mov	r3, #0
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.align	2
	.global	getnextch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getnextch, %function
getnextch:
	@ 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	r3, .L15
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-16]
	bl	fputs
	bl	getchar
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L10
	mov	r3, #10
	str	r3, [fp, #-8]
	b	.L11
.L10:
	ldr	r3, [fp, #-8]
	cmp	r3, #10
	beq	.L11
	b	.L12
.L13:
	nop
.L12:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L13
.L11:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	stdout
	.size	getnextch, .-getnextch
	.align	2
	.global	is_within
	.syntax unified
	.arm
	.fpu softvfp
	.type	is_within, %function
is_within:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
.L21:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-16]
	cmp	r3, r2
	bne	.L18
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	b	.L19
.L18:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L20
	mov	r3, #0
	b	.L19
.L20:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
	b	.L21
.L19:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	is_within, .-is_within
	.align	2
	.global	mygets
	.syntax unified
	.arm
	.fpu softvfp
	.type	mygets, %function
mygets:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L23
.L25:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-12]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L23:
	ldr	r3, [fp, #-28]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bge	.L24
	bl	getchar
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L24
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	beq	.L24
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L25
.L24:
	ldr	r3, [fp, #-12]
	cmp	r3, #10
	bne	.L26
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	b	.L27
.L26:
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L27
	b	.L28
.L29:
	nop
.L28:
	bl	getchar
	mov	r3, r0
	cmp	r3, #10
	bne	.L29
.L27:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	ble	.L30
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-16]
.L30:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	mygets, .-mygets
	.section	.rodata
	.align	2
.LC3:
	.ascii	"*** Test the is_within() function ***\000"
	.align	2
.LC4:
	.ascii	"Enter the string up to %d characters. \000"
	.align	2
.LC5:
	.ascii	"(Return to quit):\000"
	.text
	.align	2
	.global	print_header
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_header, %function
print_header:
	@ 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]
	ldr	r0, .L33
	bl	puts
	ldr	r1, [fp, #-8]
	ldr	r0, .L33+4
	bl	printf
	ldr	r0, .L33+8
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	print_header, .-print_header
	.section	.rodata
	.align	2
.LC6:
	.ascii	"'%c' is on position %d in the string.\012\000"
	.align	2
.LC7:
	.ascii	"'%c' is not in the string.\012\000"
	.text
	.align	2
	.global	print_result
	.syntax unified
	.arm
	.fpu softvfp
	.type	print_result, %function
print_result:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r3, r0
	str	r1, [fp, #-12]
	strb	r3, [fp, #-5]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L36
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	ldr	r2, [fp, #-12]
	mov	r1, r3
	ldr	r0, .L39
	bl	printf
	b	.L38
.L36:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L39+4
	bl	printf
.L38:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L40:
	.align	2
.L39:
	.word	.LC6
	.word	.LC7
	.size	print_result, .-print_result
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
