	.file	"785549.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Arg[%d]"
	.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
	push	rbx
	sub	rsp, 312
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -308[rbp], 0
	jmp	.L2
.L4:
	mov	eax, DWORD PTR -308[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -128[rbp]
	mov	esi, 100
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	je	.L3
	movzx	eax, BYTE PTR -128[rbp]
	cmp	al, 10
	je	.L3
	mov	ebx, DWORD PTR -308[rbp]
	lea	eax, 1[rbx]
	mov	DWORD PTR -308[rbp], eax
	lea	rax, -128[rbp]
	mov	rdi, rax
	call	makestring
	movsx	rdx, ebx
	mov	QWORD PTR -304[rbp+rdx*8], rax
	jmp	.L2
.L3:
	cmp	DWORD PTR -308[rbp], 0
	jle	.L2
	mov	eax, DWORD PTR -308[rbp]
	cdqe
	mov	QWORD PTR -304[rbp+rax*8], 0
	lea	rax, -304[rbp]
	mov	rdi, rax
	call	execute
	mov	DWORD PTR -308[rbp], 0
.L2:
	cmp	DWORD PTR -308[rbp], 19
	jle	.L4
	mov	eax, 0
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC1:
	.string	"fork failed!"
.LC2:
	.string	"execvp failed"
	.align 8
.LC3:
	.string	"child exited with status %d, %d\n"
	.text
	.globl	execute
	.type	execute, @function
execute:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	fork@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], -1
	je	.L8
	cmp	DWORD PTR -12[rbp], 0
	je	.L9
	jmp	.L12
.L8:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execvp@PLT
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	lea	rax, -16[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	wait@PLT
	mov	eax, DWORD PTR -16[rbp]
	movzx	eax, al
	mov	edx, DWORD PTR -16[rbp]
	mov	ecx, edx
	sar	ecx, 8
	mov	edx, eax
	mov	esi, ecx
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L11
	call	__stack_chk_fail@PLT
.L11:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	execute, .-execute
	.section	.rodata
.LC4:
	.string	"no memory\n"
	.text
	.globl	makestring
	.type	makestring, @function
makestring:
.LFB8:
	.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	QWORD PTR -8[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 10
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	makestring, .-makestring
	.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	"785549.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Arg[%d]\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #196
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L2
.L4:
	ldr	r1, [fp, #-204]
	ldr	r0, .L7+4
	bl	printf
	ldr	r3, .L7+8
	ldr	r2, [r3]
	sub	r3, fp, #116
	mov	r1, #100
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldrb	r3, [fp, #-116]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L3
	ldr	r4, [fp, #-204]
	add	r3, r4, #1
	str	r3, [fp, #-204]
	sub	r3, fp, #116
	mov	r0, r3
	bl	makestring
	mov	r2, r0
	lsl	r3, r4, #2
	sub	r1, fp, #12
	add	r3, r1, r3
	str	r2, [r3, #-188]
	b	.L2
.L3:
	ldr	r3, [fp, #-204]
	cmp	r3, #0
	ble	.L2
	ldr	r3, [fp, #-204]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-188]
	sub	r3, fp, #200
	mov	r0, r3
	bl	execute
	mov	r3, #0
	str	r3, [fp, #-204]
.L2:
	ldr	r3, [fp, #-204]
	cmp	r3, #19
	ble	.L4
	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	.LC1
	.word	.LC0
	.word	stdin
	.size	main, .-main
	.section	.rodata
	.align	2
.LC2:
	.ascii	"fork failed!\000"
	.align	2
.LC3:
	.ascii	"execvp failed\000"
	.align	2
.LC4:
	.ascii	"child exited with status %d, %d\012\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	execute
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute, %function
execute:
	@ 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]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	beq	.L10
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L11
	b	.L14
.L10:
	ldr	r0, .L15+4
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	ldr	r1, [fp, #-24]
	mov	r0, r3
	bl	execvp
	ldr	r0, .L15+8
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	sub	r3, fp, #16
	mov	r0, r3
	bl	wait
	ldr	r3, [fp, #-16]
	asr	r1, r3, #8
	ldr	r3, [fp, #-16]
	and	r3, r3, #255
	mov	r2, r3
	ldr	r0, .L15+12
	bl	printf
	nop
	ldr	r3, .L15
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC5
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	execute, .-execute
	.section	.rodata
	.align	2
.LC6:
	.ascii	"no memory\012\000"
	.text
	.align	2
	.global	makestring
	.syntax unified
	.arm
	.fpu softvfp
	.type	makestring, %function
makestring:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-16]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L20
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #1
	ldr	r0, .L20+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L18:
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-8]
	bl	strcpy
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	stderr
	.word	.LC6
	.size	makestring, .-makestring
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
