	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_ctr
_test_ctr:                              ## @test_ctr
	.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	$1048, %rsp                     ## imm = 0x418
	.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)
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	%r8, %rbx
	movq	%rcx, %r12
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %r14
	xorl	%edi, %edi
	cmpq	$257, 16(%rbp)                  ## imm = 0x101
	setb	%dil
	movq	%r9, -1080(%rbp)                ## 8-byte Spill
	callq	_assert
	xorl	%edi, %edi
	cmpq	%r15, (%r14)
	sete	%dil
	callq	_ok
	xorl	%edi, %edi
	cmpq	%rbx, 8(%r14)
	sete	%dil
	callq	_ok
	movq	%r14, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	callq	_ptls_cipher_new
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_ptls_cipher_init
	leaq	_test_ctr.zeroes(%rip), %rdx
	leaq	-1072(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	16(%rbp), %r15
	movq	%r15, %rcx
	callq	_ptls_cipher_encrypt
	movq	%rbx, %rdi
	callq	_ptls_cipher_free
	movq	%r14, %rdi
	movq	-1080(%rbp), %rsi               ## 8-byte Reload
	movq	%r15, %rdx
	callq	_memcmp
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ok
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @test_ctr.zeroes
_test_ctr.zeroes:
	.space	256

	.no_dead_strip	_test_ctr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_ctr
_test_ctr:                              ; @test_ctr
	.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
	sub	sp, sp, #1040
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x6
	mov	x20, x5
	mov	x23, x4
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	ldr	x8, [x0]
	ldr	x25, [x8]
	cmp	x6, #257
	cset	w0, lo
	bl	_assert
	ldr	x8, [x25]
	cmp	x8, x24
	cset	w0, eq
	bl	_ok
	ldr	x8, [x25, #8]
	cmp	x8, x23
	cset	w0, eq
	bl	_ok
	mov	x0, x25
	mov	w1, #1
	mov	x2, x22
	bl	_ptls_cipher_new
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	mov	x0, x22
	mov	x1, x21
	bl	_ptls_cipher_init
Lloh3:
	adrp	x2, _test_ctr.zeroes@PAGE
Lloh4:
	add	x2, x2, _test_ctr.zeroes@PAGEOFF
	add	x1, sp, #8
	mov	x0, x22
	mov	x3, x19
	bl	_ptls_cipher_encrypt
	mov	x0, x22
	bl	_ptls_cipher_free
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x19
	bl	_memcmp
	cmp	x0, #0
	cset	w0, eq
	bl	_ok
LBB0_2:
	ldur	x8, [x29, #-72]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	add	sp, sp, #1040
	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
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @test_ctr.zeroes
_test_ctr.zeroes:
	.space	256

	.no_dead_strip	_test_ctr
.subsections_via_symbols
