	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qce_xts_swapiv
_qce_xts_swapiv:                        ## @qce_xts_swapiv
	.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
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_QCE_AES_IV_LENGTH@GOTPCREL(%rip), %r14
	movl	(%r14), %r13d
	movq	%r13, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	cmpl	%ebx, %r13d
	jb	LBB0_19
## %bb.1:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movslq	(%r14), %rdx
	movl	%edx, %eax
	subl	%ebx, %eax
	cmpl	%edx, %eax
	jge	LBB0_18
## %bb.2:
	cltq
	movq	%rdx, %r10
	subq	%rax, %r10
	cmpq	$8, %r10
	jb	LBB0_13
## %bb.3:
	movq	%rax, %rcx
	notq	%rcx
	addq	%rdx, %rcx
	leal	-1(%rbx), %esi
	movl	%esi, %edi
	subl	%ecx, %edi
	cmpl	%esi, %edi
	jg	LBB0_13
## %bb.4:
	shrq	$32, %rcx
	jne	LBB0_13
## %bb.5:
	movq	%r10, %r8
	andq	$-8, %r8
	leaq	-8(%r8), %rcx
	movq	%rcx, %r9
	shrq	$3, %r9
	incq	%r9
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.7:
	movq	%r9, %r14
	andq	$-2, %r14
	leal	-9(%rbx), %ecx
	leaq	(%r12,%rax,4), %r11
	addq	$48, %r11
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	8(%rcx), %edi
	movslq	%edi, %rdi
	movdqu	-28(%r15,%rdi,4), %xmm0
	movdqu	-12(%r15,%rdi,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqu	%xmm1, -48(%r11,%rsi,4)
	movdqu	%xmm0, -32(%r11,%rsi,4)
	movslq	%ecx, %rcx
	movdqu	-28(%r15,%rcx,4), %xmm0
	movdqu	-12(%r15,%rcx,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqu	%xmm1, -16(%r11,%rsi,4)
	movdqu	%xmm0, (%r11,%rsi,4)
	addq	$16, %rsi
	addl	$-16, %ecx
	addq	$-2, %r14
	jne	LBB0_8
## %bb.9:
	testb	$1, %r9b
	je	LBB0_11
LBB0_10:
	movq	%rsi, %rcx
	addq	%rax, %rcx
	notl	%esi
	addl	%ebx, %esi
	movslq	%esi, %rsi
	movdqu	-28(%r15,%rsi,4), %xmm0
	movdqu	-12(%r15,%rsi,4), %xmm1
	pshufd	$27, %xmm1, %xmm1               ## xmm1 = xmm1[3,2,1,0]
	pshufd	$27, %xmm0, %xmm0               ## xmm0 = xmm0[3,2,1,0]
	movdqu	%xmm1, (%r12,%rcx,4)
	movdqu	%xmm0, 16(%r12,%rcx,4)
LBB0_11:
	cmpq	%r8, %r10
	je	LBB0_18
## %bb.12:
	addq	%r8, %rax
	subl	%r8d, %ebx
LBB0_13:
	movl	%edx, %esi
	subl	%eax, %esi
	movq	%rax, %rcx
	notq	%rcx
	addq	%rdx, %rcx
	andq	$3, %rsi
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	decl	%ebx
	movslq	%ebx, %rdi
	movl	(%r15,%rdi,4), %edi
	movl	%edi, (%r12,%rax,4)
	incq	%rax
	decq	%rsi
	jne	LBB0_14
LBB0_15:
	cmpq	$3, %rcx
	jb	LBB0_18
## %bb.16:
	addl	$-4, %ebx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leal	3(%rbx), %ecx
	movslq	%ecx, %rcx
	movl	(%r15,%rcx,4), %ecx
	movl	%ecx, (%r12,%rax,4)
	leal	2(%rbx), %ecx
	movslq	%ecx, %rcx
	movl	(%r15,%rcx,4), %ecx
	movl	%ecx, 4(%r12,%rax,4)
	leal	1(%rbx), %ecx
	movslq	%ecx, %rcx
	movl	(%r15,%rcx,4), %ecx
	movl	%ecx, 8(%r12,%rax,4)
	movslq	%ebx, %rbx
	movl	(%r15,%rbx,4), %ecx
	movl	%ecx, 12(%r12,%rax,4)
	addq	$4, %rax
	addl	$-4, %ebx
	cmpq	%rax, %rdx
	jne	LBB0_17
LBB0_18:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_qce_cpu_to_be32p_array
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%esi, %esi
	testb	$1, %r9b
	jne	LBB0_10
	jmp	LBB0_11
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QCE_AES_IV_LENGTH,4,2          ## @QCE_AES_IV_LENGTH
	.no_dead_strip	_qce_xts_swapiv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qce_xts_swapiv
_qce_xts_swapiv:                        ; @qce_xts_swapiv
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _QCE_AES_IV_LENGTH@GOTPAGE
Lloh4:
	ldr	x23, [x23, _QCE_AES_IV_LENGTH@GOTPAGEOFF]
	ldr	w2, [x23]
	lsl	x8, x2, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	cmp	w2, w22
	b.lo	LBB0_8
; %bb.1:
	mov	x0, x21
	mov	w1, #0
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memset
	ldrsw	x2, [x23]
	sub	w8, w2, w22
	cmp	w8, w2
	b.ge	LBB0_7
; %bb.2:
	sxtw	x12, w8
	sub	x8, x2, x12
	cmp	x8, #16
	b.lo	LBB0_4
; %bb.3:
	mvn	x9, x12
	sub	w11, w22, #1
	add	x10, x9, x2
	sub	w9, w11, w10
	cmp	w9, w11
	lsr	x9, x10, #32
	ccmp	x9, #0, #0, le
	b.eq	LBB0_10
LBB0_4:
	mov	x9, x12
LBB0_5:
	add	x8, x21, x9, lsl #2
	sub	x9, x2, x9
	sub	w10, w22, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x20, w10, sxtw #2]
	str	w11, [x8], #4
	sub	w10, w10, #1
	sub	x9, x9, #1
	cbnz	x9, LBB0_6
LBB0_7:
	mov	x0, x19
	mov	x1, x21
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_qce_cpu_to_be32p_array
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.9:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	and	x11, x8, #0xfffffffffffffff0
	add	x9, x11, x12
	sub	w22, w22, w11
	add	x12, x21, x12, lsl #2
	add	x12, x12, #32
	mov	x13, x11
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x20, w10, sxtw #2
	ldur	q0, [x14, #-12]
	rev64.4s	v0, v0
	ext.16b	v0, v0, v0, #8
	ldur	q1, [x14, #-28]
	rev64.4s	v1, v1
	ext.16b	v1, v1, v1, #8
	ldur	q2, [x14, #-44]
	rev64.4s	v2, v2
	ext.16b	v2, v2, v2, #8
	ldur	q3, [x14, #-60]
	rev64.4s	v3, v3
	ext.16b	v3, v3, v3, #8
	stp	q0, q1, [x12, #-32]
	stp	q2, q3, [x12], #64
	sub	w10, w10, #16
	sub	x13, x13, #16
	cbnz	x13, LBB0_11
; %bb.12:
	cmp	x8, x11
	b.eq	LBB0_7
	b	LBB0_5
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_QCE_AES_IV_LENGTH,4,2          ; @QCE_AES_IV_LENGTH
	.no_dead_strip	_qce_xts_swapiv
.subsections_via_symbols
