	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function choose_writable_server
_choose_writable_server:                ## @choose_writable_server
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movb	$1, %dl
	movq	_server_fds_tmp@GOTPCREL(%rip), %r15
	movq	_POLLOUT@GOTPCREL(%rip), %r11
	movq	_rpc_status_connected@GOTPCREL(%rip), %r14
	xorl	%ecx, %ecx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edx, %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movq	_POLLOUT@GOTPCREL(%rip), %r11
	movq	_rpc_status_connected@GOTPCREL(%rip), %r14
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jne	LBB0_29
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##       Child Loop BB0_20 Depth 3
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %dl
	je	LBB0_28
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_28
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %r10
	movq	_server_fds@GOTPCREL(%rip), %rdx
	movq	(%rdx), %r9
	movq	(%r15), %r8
	xorl	%edi, %edi
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=2
	incq	%rdi
	cmpq	%rdi, %rax
	je	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r10,%rdi,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	(%rsi), %rdx
	cmpq	(%r14), %rdx
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	8(%rsi), %edx
	movslq	%r12d, %r12
	leaq	(%r12,%r12,2), %rsi
	movl	%edx, 8(%r9,%rsi,4)
	movq	_POLLERR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%r11), %edx
	movq	_POLLHUP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_POLLNVAL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_POLLRDHUP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, (%r9,%rsi,4)
	movq	%rdi, (%r8,%r12,8)
	incl	%r12d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	je	LBB0_28
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movsd	-64(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	callq	_get_ms_timeout
	movl	%eax, %r13d
	movq	_poll@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_ADD_CNT
	movq	%r14, %rdi
	callq	_START_TIMER
	movq	_server_fds@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r12d, %esi
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	%r13d, %edx
	callq	_poll
	movl	%eax, %r13d
	movq	%r14, %rdi
	callq	_END_TIMER
	testl	%r13d, %r13d
	js	LBB0_27
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	je	LBB0_28
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_1
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %r13d
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_18 Depth=2
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rax,%rcx,8), %rdi
	callq	_rpc_server_failure
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=2
	incq	%r12
	cmpq	%r13, %r12
	je	LBB0_2
LBB0_18:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_20 Depth 3
	movq	_server_fds@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%r12,%r12,2), %rcx
	movq	_POLLHUP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_POLLERR@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movq	_POLLNVAL@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	4(%rax,%rcx,4), %eax
	movq	_POLLRDHUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, %edx
	testl	%eax, %edx
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=2
	testl	%eax, %ecx
	je	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_18 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rax,%rcx,8), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_rpc_work
	testq	%rax, %rax
	jg	LBB0_20
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_18 Depth=2
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_17
## %bb.22:                              ##   in Loop: Header=BB0_18 Depth=2
	xorl	%eax, %eax
	callq	_lrand48
	incl	%r14d
	cltd
	idivl	%r14d
	testl	%edx, %edx
	jne	LBB0_17
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=2
	movq	8(%rbx), %rax
	movq	(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
LBB0_27:
	movq	_errno@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_strerror
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_rpc_global_seterror
LBB0_28:
	xorl	%eax, %eax
LBB0_29:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rpc_status_connected,8,3       ## @rpc_status_connected
	.comm	_server_fds,8,3                 ## @server_fds
	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_POLLHUP,4,2                    ## @POLLHUP
	.comm	_POLLNVAL,4,2                   ## @POLLNVAL
	.comm	_POLLRDHUP,4,2                  ## @POLLRDHUP
	.comm	_server_fds_tmp,8,3             ## @server_fds_tmp
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_choose_writable_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function choose_writable_server
_choose_writable_server:                ; @choose_writable_server
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	fmov	d8, d0
	mov	x19, x0
	mov	w9, #0
	mov	w8, #1
Lloh0:
	adrp	x25, _server_fds_tmp@GOTPAGE
Lloh1:
	ldr	x25, [x25, _server_fds_tmp@GOTPAGEOFF]
Lloh2:
	adrp	x27, _POLLERR@GOTPAGE
Lloh3:
	ldr	x27, [x27, _POLLERR@GOTPAGEOFF]
Lloh4:
	adrp	x28, _POLLHUP@GOTPAGE
Lloh5:
	ldr	x28, [x28, _POLLHUP@GOTPAGEOFF]
Lloh6:
	adrp	x20, _POLLNVAL@GOTPAGE
Lloh7:
	ldr	x20, [x20, _POLLNVAL@GOTPAGEOFF]
Lloh8:
	adrp	x21, _POLLRDHUP@GOTPAGE
Lloh9:
	ldr	x21, [x21, _POLLRDHUP@GOTPAGEOFF]
Lloh10:
	adrp	x26, _POLLOUT@GOTPAGE
Lloh11:
	ldr	x26, [x26, _POLLOUT@GOTPAGEOFF]
Lloh12:
	adrp	x16, _rpc_status_connected@GOTPAGE
Lloh13:
	ldr	x16, [x16, _rpc_status_connected@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [sp, #8]                   ; 8-byte Folded Spill
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w8, #0
Lloh14:
	adrp	x16, _rpc_status_connected@GOTPAGE
Lloh15:
	ldr	x16, [x16, _rpc_status_connected@GOTPAGEOFF]
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	x0, LBB0_26
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_18 Depth 2
                                        ;       Child Loop BB0_20 Depth 3
	cbnz	w9, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	tbz	w8, #0, LBB0_25
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x9, #0
	mov	w23, #0
	ldr	x10, [x19, #8]
Lloh16:
	adrp	x11, _server_fds@GOTPAGE
Lloh17:
	ldr	x11, [x11, _server_fds@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
	ldr	x12, [x25]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x9, x9, #1
	cmp	x8, x9
	b.eq	LBB0_11
LBB0_8:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x10, x9, lsl #3]
	cbz	x13, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x14, [x13]
	ldr	x15, [x16]
	cmp	x14, x15
	b.ne	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w13, [x13, #8]
	mov	w14, #12
	smaddl	x14, w23, w14, x11
	str	w13, [x14, #8]
	ldr	w13, [x26]
	ldr	w15, [x27]
	orr	w13, w15, w13
	ldr	w15, [x28]
	orr	w13, w13, w15
	ldr	w15, [x20]
	orr	w13, w13, w15
	ldr	w15, [x21]
	orr	w13, w13, w15
	str	w13, [x14]
	str	x9, [x12, w23, sxtw #3]
	add	w23, w23, #1
	b	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	w23, LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	fmov	d0, d8
	bl	_get_ms_timeout
	mov	x22, x0
Lloh19:
	adrp	x24, _poll@GOTPAGE
Lloh20:
	ldr	x24, [x24, _poll@GOTPAGEOFF]
	mov	x0, x24
	bl	_ADD_CNT
	mov	x0, x24
	bl	_START_TIMER
Lloh21:
	adrp	x8, _server_fds@GOTPAGE
Lloh22:
	ldr	x8, [x8, _server_fds@GOTPAGEOFF]
Lloh23:
	ldr	x0, [x8]
	mov	x1, x23
	str	w22, [sp, #4]                   ; 4-byte Folded Spill
	mov	x2, x22
	bl	_poll
	mov	x22, x0
	mov	x0, x24
	bl	_END_TIMER
	tbnz	w22, #31, LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_3 Depth=1
	cbz	w22, LBB0_25
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w23, #1
	b.lt	LBB0_1
; %bb.15:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
	str	xzr, [sp, #8]                   ; 8-byte Folded Spill
	mov	w24, #0
	mov	w23, w23
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	ldr	x9, [x9, x22, lsl #3]
	ldr	x0, [x8, x9, lsl #3]
	bl	_rpc_server_failure
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	add	x22, x22, #1
	cmp	x22, x23
	b.eq	LBB0_2
LBB0_18:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_20 Depth 3
Lloh24:
	adrp	x8, _server_fds@GOTPAGE
Lloh25:
	ldr	x8, [x8, _server_fds@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	mov	w9, #12
	madd	x8, x22, x9, x8
	ldr	w8, [x8, #4]
	ldr	w9, [x27]
	ldr	w10, [x28]
	orr	w9, w10, w9
	ldr	w10, [x20]
	orr	w10, w9, w10
	ldr	w9, [x21]
	orr	w10, w10, w9
	tst	w10, w8
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	tst	w9, w8
	b.eq	LBB0_16
LBB0_20:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_18 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	ldr	x9, [x9, x22, lsl #3]
	ldr	x0, [x8, x9, lsl #3]
	mov	w1, #0
	mov	w2, #0
	bl	_rpc_work
	cmp	x0, #0
	b.gt	LBB0_20
	b	LBB0_16
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=2
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=2
	bl	_lrand48
	add	w24, w24, #1
	sdiv	w8, w0, w24
	msub	w8, w8, w24, w0
	cbnz	w8, LBB0_17
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	ldr	x9, [x9, x22, lsl #3]
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	b	LBB0_17
LBB0_24:
Lloh27:
	adrp	x19, _errno@GOTPAGE
Lloh28:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_strerror
	ldr	w1, [x19]
	bl	_rpc_global_seterror
LBB0_25:
	mov	x0, #0
LBB0_26:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_rpc_status_connected,8,3       ; @rpc_status_connected
	.comm	_server_fds,8,3                 ; @server_fds
	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_POLLHUP,4,2                    ; @POLLHUP
	.comm	_POLLNVAL,4,2                   ; @POLLNVAL
	.comm	_POLLRDHUP,4,2                  ; @POLLRDHUP
	.comm	_server_fds_tmp,8,3             ; @server_fds_tmp
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_choose_writable_server
.subsections_via_symbols
