	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function convert_from_net
_convert_from_net:                      ## @convert_from_net
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_gotcr@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	xorl	%ebx, %ebx
	movq	_convbuffer@GOTPCREL(%rip), %r15
	movq	_file@GOTPCREL(%rip), %r13
	xorl	%edx, %edx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rax
	movb	%cl, (%rax,%rdx)
	incq	%rdx
	cmpb	$13, (%r12,%rbx)
	sete	%al
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%al, %eax
	movl	%eax, (%rsi)
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_15
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r12,%rbx), %ecx
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	%cl, %cl
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$10, %cl
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rax
	addq	%rdx, %rax
	decq	%rax
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	callq	_ftell
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	movq	_SEEK_END@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-1, %esi
	callq	_fseek
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	movq	(%r15), %rax
	movl	$1, %edx
	movq	_gotcr@GOTPCREL(%rip), %rsi
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movb	$10, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_1:
	xorl	%edx, %edx
LBB0_15:
	movq	_convbuffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_file@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fwrite                         ## TAILCALL
LBB0_10:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_tftp_log
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_gotcr,4,2                      ## @gotcr
	.comm	_convbuffer,8,3                 ## @convbuffer
	.comm	_file,4,2                       ## @file
	.comm	_SEEK_END,4,2                   ## @SEEK_END
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Received LF as first character"

	.no_dead_strip	_convert_from_net
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function convert_from_net
_convert_from_net:                      ; @convert_from_net
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x21, _convbuffer@GOTPAGE
Lloh1:
	ldr	x21, [x21, _convbuffer@GOTPAGEOFF]
Lloh2:
	adrp	x22, _file@GOTPAGE
Lloh3:
	ldr	x22, [x22, _file@GOTPAGEOFF]
	cbz	x1, LBB0_13
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x2, #0
Lloh4:
	adrp	x23, _gotcr@GOTPAGE
Lloh5:
	ldr	x23, [x23, _gotcr@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh6:
	adrp	x24, _SEEK_END@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SEEK_END@GOTPAGEOFF]
	mov	w25, #10
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	strb	w9, [x8, x2]
	add	x2, x2, #1
	ldrb	w8, [x20]
	cmp	w8, #13
	cset	w8, eq
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x23]
	add	x20, x20, #1
	subs	x19, x19, #1
	b.eq	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x20]
	cbz	w8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w9, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w9, #10
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x2, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x21]
	add	x8, x2, x8
	sub	x9, x8, #1
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	bl	_ftell
	cbz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	ldr	w2, [x24]
	mov	w1, #-1
	bl	_fseek
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	ldr	x9, [x21]
	mov	w2, #1
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w8, #0
	strb	w25, [x9]
	b	LBB0_3
LBB0_13:
	mov	x2, #0
LBB0_14:
	ldr	x0, [x21]
	ldr	w3, [x22]
	mov	w1, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_fwrite
LBB0_15:
Lloh8:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_tftp_log
	bl	_abort
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_gotcr,4,2                      ; @gotcr
	.comm	_convbuffer,8,3                 ; @convbuffer
	.comm	_file,4,2                       ; @file
	.comm	_SEEK_END,4,2                   ; @SEEK_END
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Received LF as first character"

	.no_dead_strip	_convert_from_net
.subsections_via_symbols
