	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aes_wrap_cipher_internal
_aes_wrap_cipher_internal:              ## @aes_wrap_cipher_internal
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rcx, %r8
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movl	$-1, %ebx
	testq	%r8, %r8
	je	LBB0_16
## %bb.3:
	movq	%rsi, %rdx
	cmpq	$0, 24(%rdi)
	je	LBB0_4
## %bb.8:
	movl	(%rdi), %eax
	testb	$7, %r8b
	je	LBB0_10
## %bb.9:
	testl	%eax, %eax
	je	LBB0_16
LBB0_10:
	testq	%rdx, %rdx
	jne	LBB0_12
## %bb.11:
	leal	7(%r8), %ebx
	andl	$-8, %ebx
	testl	%eax, %eax
	cmovel	%r8d, %ebx
	addl	$8, %ebx
	jmp	LBB0_16
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_4:
	cmpq	$16, %r8
	jb	LBB0_16
## %bb.5:
	movl	%r8d, %eax
	andl	$7, %eax
	testq	%rax, %rax
	jne	LBB0_16
## %bb.6:
	testq	%rdx, %rdx
	je	LBB0_7
LBB0_12:
	movq	(%rdi), %r10
	leaq	8(%rdi), %rax
	movq	%r10, %r9
	shrq	$32, %r9
	xorl	%ebx, %ebx
	cmpq	$0, 16(%rdi)
	je	LBB0_13
## %bb.14:
	movq	(%rax), %rsi
	jmp	LBB0_15
LBB0_13:
	xorl	%esi, %esi
LBB0_15:
	movq	%rax, %rdi
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	*%r10
	cmpq	$1, %rax
	sbbl	%ebx, %ebx
	orl	%eax, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_7:
	addl	$-8, %r8d
	movl	%r8d, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_aes_wrap_cipher_internal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aes_wrap_cipher_internal
_aes_wrap_cipher_internal:              ; @aes_wrap_cipher_internal
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x4, x3
	mov	x3, x2
	cbz	x2, LBB0_6
; %bb.1:
	cbz	x4, LBB0_5
; %bb.2:
	mov	x2, x1
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w8, [x0]
	tst	x4, #0x7
	b.eq	LBB0_11
; %bb.4:
	cbnz	w8, LBB0_11
LBB0_5:
	mov	w8, #-1
	b	LBB0_17
LBB0_6:
	mov	w8, #0
	b	LBB0_17
LBB0_7:
	mov	w8, #-1
	cmp	x4, #16
	b.lo	LBB0_17
; %bb.8:
	and	x9, x4, #0x7
	cbnz	x9, LBB0_17
; %bb.9:
	cbnz	x2, LBB0_12
; %bb.10:
	sub	w8, w4, #8
	b	LBB0_17
LBB0_11:
	cbz	x2, LBB0_14
LBB0_12:
	ldr	x9, [x0]
	add	x8, x0, #8
	ldr	x10, [x0, #16]
	lsr	x5, x9, #32
	cbz	x10, LBB0_15
; %bb.13:
	ldr	x1, [x8]
	b	LBB0_16
LBB0_14:
	add	w9, w4, #7
	and	w9, w9, #0xfffffff8
	cmp	w8, #0
	csel	w8, w4, w9, eq
	add	w8, w8, #8
	b	LBB0_17
LBB0_15:
	mov	x1, #0
LBB0_16:
	mov	x0, x8
                                        ; kill: def $w5 killed $w5 killed $x5
	blr	x9
	cmp	x0, #0
	csinv	w8, w0, wzr, ne
LBB0_17:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_aes_wrap_cipher_internal
.subsections_via_symbols
