	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handshake_capabilities
_handshake_capabilities:                ## @handshake_capabilities
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	8(%rsi), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.1:
	leaq	24(%r13), %rbx
	leaq	L_.str(%rip), %r15
	leaq	L_.str.1(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%r14), %edi
	movq	%r15, %rsi
	callq	_packet_write_fmt_gently
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rdx
	addq	$16, %rbx
	testq	%rdx, %rdx
	jne	LBB0_3
LBB0_4:
	movl	12(%r14), %edi
	callq	_packet_flush_gently
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %r12
LBB0_6:
	movq	%r12, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
LBB0_7:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %edi
	xorl	%esi, %esi
	callq	_packet_read_line
	testq	%rax, %rax
	je	LBB0_22
## %bb.8:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	8(%rcx), %r12
	addq	$24, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %r13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r14), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdx
	leaq	L_.str.4(%rip), %rdi
	callq	_die
LBB0_21:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r14), %edi
	xorl	%esi, %esi
	callq	_packet_read_line
	testq	%rax, %rax
	je	LBB0_22
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	%rax, %rdi
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
	callq	_skip_prefix
	testl	%eax, %eax
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_15:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	-48(%rbp), %rdi
	callq	_strcmp
	addq	$16, %rbx
	incq	%r15
	testq	%rax, %rax
	jne	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	addq	$-16, %rbx
	cmpq	$0, (%rbx)
	jne	LBB0_19
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%r15d, %r15d
	movq	%r12, %rbx
	cmpq	$0, (%rbx)
	je	LBB0_16
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%r15d, %eax
	shlq	$4, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	jmp	LBB0_21
LBB0_22:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"capability=%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Could not write requested capability"

L_.str.2:                               ## @.str.2
	.asciz	"Could not write flush packet"

L_.str.3:                               ## @.str.3
	.asciz	"capability="

L_.str.4:                               ## @.str.4
	.asciz	"subprocess '%s' requested unsupported capability '%s'"

	.no_dead_strip	_handshake_capabilities
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handshake_capabilities
_handshake_capabilities:                ; @handshake_capabilities
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x24, x1
	ldr	x2, [x24, #8]!
	cbz	x2, LBB0_4
; %bb.1:
	add	x25, x20, #24
Lloh0:
	adrp	x23, l_.str@PAGE
Lloh1:
	add	x23, x23, l_.str@PAGEOFF
Lloh2:
	adrp	x22, l_.str.1@PAGE
Lloh3:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #12]
	mov	x1, x23
	bl	_packet_write_fmt_gently
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x2, [x25], #16
	cbnz	x2, LBB0_2
LBB0_4:
	ldr	w0, [x21, #12]
	bl	_packet_flush_gently
	cbz	x0, LBB0_7
; %bb.5:
Lloh4:
	adrp	x22, l_.str.2@PAGE
Lloh5:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_error
LBB0_7:
	ldr	w0, [x21, #8]
	mov	x1, #0
	bl	_packet_read_line
	cbz	x0, LBB0_21
; %bb.8:
	add	x25, x20, #24
Lloh6:
	adrp	x22, l_.str.3@PAGE
Lloh7:
	add	x22, x22, l_.str.3@PAGEOFF
Lloh8:
	adrp	x23, l_.str.4@PAGE
Lloh9:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x21]
	ldr	w1, [x8]
	ldr	x2, [sp, #8]
	mov	x0, x23
	bl	_die
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x21, #8]
	mov	x1, #0
	bl	_packet_read_line
	cbz	x0, LBB0_21
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	add	x2, sp, #8
	mov	x1, x22
	bl	_skip_prefix
	cbz	w0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x1, [x24]
	cbz	x1, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x0, [sp, #8]
	bl	_strcmp
	mov	x26, #0
	cbz	x0, LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x27, x25
LBB0_15:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x1, [x27]
	cbz	x1, LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x0, [sp, #8]
	bl	_strcmp
	add	x27, x27, #16
	add	x26, x26, #1
	cbnz	x0, LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	x8, x27, #16
	ldr	x8, [x8]
	cbnz	x8, LBB0_19
	b	LBB0_9
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, x24
	ldr	x8, [x8]
	cbz	x8, LBB0_9
LBB0_19:                                ;   in Loop: Header=BB0_11 Depth=1
	cbz	x19, LBB0_10
; %bb.20:                               ;   in Loop: Header=BB0_11 Depth=1
	and	x8, x26, #0xffffffff
	lsl	x8, x8, #4
	ldr	w8, [x20, x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_10
LBB0_21:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"capability=%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Could not write requested capability"

l_.str.2:                               ; @.str.2
	.asciz	"Could not write flush packet"

l_.str.3:                               ; @.str.3
	.asciz	"capability="

l_.str.4:                               ; @.str.4
	.asciz	"subprocess '%s' requested unsupported capability '%s'"

	.no_dead_strip	_handshake_capabilities
.subsections_via_symbols
