	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kek_wrap_key
_kek_wrap_key:                          ## @kek_wrap_key
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %rdi
	callq	_EVP_CIPHER_CTX_block_size
	movq	%rax, %rcx
	leaq	(%r14,%rax), %rbx
	addq	$3, %rbx
	movq	%rbx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_3
LBB0_2:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_3:
	xorl	%eax, %eax
	cmpq	$255, %r14
	ja	LBB0_13
## %bb.4:
	subq	%rdx, %rbx
	addq	%rcx, %rcx
	cmpq	%rcx, %rbx
	jb	LBB0_13
## %bb.5:
	testq	%r12, %r12
	je	LBB0_10
## %bb.6:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	leaq	4(%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movb	%r14b, (%r12)
	movb	(%r15), %al
	notb	%al
	movb	%al, 1(%r12)
	movb	1(%r15), %al
	notb	%al
	movb	%al, 2(%r12)
	movb	2(%r15), %al
	notb	%al
	movb	%al, 3(%r12)
	leaq	4(%r12), %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	cmpq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	jbe	LBB0_8
## %bb.7:
	addq	%r14, %r13
	movq	%rbx, %rsi
	subq	%r14, %rsi
	addq	$-4, %rsi
	movq	%r13, %rdi
	callq	_RAND_bytes
	testq	%rax, %rax
	jle	LBB0_12
LBB0_8:
	leaq	-44(%rbp), %rdx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r12, %rcx
	movq	%rbx, %r8
	callq	_EVP_EncryptUpdate
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	leaq	-44(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r12, %rcx
	movq	%rbx, %r8
	callq	_EVP_EncryptUpdate
	testl	%eax, %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	$0, %eax
	je	LBB0_13
LBB0_10:
	movq	%rbx, (%r13)
	movl	$1, %eax
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_kek_wrap_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kek_wrap_key
_kek_wrap_key:                          ; @kek_wrap_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x4
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x4
	bl	_EVP_CIPHER_CTX_block_size
	mov	x8, x0
	mov	w0, #0
	cmp	x23, #255
	b.hi	LBB0_8
; %bb.1:
	add	x9, x23, x8
	add	x9, x9, #3
	udiv	x9, x9, x8
	mul	x22, x9, x8
	lsl	x8, x8, #1
	cmp	x22, x8
	b.lo	LBB0_8
; %bb.2:
	cbz	x21, LBB0_7
; %bb.3:
	add	x26, x23, #4
	strb	w23, [x21]
	ldrb	w8, [x24]
	mvn	w8, w8
	strb	w8, [x21, #1]
	ldrb	w8, [x24, #1]
	mvn	w8, w8
	strb	w8, [x21, #2]
	ldrb	w8, [x24, #2]
	mvn	w8, w8
	strb	w8, [x21, #3]
	add	x25, x21, #4
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
	cmp	x22, x26
	b.ls	LBB0_5
; %bb.4:
	add	x0, x25, x23
	sub	x8, x22, x23
	sub	x1, x8, #4
	bl	_RAND_bytes
	cmp	x0, #1
	b.lt	LBB0_9
LBB0_5:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	mov	x3, x21
	mov	x4, x22
	bl	_EVP_EncryptUpdate
	cbz	w0, LBB0_8
; %bb.6:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	mov	x3, x21
	mov	x4, x22
	bl	_EVP_EncryptUpdate
	cbz	w0, LBB0_8
LBB0_7:
	str	x22, [x19]
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_9:
	mov	w0, #0
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_kek_wrap_key
.subsections_via_symbols
