	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_frame
_write_frame:                           ## @write_frame
	.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	%rdx, %rdx
	je	LBB0_11
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movl	%edi, %r15d
	leal	1(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_FD_ZERO
	movl	%r15d, %edi
	movq	%r13, %rsi
	callq	_FD_SET
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_select
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %r12d
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_write
	testl	%eax, %eax
	js	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %eax
	addq	%rax, %rbx
	subq	%rax, %r14
	jne	LBB0_2
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movl	%r12d, %edx
	callq	_errx
	movl	$1, %edi
	callq	_exit
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
LBB0_9:
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"select failed"

L_.str.1:                               ## @.str.1
	.asciz	"select returned unexpected value %d\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
L_.str.2:                               ## @.str.2
	.asciz	"write failed"

	.no_dead_strip	_write_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_frame
_write_frame:                           ; @write_frame
	.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
	cbz	x2, LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	w22, w0, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #12
	bl	_FD_ZERO
	add	x1, sp, #12
	mov	x0, x21
	bl	_FD_SET
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, #0
	mov	x3, #0
	mov	x4, #0
	bl	_select
	mov	x2, x0
	tbnz	w0, #31, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w2, #1
	b.ne	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_write
	tbnz	w0, #31, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w8, w0
	add	x20, x20, x8
	subs	x19, x19, x8
	b.ne	LBB0_2
LBB0_6:
	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
LBB0_7:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x19, x2
	bl	_err
	mov	x2, x19
LBB0_8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
	mov	w0, #1
	bl	_exit
LBB0_9:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
Lloh7:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
LBB0_11:
	mov	w0, #1
	bl	_exit
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"select failed"

l_.str.1:                               ; @.str.1
	.asciz	"select returned unexpected value %d\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
l_.str.2:                               ; @.str.2
	.asciz	"write failed"

	.no_dead_strip	_write_frame
.subsections_via_symbols
