	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_ffx_setup_crypto          ## -- Begin function ptls_ffx_setup_crypto
	.p2align	4, 0x90
_ptls_ffx_setup_crypto:                 ## @ptls_ffx_setup_crypto
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %rbx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	-9(%r8), %rax
	xorl	%edi, %edi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpq	$248, %rax
	setb	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 48(%r13)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 40(%r13)
	sete	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 32(%r13)
	sete	%dil
	callq	_assert
	movq	56(%r13), %rax
	movl	$1, %r12d
	movl	$1, %edi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%r15), %rcx
	xorl	%edi, %edi
	cmpq	(%rax), %rcx
	sete	%dil
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	7(%rbx), %r14
	callq	_assert
	movq	56(%r13), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%r15), %rcx
	xorl	%r12d, %r12d
	cmpq	8(%rax), %rcx
	sete	%r12b
LBB0_4:
	shrq	$3, %r14
	movl	%r12d, %edi
	callq	_assert
	movq	56(%r13), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	xorl	%edi, %edi
	cmpq	%r14, 16(%rax)
	sete	%dil
	jmp	LBB0_7
LBB0_5:
	movl	$1, %edi
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	_assert
	xorl	%edi, %edi
	cmpq	$16, 8(%r15)
	sete	%dil
	callq	_assert
	cmpq	$247, %rbx
	ja	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	movl	$1, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_ptls_cipher_new
	testq	%rax, %rax
	jne	LBB0_11
LBB0_9:
	movq	_PTLS_ERROR_LIBRARY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_10
## %bb.12:
	movq	%r13, %rdi
	callq	_ffx_dispose
	jmp	LBB0_13
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	movq	%rax, 72(%r13)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r13)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r13)
	movq	%r14, 8(%r13)
	movl	%r14d, %eax
	shrl	$31, %eax
	addl	%r14d, %eax
	sarl	%eax
	movl	%eax, 16(%r13)
	subl	%eax, %r14d
	movl	%r14d, 20(%r13)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	andl	$7, %ecx
	leaq	l___const.ptls_ffx_setup_crypto.last_byte_mask(%rip), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 24(%r13)
	movl	64(%r13), %edi
	movl	$4, %esi
	callq	_ptls_clear_memory
	movq	_ffx_dispose@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r13)
	movq	_ffx_init@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%r13)
	movq	_ffx_encrypt@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%r13)
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @__const.ptls_ffx_setup_crypto.last_byte_mask
l___const.ptls_ffx_setup_crypto.last_byte_mask:
	.long	255                             ## 0xff
	.long	254                             ## 0xfe
	.long	252                             ## 0xfc
	.long	248                             ## 0xf8
	.long	240                             ## 0xf0
	.long	224                             ## 0xe0
	.long	192                             ## 0xc0
	.long	128                             ## 0x80

	.comm	_PTLS_ERROR_LIBRARY,4,2         ## @PTLS_ERROR_LIBRARY
	.comm	_ffx_init,8,3                   ## @ffx_init
	.comm	_ffx_encrypt,8,3                ## @ffx_encrypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_ffx_setup_crypto          ; -- Begin function ptls_ffx_setup_crypto
	.p2align	2
_ptls_ffx_setup_crypto:                 ; @ptls_ffx_setup_crypto
	.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
	mov	x23, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x19, x0
	sub	x25, x4, #9
	cmp	x25, #248
	cset	w0, lo
	bl	_assert
	ldr	x8, [x19, #48]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #40]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x9, [x24]
	ldr	x8, [x8]
	cmp	x9, x8
	cset	w0, eq
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	add	x26, x20, #7
	bl	_assert
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x9, [x24, #8]
	ldr	x8, [x8, #8]
	cmp	x9, x8
	cset	w0, eq
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	lsr	x26, x26, #3
	bl	_assert
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_8
; %bb.7:
	ldr	x8, [x8, #16]
	cmp	x8, x26
	cset	w0, eq
	b	LBB0_9
LBB0_8:
	mov	w0, #1
LBB0_9:
	bl	_assert
	ldr	x8, [x24, #8]
	cmp	x8, #16
	cset	w0, eq
	bl	_assert
	cmp	x25, #247
	b.hi	LBB0_11
; %bb.10:
	mov	x0, x24
	mov	w1, #1
	mov	x2, x23
	bl	_ptls_cipher_new
	cbnz	x0, LBB0_14
LBB0_11:
Lloh0:
	adrp	x8, _PTLS_ERROR_LIBRARY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTLS_ERROR_LIBRARY@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	cbz	w23, LBB0_13
; %bb.12:
	mov	x0, x19
	bl	_ffx_dispose
	b	LBB0_15
LBB0_13:
	mov	x0, #0
LBB0_14:
	str	x0, [x19, #72]
	stp	w22, w21, [x19]
	str	x26, [x19, #8]
	cmp	w26, #0
	cinc	w8, w26, lt
	asr	w8, w8, #1
	sub	w9, w26, w8
	stp	w8, w9, [x19, #16]
	and	x8, x20, #0x7
Lloh3:
	adrp	x9, l___const.ptls_ffx_setup_crypto.last_byte_mask@PAGE
Lloh4:
	add	x9, x9, l___const.ptls_ffx_setup_crypto.last_byte_mask@PAGEOFF
	ldr	w8, [x9, x8, lsl #2]
	str	w8, [x19, #24]
	ldr	w0, [x19, #64]
	mov	w1, #4
	bl	_ptls_clear_memory
	mov	w23, #0
Lloh5:
	adrp	x8, _ffx_dispose@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ffx_dispose@GOTPAGEOFF]
	str	x8, [x19, #48]
Lloh7:
	adrp	x8, _ffx_init@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ffx_init@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _ffx_encrypt@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ffx_encrypt@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	stp	x9, x8, [x19, #32]
LBB0_15:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.ptls_ffx_setup_crypto.last_byte_mask
l___const.ptls_ffx_setup_crypto.last_byte_mask:
	.long	255                             ; 0xff
	.long	254                             ; 0xfe
	.long	252                             ; 0xfc
	.long	248                             ; 0xf8
	.long	240                             ; 0xf0
	.long	224                             ; 0xe0
	.long	192                             ; 0xc0
	.long	128                             ; 0x80

	.comm	_PTLS_ERROR_LIBRARY,4,2         ; @PTLS_ERROR_LIBRARY
	.comm	_ffx_init,8,3                   ; @ffx_init
	.comm	_ffx_encrypt,8,3                ; @ffx_encrypt
.subsections_via_symbols
