	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_target_choose_connection   ## -- Begin function rpc_target_choose_connection
	.p2align	4, 0x90
_rpc_target_choose_connection:          ## @rpc_target_choose_connection
	.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
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	$10000, %r13d                   ## imm = 0x2710
	testq	%rax, %rax
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_16
## %bb.2:
	movq	(%rax), %r12
	cmpq	%rax, %r12
	je	LBB0_16
## %bb.3:
	movl	$10000, %r15d                   ## imm = 0x2710
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%r15d, %r13d
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%r12), %r12
	movl	%r13d, %r15d
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpq	8(%rbx), %r12
	je	LBB0_17
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_server_check_ready
	movq	_cr_ok@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_32
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_RPCS_DATA
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_matches_pid
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%r15d, %r13d
	testl	%eax, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_5
	jmp	LBB0_32
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_cr_stopped@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %r13d
	movq	%r12, %r14
	cmpl	%r15d, %r13d
	cmovgeq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	cmovgel	%r15d, %r13d
	jge	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_5
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r12, %rdi
	callq	_RPCS_DATA
	movq	%rax, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_matches_pid
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%r15d, %r13d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r12), %r13d
	movq	%r12, %r14
	jmp	LBB0_5
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	movq	%rbx, %rax
	movq	(%rbx), %rbx
	cmpq	%rax, %rbx
	je	LBB0_29
## %bb.18:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	%r14, %r12
	movl	%r13d, %ecx
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	8(%rbx), %rbx
	movl	%ecx, %r13d
	movq	%r12, %r14
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	je	LBB0_32
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_server_check_ready
	movq	_cr_ok@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	testq	%r15, %r15
	je	LBB0_31
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%rbx, %rdi
	callq	_RPCS_DATA
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_matches_pid
	movq	%r14, %r12
	movl	%r13d, %ecx
	testl	%eax, %eax
	jle	LBB0_20
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movq	_cr_stopped@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_19
## %bb.25:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	(%rbx), %ecx
	movq	%rbx, %r12
	cmpl	%r13d, %ecx
	cmovgeq	%r14, %r12
	cmovgel	%r13d, %ecx
	jge	LBB0_20
## %bb.26:                              ##   in Loop: Header=BB0_21 Depth=1
	testq	%r15, %r15
	je	LBB0_20
## %bb.27:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%rbx, %rdi
	callq	_RPCS_DATA
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_matches_pid
	movq	%r14, %r12
	movl	%r13d, %ecx
	testl	%eax, %eax
	jle	LBB0_20
## %bb.28:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	(%rbx), %ecx
	movq	%rbx, %r12
	jmp	LBB0_20
LBB0_14:
	xorl	%r12d, %r12d
	jmp	LBB0_32
LBB0_29:
	movq	%r14, %r12
	jmp	LBB0_32
LBB0_31:
	movq	%rbx, %r12
LBB0_32:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cr_ok,4,2                      ## @cr_ok
	.comm	_cr_stopped,4,2                 ## @cr_stopped
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rpc_target_choose_connection   ; -- Begin function rpc_target_choose_connection
	.p2align	2
_rpc_target_choose_connection:          ; @rpc_target_choose_connection
	.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
	cbz	x0, LBB0_25
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_13
; %bb.2:
	ldr	x22, [x8]
	cmp	x22, x8
	b.eq	LBB0_13
; %bb.3:
	mov	x21, #0
	mov	w23, #10000
Lloh0:
	adrp	x24, _cr_ok@GOTPAGE
Lloh1:
	ldr	x24, [x24, _cr_ok@GOTPAGEOFF]
Lloh2:
	adrp	x25, _cr_stopped@GOTPAGE
Lloh3:
	ldr	x25, [x25, _cr_stopped@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x9
	mov	x23, x8
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x22, [x22, #8]
	ldr	x8, [x20, #8]
	cmp	x22, x8
	b.eq	LBB0_14
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_server_check_ready
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x19, LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_RPCS_DATA
	mov	x1, x19
	bl	_matches_pid
	cmp	w0, #0
	b.le	LBB0_5
	b	LBB0_26
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x22]
	cmp	w8, w23
	csel	w8, w8, w23, lt
	csel	x9, x21, x22, ge
	ccmp	x19, #0, #4, lt
	b.eq	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	bl	_RPCS_DATA
	mov	x1, x19
	bl	_matches_pid
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w23, [x22]
	mov	x21, x22
	b	LBB0_5
LBB0_13:
	mov	x21, #0
	mov	w23, #10000
LBB0_14:
	ldr	x22, [x20]
	cmp	x22, x20
	b.eq	LBB0_27
; %bb.15:
Lloh4:
	adrp	x24, _cr_ok@GOTPAGE
Lloh5:
	ldr	x24, [x24, _cr_ok@GOTPAGEOFF]
Lloh6:
	adrp	x25, _cr_stopped@GOTPAGE
Lloh7:
	ldr	x25, [x25, _cr_stopped@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:                                ;   in Loop: Header=BB0_18 Depth=1
	mov	x21, x9
	mov	x23, x8
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x22, [x22, #8]
	cmp	x22, x20
	b.eq	LBB0_27
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	bl	_server_check_ready
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	cbz	x19, LBB0_26
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x22
	bl	_RPCS_DATA
	mov	x1, x19
	bl	_matches_pid
	cmp	w0, #0
	b.le	LBB0_17
	b	LBB0_26
LBB0_21:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [x22]
	cmp	w8, w23
	csel	w8, w8, w23, lt
	csel	x9, x21, x22, ge
	ccmp	x19, #0, #4, lt
	b.eq	LBB0_16
; %bb.23:                               ;   in Loop: Header=BB0_18 Depth=1
	mov	x0, x22
	bl	_RPCS_DATA
	mov	x1, x19
	bl	_matches_pid
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.24:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w23, [x22]
	mov	x21, x22
	b	LBB0_17
LBB0_25:
	mov	x21, #0
	b	LBB0_27
LBB0_26:
	mov	x21, x22
LBB0_27:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_cr_ok,4,2                      ; @cr_ok
	.comm	_cr_stopped,4,2                 ; @cr_stopped
.subsections_via_symbols
