	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_aead__build_iv            ## -- Begin function ptls_aead__build_iv
	.p2align	4, 0x90
_ptls_aead__build_iv:                   ## @ptls_aead__build_iv
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rcx), %r8
	movq	%r8, %r10
	addq	$-8, %r10
	je	LBB0_20
## %bb.1:
	cmpq	$8, %r10
	jb	LBB0_12
## %bb.2:
	movq	%rsi, %rcx
	subq	%rax, %rcx
	cmpq	$32, %rcx
	jb	LBB0_12
## %bb.3:
	movq	%r10, %r9
	andq	$-8, %r9
	leaq	-8(%r9), %rcx
	movq	%rcx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r11d
	andl	$3, %r11d
	cmpq	$24, %rcx
	jae	LBB0_5
## %bb.4:
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rdi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rax,%rcx,4), %xmm0
	movups	16(%rax,%rcx,4), %xmm1
	movups	%xmm0, (%rsi,%rcx,4)
	movups	%xmm1, 16(%rsi,%rcx,4)
	movups	32(%rax,%rcx,4), %xmm0
	movups	48(%rax,%rcx,4), %xmm1
	movups	%xmm0, 32(%rsi,%rcx,4)
	movups	%xmm1, 48(%rsi,%rcx,4)
	movups	64(%rax,%rcx,4), %xmm0
	movups	80(%rax,%rcx,4), %xmm1
	movups	%xmm0, 64(%rsi,%rcx,4)
	movups	%xmm1, 80(%rsi,%rcx,4)
	movups	96(%rax,%rcx,4), %xmm0
	movups	112(%rax,%rcx,4), %xmm1
	movups	%xmm0, 96(%rsi,%rcx,4)
	movups	%xmm1, 112(%rsi,%rcx,4)
	addq	$32, %rcx
	addq	$-4, %rdi
	jne	LBB0_6
LBB0_7:
	testq	%r11, %r11
	je	LBB0_10
## %bb.8:
	leaq	(%rax,%rcx,4), %rdi
	addq	$16, %rdi
	leaq	(%rsi,%rcx,4), %rcx
	addq	$16, %rcx
	shlq	$5, %r11
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movups	-16(%rdi,%rbx), %xmm0
	movups	(%rdi,%rbx), %xmm1
	movups	%xmm0, -16(%rcx,%rbx)
	movups	%xmm1, (%rcx,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %r11
	jne	LBB0_9
LBB0_10:
	leaq	(%rsi,%r9,4), %rsi
	leaq	(%rax,%r9,4), %rax
	cmpq	%r9, %r10
	je	LBB0_20
## %bb.11:
	andl	$7, %r8d
	movq	%r8, %r10
LBB0_12:
	leaq	-1(%r10), %r8
	movq	%r10, %rcx
	andq	$7, %rcx
	je	LBB0_16
## %bb.13:
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax), %ebx
	addq	$4, %rax
	movl	%ebx, (%rsi)
	addq	$4, %rsi
	incq	%rdi
	cmpq	%rdi, %rcx
	jne	LBB0_14
## %bb.15:
	subq	%rdi, %r10
LBB0_16:
	cmpq	$7, %r8
	jb	LBB0_20
## %bb.17:
	xorl	%edi, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rax,%rdi,4), %ebx
	movl	%ebx, (%rsi,%rdi,4)
	movl	4(%rax,%rdi,4), %ebx
	movl	%ebx, 4(%rsi,%rdi,4)
	movl	8(%rax,%rdi,4), %ebx
	movl	%ebx, 8(%rsi,%rdi,4)
	movl	12(%rax,%rdi,4), %ebx
	movl	%ebx, 12(%rsi,%rdi,4)
	movl	16(%rax,%rdi,4), %ebx
	movl	%ebx, 16(%rsi,%rdi,4)
	movl	20(%rax,%rdi,4), %ebx
	movl	%ebx, 20(%rsi,%rdi,4)
	movl	24(%rax,%rdi,4), %ebx
	movl	%ebx, 24(%rsi,%rdi,4)
	movl	28(%rax,%rdi,4), %ebx
	movl	%ebx, 28(%rsi,%rdi,4)
	addq	$-32, %rcx
	addq	$8, %rdi
	cmpq	%rdi, %r10
	jne	LBB0_18
## %bb.19:
	subq	%rcx, %rsi
	subq	%rcx, %rax
LBB0_20:
	movq	%rdx, %rcx
	shrq	$56, %rcx
	xorl	(%rax), %ecx
	movl	%ecx, (%rsi)
	movq	%rdx, %rcx
	shrq	$48, %rcx
	xorl	4(%rax), %ecx
	movl	%ecx, 4(%rsi)
	movq	%rdx, %rcx
	shrq	$40, %rcx
	xorl	8(%rax), %ecx
	movl	%ecx, 8(%rsi)
	movq	%rdx, %rcx
	shrq	$32, %rcx
	xorl	12(%rax), %ecx
	movl	%ecx, 12(%rsi)
	movq	%rdx, %rcx
	shrq	$24, %rcx
	xorl	16(%rax), %ecx
	movl	%ecx, 16(%rsi)
	movq	%rdx, %rcx
	shrq	$16, %rcx
	xorl	20(%rax), %ecx
	movl	%ecx, 20(%rsi)
	movq	%rdx, %rcx
	shrq	$8, %rcx
	xorl	24(%rax), %ecx
	movl	%ecx, 24(%rsi)
	xorl	28(%rax), %edx
	movl	%edx, 28(%rsi)
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_aead__build_iv            ; -- Begin function ptls_aead__build_iv
	.p2align	2
_ptls_aead__build_iv:                   ; @ptls_aead__build_iv
	.cfi_startproc
; %bb.0:
	ldp	x14, x8, [x0]
	ldr	x8, [x8]
	subs	x11, x8, #8
	b.eq	LBB0_6
; %bb.1:
	cmp	x11, #16
	b.lo	LBB0_7
; %bb.2:
	sub	x8, x1, x14
	cmp	x8, #64
	b.lo	LBB0_7
; %bb.3:
	and	x12, x11, #0xfffffffffffffff0
	lsl	x9, x12, #2
	add	x8, x1, x9
	add	x9, x14, x9
	and	x10, x11, #0xf
	add	x13, x1, #32
	add	x14, x14, #32
	mov	x15, x12
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q0, q1, [x14, #-32]
	ldp	q2, q3, [x14], #64
	stp	q0, q1, [x13, #-32]
	stp	q2, q3, [x13], #64
	subs	x15, x15, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x12
	b.ne	LBB0_8
	b	LBB0_9
LBB0_6:
	mov	x9, x14
	mov	x8, x1
	b	LBB0_9
LBB0_7:
	mov	x8, x1
	mov	x9, x14
	mov	x10, x11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9], #4
	str	w11, [x8], #4
	subs	x10, x10, #1
	b.ne	LBB0_8
LBB0_9:
	ldr	w10, [x9]
	lsr	x11, x2, #56
	eor	w10, w10, w11
	str	w10, [x8]
	ldr	w10, [x9, #4]
	lsr	x11, x2, #48
	eor	w10, w10, w11
	str	w10, [x8, #4]
	ldr	w10, [x9, #8]
	lsr	x11, x2, #40
	eor	w10, w10, w11
	str	w10, [x8, #8]
	ldr	w10, [x9, #12]
	lsr	x11, x2, #32
	eor	w10, w10, w11
	str	w10, [x8, #12]
	ldr	w10, [x9, #16]
	lsr	x11, x2, #24
	eor	w10, w10, w11
	str	w10, [x8, #16]
	ldr	w10, [x9, #20]
	lsr	x11, x2, #16
	eor	w10, w10, w11
	str	w10, [x8, #20]
	ldr	w10, [x9, #24]
	lsr	x11, x2, #8
	eor	w10, w10, w11
	str	w10, [x8, #24]
	ldr	w9, [x9, #28]
	eor	w9, w9, w2
	str	w9, [x8, #28]
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
