	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_ffx
_test_ffx:                              ## @test_ffx
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ffx_variants@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_ffx_variants@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rax,%r14), %rdi
	addq	$16, %r14
	testq	%rdi, %rdi
	je	LBB0_11
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %esi
	leaq	_test_ffx.ffx_test_key(%rip), %rbx
	movq	%rbx, %rdx
	callq	_ptls_cipher_new
	movq	%rax, %r13
	movq	_ffx_variants@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	8(%rax,%r14), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_ptls_cipher_new
	movq	%rax, %r12
	movq	(%r15), %rax
	movq	8(%rax,%r14), %rdi
	xorl	%esi, %esi
	leaq	_test_ffx.ffx_test_bad_key(%rip), %rdx
	callq	_ptls_cipher_new
	testq	%r13, %r13
	setne	%dl
	testq	%r12, %r12
	setne	%cl
	andb	%dl, %cl
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	setne	%al
	andb	%cl, %al
	movzbl	%al, %ebx
	movl	%ebx, %edi
	callq	_ok
	cmpb	$1, %bl
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ffx_variants@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r14), %r15d
	movq	%r13, -120(%rbp)                ## 8-byte Spill
	leal	7(%r15), %r13d
	leal	14(%r15), %ebx
	testl	%r13d, %r13d
	cmovnsl	%r13d, %ebx
	sarl	$3, %ebx
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	leaq	_test_ffx.ffx_test_iv(%rip), %rsi
	callq	_ptls_cipher_init
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	leaq	-80(%rbp), %rsi
	leaq	_test_ffx.ffx_test_source(%rip), %rdx
	movl	%ebx, %ecx
	callq	_ptls_cipher_encrypt
	movslq	%ebx, %rbx
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r13d
	andl	$-8, %r13d
	subl	%r13d, %r15d
	movslq	%r15d, %rax
	leaq	_test_ffx.ffx_test_source(%rip), %r15
	movzbl	-1(%rbx,%r15), %ecx
	xorb	-81(%rbp,%rbx), %cl
	xorl	%edi, %edi
	leaq	_test_ffx.ffx_test_mask(%rip), %rdx
	testb	%cl, (%rax,%rdx)
	sete	%dil
	callq	_ok
	movq	%r12, %rdi
	leaq	_test_ffx.ffx_test_iv(%rip), %rsi
	callq	_ptls_cipher_init
	movq	%r12, %rdi
	leaq	-112(%rbp), %r13
	movq	%r13, %rsi
	leaq	-80(%rbp), %rdx
	movl	%ebx, %ecx
	callq	_ptls_cipher_encrypt
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ok
	movq	%r12, %rdi
	leaq	_test_ffx.ffx_test_bad_iv(%rip), %rsi
	callq	_ptls_cipher_init
	movq	%r12, %rdi
	movq	%r13, %rsi
	leaq	-80(%rbp), %rdx
	movl	%ebx, %ecx
	callq	_ptls_cipher_encrypt
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_ok
	movq	-128(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	leaq	_test_ffx.ffx_test_iv(%rip), %rsi
	callq	_ptls_cipher_init
	movq	%r15, %rdi
	movq	%r13, %rsi
	leaq	-80(%rbp), %rdx
	movl	%ebx, %ecx
	callq	_ptls_cipher_encrypt
	leaq	_test_ffx.ffx_test_source(%rip), %rdi
	movq	%r13, %rsi
	movq	-120(%rbp), %r13                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_ok
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r13, %r13
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_ptls_cipher_free
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_ptls_cipher_free
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_ptls_cipher_free
	jmp	LBB0_10
LBB0_11:
	xorl	%edi, %edi
	cmpl	$53, 32(%rax)
	sete	%dil
	callq	_assert
	movq	_ptls_minicrypto_aes128ctr@GOTPCREL(%rip), %rdi
	leaq	_test_ffx.ffx_test_key(%rip), %rbx
	movl	$1, %esi
	movl	$4, %edx
	movl	$53, %ecx
	movq	%rbx, %r8
	callq	_ptls_ffx_new
	movq	%rax, %r12
	movq	_ffx_variants@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	40(%rax), %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_ptls_cipher_new
	movq	%rax, %r15
	testq	%r12, %r12
	setne	%al
	testq	%r15, %r15
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %ebx
	movl	%ebx, %edi
	callq	_ok
	testb	%bl, %bl
	je	LBB0_13
## %bb.12:
	leaq	_test_ffx.ffx_test_iv(%rip), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ptls_cipher_init
	leaq	_test_ffx.ffx_test_source(%rip), %r14
	leaq	-80(%rbp), %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	$7, %ecx
	callq	_ptls_cipher_encrypt
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ptls_cipher_init
	leaq	-112(%rbp), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movl	$7, %ecx
	callq	_ptls_cipher_encrypt
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$7, %edx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ok
LBB0_13:
	testq	%r12, %r12
	je	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	callq	_ptls_cipher_free
LBB0_15:
	testq	%r15, %r15
	je	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_ptls_cipher_free
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @test_ffx.ffx_test_source
_test_ffx.ffx_test_source:
	.ascii	"0123456789abcdefghijklmnopqrstuv"

	.p2align	4                               ## @test_ffx.ffx_test_key
_test_ffx.ffx_test_key:
	.asciz	"\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\033\034\035\036\037 "

	.p2align	4                               ## @test_ffx.ffx_test_bad_key
_test_ffx.ffx_test_bad_key:
	.asciz	"\000\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\033\034\035\036\037"

	.p2align	4                               ## @test_ffx.ffx_test_iv
_test_ffx.ffx_test_iv:
	.ascii	"\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031"

	.p2align	4                               ## @test_ffx.ffx_test_bad_iv
_test_ffx.ffx_test_bad_iv:
	.ascii	"\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032"

	.section	__TEXT,__const
_test_ffx.ffx_test_mask:                ## @test_ffx.ffx_test_mask
	.ascii	"\000\001\003\007\017\037?\177"

	.comm	_ffx_variants,8,3               ## @ffx_variants
	.comm	_ptls_minicrypto_aes128ctr,4,2  ## @ptls_minicrypto_aes128ctr
	.no_dead_strip	_test_ffx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_ffx
_test_ffx:                              ; @test_ffx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #72]
Lloh3:
	adrp	x21, _ffx_variants@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ffx_variants@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_11
; %bb.1:
	mov	x23, #0
Lloh5:
	adrp	x19, _test_ffx.ffx_test_key@PAGE
Lloh6:
	add	x19, x19, _test_ffx.ffx_test_key@PAGEOFF
Lloh7:
	adrp	x20, _test_ffx.ffx_test_bad_key@PAGE
Lloh8:
	add	x20, x20, _test_ffx.ffx_test_bad_key@PAGEOFF
Lloh9:
	adrp	x28, _test_ffx.ffx_test_source@PAGE
Lloh10:
	add	x28, x28, _test_ffx.ffx_test_source@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	add	x9, x8, x23
	ldr	x0, [x9, #24]
	add	x23, x23, #16
	cbz	x0, LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w1, #1
	mov	x2, x19
	bl	_ptls_cipher_new
	mov	x24, x0
	ldr	x8, [x21]
	add	x8, x8, x23
	ldr	x0, [x8, #8]
	mov	w1, #0
	mov	x2, x19
	bl	_ptls_cipher_new
	mov	x25, x0
	ldr	x8, [x21]
	add	x8, x8, x23
	ldr	x0, [x8, #8]
	mov	w1, #0
	mov	x2, x20
	bl	_ptls_cipher_new
	mov	x26, x0
	cmp	x24, #0
	ccmp	x25, #0, #4, ne
	ccmp	x0, #0, #4, ne
	cset	w27, ne
	mov	x0, x27
	bl	_ok
	cmp	w27, #1
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x21]
	mov	x19, x20
	ldr	w20, [x8, x23]
	add	w8, w20, #7
	add	w9, w20, #14
	cmp	w8, #0
	mov	x22, x21
	csel	w21, w9, w8, lt
	asr	w27, w21, #3
	mov	x0, x24
Lloh11:
	adrp	x1, _test_ffx.ffx_test_iv@PAGE
Lloh12:
	add	x1, x1, _test_ffx.ffx_test_iv@PAGEOFF
	bl	_ptls_cipher_init
	add	x1, sp, #40
	mov	x0, x24
	mov	x2, x28
	mov	x3, x27
	bl	_ptls_cipher_encrypt
	sbfx	x8, x21, #3, #29
	mov	x21, x22
	sub	x8, x8, #1
	add	x9, sp, #40
	ldrb	w9, [x9, x8]
	and	w10, w20, #0x7
	negs	w11, w20
	mov	x20, x19
Lloh13:
	adrp	x19, _test_ffx.ffx_test_key@PAGE
Lloh14:
	add	x19, x19, _test_ffx.ffx_test_key@PAGEOFF
	and	w11, w11, #0x7
	csneg	w10, w10, w11, mi
Lloh15:
	adrp	x11, _test_ffx.ffx_test_mask@PAGE
Lloh16:
	add	x11, x11, _test_ffx.ffx_test_mask@PAGEOFF
	ldrb	w10, [x11, w10, sxtw]
	ldrb	w8, [x28, x8]
	eor	w8, w8, w9
	tst	w8, w10
	cset	w0, eq
	bl	_ok
	mov	x0, x25
Lloh17:
	adrp	x22, _test_ffx.ffx_test_iv@PAGE
Lloh18:
	add	x22, x22, _test_ffx.ffx_test_iv@PAGEOFF
	mov	x1, x22
	bl	_ptls_cipher_init
	add	x1, sp, #8
	add	x2, sp, #40
	mov	x0, x25
	mov	x3, x27
	bl	_ptls_cipher_encrypt
	add	x1, sp, #8
	mov	x0, x28
	mov	x2, x27
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	bl	_ok
	mov	x0, x25
Lloh19:
	adrp	x1, _test_ffx.ffx_test_bad_iv@PAGE
Lloh20:
	add	x1, x1, _test_ffx.ffx_test_bad_iv@PAGEOFF
	bl	_ptls_cipher_init
	add	x1, sp, #8
	add	x2, sp, #40
	mov	x0, x25
	mov	x3, x27
	bl	_ptls_cipher_encrypt
	add	x1, sp, #8
	mov	x0, x28
	mov	x2, x27
	bl	_memcmp
	cmp	x0, #0
	cset	w0, ne
	bl	_ok
	mov	x0, x26
	mov	x1, x22
	bl	_ptls_cipher_init
	add	x1, sp, #8
	add	x2, sp, #40
	mov	x0, x26
	mov	x3, x27
	bl	_ptls_cipher_encrypt
	add	x1, sp, #8
	mov	x0, x28
	mov	x2, x27
	bl	_memcmp
	cmp	x0, #0
	cset	w0, ne
	bl	_ok
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x24, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x24
	bl	_ptls_cipher_free
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x25, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x25
	bl	_ptls_cipher_free
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	cbz	x26, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x26
	bl	_ptls_cipher_free
	b	LBB0_2
LBB0_11:
	ldr	w8, [x8, #32]
	cmp	w8, #53
	cset	w0, eq
	bl	_assert
Lloh21:
	adrp	x0, _ptls_minicrypto_aes128ctr@GOTPAGE
Lloh22:
	ldr	x0, [x0, _ptls_minicrypto_aes128ctr@GOTPAGEOFF]
Lloh23:
	adrp	x20, _test_ffx.ffx_test_key@PAGE
Lloh24:
	add	x20, x20, _test_ffx.ffx_test_key@PAGEOFF
	mov	w1, #1
	mov	w2, #4
	mov	w3, #53
	mov	x4, x20
	bl	_ptls_ffx_new
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x0, [x8, #40]
	mov	w1, #0
	mov	x2, x20
	bl	_ptls_cipher_new
	mov	x20, x0
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	cset	w21, ne
	mov	x0, x21
	bl	_ok
	tbz	w21, #0, LBB0_13
; %bb.12:
Lloh25:
	adrp	x21, _test_ffx.ffx_test_iv@PAGE
Lloh26:
	add	x21, x21, _test_ffx.ffx_test_iv@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_ptls_cipher_init
Lloh27:
	adrp	x22, _test_ffx.ffx_test_source@PAGE
Lloh28:
	add	x22, x22, _test_ffx.ffx_test_source@PAGEOFF
	add	x1, sp, #40
	mov	x0, x19
	mov	x2, x22
	mov	w3, #7
	bl	_ptls_cipher_encrypt
	mov	x0, x20
	mov	x1, x21
	bl	_ptls_cipher_init
	add	x1, sp, #8
	add	x2, sp, #40
	mov	x0, x20
	mov	w3, #7
	bl	_ptls_cipher_encrypt
	add	x1, sp, #8
	mov	x0, x22
	mov	w2, #7
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	bl	_ok
LBB0_13:
	cbz	x19, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_ptls_cipher_free
LBB0_15:
	cbz	x20, LBB0_17
; %bb.16:
	mov	x0, x20
	bl	_ptls_cipher_free
LBB0_17:
	ldr	x8, [sp, #72]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
_test_ffx.ffx_test_source:              ; @test_ffx.ffx_test_source
	.ascii	"0123456789abcdefghijklmnopqrstuv"

_test_ffx.ffx_test_key:                 ; @test_ffx.ffx_test_key
	.asciz	"\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\033\034\035\036\037 "

_test_ffx.ffx_test_bad_key:             ; @test_ffx.ffx_test_bad_key
	.asciz	"\000\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\033\034\035\036\037"

_test_ffx.ffx_test_iv:                  ; @test_ffx.ffx_test_iv
	.ascii	"\n\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031"

_test_ffx.ffx_test_bad_iv:              ; @test_ffx.ffx_test_bad_iv
	.ascii	"\013\f\r\016\017\020\021\022\023\024\025\026\027\030\031\032"

	.section	__TEXT,__const
_test_ffx.ffx_test_mask:                ; @test_ffx.ffx_test_mask
	.ascii	"\000\001\003\007\017\037?\177"

	.comm	_ffx_variants,8,3               ; @ffx_variants
	.comm	_ptls_minicrypto_aes128ctr,4,2  ; @ptls_minicrypto_aes128ctr
	.no_dead_strip	_test_ffx
.subsections_via_symbols
