	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_cipher
_select_cipher:                         ## @select_cipher
	.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
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -48(%rbp)
	cmpq	%rcx, %rdx
	je	LBB0_9
## %bb.1:
	movq	%rcx, %rbx
	movq	%rsi, %r15
	leaq	8(%rsi), %r12
	leaq	-64(%rbp), %rdi
	leaq	-48(%rbp), %rsi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rbx, -48(%rbp)
	movq	%r13, %rdi
	movq	%r14, %rsi
	je	LBB0_9
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%rdi, %r13
	movq	%rsi, %r14
	movq	%rbx, %rdx
	callq	_ptls_decode16
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp), %rcx
	movq	%r12, %rdx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rcx, (%rax)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	(%rdx), %rax
	addq	$8, %rdx
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_8
LBB0_7:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	movq	_PTLS_ALERT_HANDSHAKE_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTLS_ALERT_HANDSHAKE_FAILURE,4,2 ## @PTLS_ALERT_HANDSHAKE_FAILURE
	.no_dead_strip	_select_cipher
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_cipher
_select_cipher:                         ; @select_cipher
	.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
	str	x2, [sp, #8]
	cmp	x2, x3
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x3
	mov	x21, x1
	mov	x20, x0
	add	x22, x1, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	cmp	x8, x19
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	mov	x0, sp
	add	x1, sp, #8
	mov	x2, x19
	bl	_ptls_decode16
	cbnz	w0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	cbz	x8, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp]
	mov	x10, x22
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x11, [x8]
	cmp	x11, x9
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x10], #8
	cbnz	x8, LBB0_6
	b	LBB0_2
LBB0_8:
	mov	w0, #0
	str	x8, [x20]
	b	LBB0_10
LBB0_9:
Lloh0:
	adrp	x8, _PTLS_ALERT_HANDSHAKE_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTLS_ALERT_HANDSHAKE_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
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
	.cfi_endproc
                                        ; -- End function
	.comm	_PTLS_ALERT_HANDSHAKE_FAILURE,4,2 ; @PTLS_ALERT_HANDSHAKE_FAILURE
	.no_dead_strip	_select_cipher
.subsections_via_symbols
