	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tftp_netascii_getc
_tftp_netascii_getc:                    ## @tftp_netascii_getc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rcx
	movl	(%rcx), %eax
	cmpl	$255, %eax
	jne	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	8(%rcx), %rdx
	movq	16(%rcx), %rax
	cmpq	%rax, %rdx
	jl	LBB0_8
## %bb.3:
	movl	16(%rbx), %edi
	movq	24(%rcx), %rsi
	movq	_TFTP_IOBUFF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_read
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	addl	%eax, 8(%rbx)
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx)
	movq	$0, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	xorl	%edx, %edx
LBB0_8:
	xorl	%edi, %edi
	cmpq	%rax, %rdx
	setl	%dil
	callq	_assert
	movq	(%rbx), %rcx
	movq	8(%rcx), %rax
	movq	24(%rcx), %rdx
	leaq	1(%rax), %rsi
	movq	%rsi, 8(%rcx)
	movzbl	(%rdx,%rax), %eax
	cmpl	$13, %eax
	je	LBB0_11
## %bb.9:
	cmpb	$10, %al
	jne	LBB0_13
## %bb.10:
	movl	$10, (%rcx)
	jmp	LBB0_12
LBB0_1:
	movl	$255, (%rcx)
	movzbl	%al, %eax
	jmp	LBB0_13
LBB0_11:
	movl	$0, (%rcx)
LBB0_12:
	movl	$13, %eax
	jmp	LBB0_13
LBB0_4:
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_vkprintf
	movl	$-2, %eax
	jmp	LBB0_13
LBB0_6:
	movl	$-1, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TFTP_IOBUFF_SIZE,4,2           ## @TFTP_IOBUFF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Fail to read file '%s' from offset %lld. %m\n"

	.no_dead_strip	_tftp_netascii_getc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tftp_netascii_getc
_tftp_netascii_getc:                    ; @tftp_netascii_getc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x9, [x0]
	ldr	w8, [x9]
	cmp	w8, #255
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x0
	ldp	x8, x0, [x9, #8]
	cmp	x8, x0
	b.lt	LBB0_4
; %bb.2:
	ldr	w0, [x19, #16]
	ldr	x1, [x9, #24]
Lloh0:
	adrp	x8, _TFTP_IOBUFF_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TFTP_IOBUFF_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_read
	tbnz	x0, #63, LBB0_10
; %bb.3:
	mov	x8, #0
	ldr	w9, [x19, #8]
	add	w9, w9, w0
	str	w9, [x19, #8]
	ldr	x9, [x19]
	stp	xzr, x0, [x9, #8]
	cbz	x0, LBB0_11
LBB0_4:
	cmp	x8, x0
	cset	w0, lt
	bl	_assert
	ldr	x8, [x19]
	ldr	x9, [x8, #24]
	ldr	x10, [x8, #8]
	add	x11, x10, #1
	str	x11, [x8, #8]
	ldrb	w0, [x9, x10]
	cmp	w0, #13
	b.eq	LBB0_9
; %bb.5:
	cmp	w0, #10
	b.ne	LBB0_8
; %bb.6:
	mov	w9, #10
	str	w9, [x8]
	mov	w0, #13
	b	LBB0_8
LBB0_7:
	mov	w10, #255
	str	w10, [x9]
	and	w0, w8, #0xff
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	str	wzr, [x8]
	b	LBB0_8
LBB0_10:
	ldp	w3, w2, [x19, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_vkprintf
	mov	w0, #-2
	b	LBB0_8
LBB0_11:
	mov	w0, #-1
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_TFTP_IOBUFF_SIZE,4,2           ; @TFTP_IOBUFF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Fail to read file '%s' from offset %lld. %m\n"

	.no_dead_strip	_tftp_netascii_getc
.subsections_via_symbols
