	.file	"576755.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 8192
buf:
	.zero	8192
	.globl	cr
	.data
	.type	cr, @object
	.size	cr, 1
cr:
	.byte	13
	.globl	fdout
	.bss
	.align 4
	.type	fdout, @object
	.size	fdout, 4
fdout:
	.zero	4
	.globl	fdin
	.align 4
	.type	fdin, @object
	.size	fdin, 4
fdin:
	.zero	4
	.section	.rodata
.LC0:
	.string	"usage: send filname &"
.LC1:
	.string	"/tmp/.z80pack/cpmsim.auxin"
.LC2:
	.string	"pipe auxin"
	.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, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 2
	je	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fdin[rip], eax
	mov	eax, DWORD PTR fdin[rip]
	cmp	eax, -1
	jne	.L3
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	esi, 1
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR fdout[rip], eax
	mov	eax, DWORD PTR fdout[rip]
	cmp	eax, -1
	jne	.L5
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	edi, 8192
	call	sendbuf
.L5:
	mov	eax, DWORD PTR fdin[rip]
	mov	edx, 8192
	lea	rsi, buf[rip]
	mov	edi, eax
	call	read@PLT
	mov	ebx, eax
	cmp	ebx, 8192
	je	.L6
	test	ebx, ebx
	je	.L7
	mov	edi, ebx
	call	sendbuf
.L7:
	mov	eax, DWORD PTR fdin[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR fdout[rip]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.globl	sendbuf
	.type	sendbuf, @function
sendbuf:
.LFB7:
	.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, 24
	.cfi_offset 3, -24
	mov	DWORD PTR -20[rbp], edi
	lea	rbx, buf[rip]
	jmp	.L10
.L12:
	movzx	eax, BYTE PTR [rbx]
	cmp	al, 10
	jne	.L11
	mov	eax, DWORD PTR fdout[rip]
	mov	edx, 1
	lea	rsi, cr[rip]
	mov	edi, eax
	call	write@PLT
.L11:
	mov	rcx, rbx
	lea	rbx, 1[rcx]
	mov	eax, DWORD PTR fdout[rip]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L10:
	lea	rax, buf[rip]
	mov	rdx, rbx
	sub	rdx, rax
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	cmp	rdx, rax
	jl	.L12
	nop
	nop
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	sendbuf, .-sendbuf
	.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	"576755.c"
	.text
	.comm	buf,8192,4
	.global	cr
	.data
	.type	cr, %object
	.size	cr, 1
cr:
	.byte	13
	.comm	fdout,4,4
	.comm	fdin,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: send filname &\000"
	.align	2
.LC1:
	.ascii	"/tmp/.z80pack/cpmsim.auxin\000"
	.align	2
.LC2:
	.ascii	"pipe auxin\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #2
	beq	.L2
	ldr	r0, .L9
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r3, r0
	ldr	r2, .L9+4
	str	r3, [r2]
	ldr	r3, .L9+4
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L3
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #1
	ldr	r0, .L9+8
	bl	open
	mov	r3, r0
	ldr	r2, .L9+12
	str	r3, [r2]
	ldr	r3, .L9+12
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L9+16
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	mov	r0, #8192
	bl	sendbuf
.L5:
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r2, #8192
	ldr	r1, .L9+20
	mov	r0, r3
	bl	read
	mov	r4, r0
	cmp	r4, #8192
	beq	.L6
	cmp	r4, #0
	beq	.L7
	mov	r0, r4
	bl	sendbuf
.L7:
	ldr	r3, .L9+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L9+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	fdin
	.word	.LC1
	.word	fdout
	.word	.LC2
	.word	buf
	.size	main, .-main
	.align	2
	.global	sendbuf
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendbuf, %function
sendbuf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #12
	str	r0, [fp, #-16]
	ldr	r4, .L15
	b	.L12
.L14:
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L13
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #1
	ldr	r1, .L15+8
	mov	r0, r3
	bl	write
.L13:
	ldr	r3, .L15+4
	ldr	r0, [r3]
	mov	r3, r4
	add	r4, r3, #1
	mov	r2, #1
	mov	r1, r3
	bl	write
.L12:
	ldr	r3, .L15
	sub	r3, r4, r3
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bgt	.L14
	nop
	nop
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L16:
	.align	2
.L15:
	.word	buf
	.word	fdout
	.word	cr
	.size	sendbuf, .-sendbuf
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
