	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function send_to_fd
_send_to_fd:                            ## @send_to_fd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	jle	LBB0_10
## %bb.1:
	movq	%rdx, %r15
	movl	%esi, %ebx
	movl	%edi, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_write
	testl	%eax, %eax
	jle	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	addq	%rcx, %r15
	subl	%eax, %ebx
	jg	LBB0_2
	jmp	LBB0_10
LBB0_3:
	leaq	-32(%rbp), %rsi
	leaq	-28(%rbp), %rdx
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	callq	_find_unit_by_fd
	movq	_units@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	-32(%rbp), %rdi
	movq	(%rax,%rdi,8), %rax
	movslq	-28(%rbp), %rsi
	cmpl	%r14d, (%rax,%rsi,8)
	jne	LBB0_5
## %bb.4:
	movq	_LIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	cmpl	%r14d, 4(%rax,%rsi,8)
	jne	LBB0_8
## %bb.6:
	movq	_FIND@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edx
                                        ## kill: def $edi killed $edi killed $rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_close_with_IOP
LBB0_8:
	movl	-32(%rbp), %edi
	movl	-28(%rbp), %esi
	callq	_empty_unit
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_units,8,3                      ## @units
	.comm	_LIVE,4,2                       ## @LIVE
	.comm	_FIND,4,2                       ## @FIND
	.no_dead_strip	_send_to_fd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function send_to_fd
_send_to_fd:                            ; @send_to_fd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_write
	cmp	w0, #0
	b.le	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w21, w21, w0
	add	x20, x20, w0, uxtw
	cmp	w21, #0
	b.gt	LBB0_2
	b	LBB0_10
LBB0_4:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, #0
	bl	_find_unit_by_fd
Lloh0:
	adrp	x8, _units@GOTPAGE
Lloh1:
	ldr	x8, [x8, _units@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldpsw	x1, x0, [sp, #8]
	ldr	x8, [x8, x0, lsl #3]
	lsl	x9, x1, #3
	ldr	w9, [x8, x9]
	cmp	w9, w19
	b.ne	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _LIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LIVE@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	add	x8, x8, x1, lsl #3
	ldr	w8, [x8, #4]
	cmp	w8, w19
	b.ne	LBB0_9
; %bb.7:
Lloh5:
	adrp	x8, _FIND@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FIND@GOTPAGEOFF]
LBB0_8:
	ldr	w2, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_close_with_IOP
LBB0_9:
	ldp	w1, w0, [sp, #8]
	bl	_empty_unit
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_units,8,3                      ; @units
	.comm	_LIVE,4,2                       ; @LIVE
	.comm	_FIND,4,2                       ; @FIND
	.no_dead_strip	_send_to_fd
.subsections_via_symbols
