	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_crypt_v2_wrap_client_key
_tls_crypt_v2_wrap_client_key:          ## @tls_crypt_v2_wrap_client_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	%r8, %r13
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %rdi
	movq	_TLS_CRYPT_V2_MAX_WKC_LEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	callq	_cipher_ctx_block_size
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_alloc_buf_gc
	movl	%eax, -48(%rbp)
	movq	_TLS_CRYPT_TAG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdi
	callq	_buf_write_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_BLEN
	cltq
	movq	_TLS_CRYPT_V2_TAG_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$12, %rdi
	callq	_htons
	movl	%eax, -52(%rbp)
	movq	(%r12), %rbx
	movq	%rbx, %rdi
	callq	_hmac_ctx_reset
	leaq	-52(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_hmac_ctx_update
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_hmac_ctx_update
	movq	%r14, %rdi
	callq	_BPTR
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_BLEN
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_hmac_ctx_update
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hmac_ctx_final
	movq	_D_CRYPTO_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_TLS_CRYPT_TAG_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%r13, %rcx
	callq	_format_hex
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_dmsg
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_cipher_ctx_reset
	movl	%eax, %edi
	callq	_ASSERT
	leaq	-48(%rbp), %rdi
	callq	_buf_forward_capacity
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_BLEN
	movslq	%eax, %rbx
	movq	%r13, %rdi
	callq	_cipher_ctx_block_size
	addq	%rbx, %rax
	addq	$12, %rax
	cmpq	%rax, %r15
	jae	LBB0_4
## %bb.3:
	movq	_M_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_msg
	jmp	LBB0_5
LBB0_1:
	movq	_M_WARN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_msg
	xorl	%r12d, %r12d
	jmp	LBB0_5
LBB0_4:
	movl	$0, -44(%rbp)
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	callq	_BEND
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	leaq	-44(%rbp), %rdx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$8, %r8d
	callq	_cipher_ctx_update
	movl	%eax, %edi
	callq	_ASSERT
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_buf_inc_len
	movl	%eax, %edi
	callq	_ASSERT
	movq	%r13, %rdi
	callq	_BEND
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_BPTR
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_BLEN
	movq	%r15, %rdi
	movl	%r12d, %esi
	leaq	-44(%rbp), %r14
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movl	%eax, %r8d
	callq	_cipher_ctx_update
	movl	%eax, %edi
	callq	_ASSERT
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_buf_inc_len
	movl	%eax, %edi
	callq	_ASSERT
	movq	%r13, %rdi
	callq	_BEND
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_cipher_ctx_final
	movl	%eax, %edi
	callq	_ASSERT
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_buf_inc_len
	movl	%eax, %edi
	callq	_ASSERT
	leaq	-52(%rbp), %rsi
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_buf_write
	movl	%eax, %edi
	callq	_ASSERT
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_buf_copy
	movl	%eax, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_CRYPT_V2_MAX_WKC_LEN,8,3   ## @TLS_CRYPT_V2_MAX_WKC_LEN
	.comm	_TLS_CRYPT_TAG_SIZE,4,2         ## @TLS_CRYPT_TAG_SIZE
	.comm	_M_WARN,4,2                     ## @M_WARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: could not write tag"

	.comm	_TLS_CRYPT_V2_TAG_SIZE,8,3      ## @TLS_CRYPT_V2_TAG_SIZE
	.comm	_D_CRYPTO_DEBUG,4,2             ## @D_CRYPTO_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"TLS-CRYPT WRAP TAG: %s"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR: could not crypt: insufficient space in dst"

	.no_dead_strip	_tls_crypt_v2_wrap_client_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_crypt_v2_wrap_client_key
_tls_crypt_v2_wrap_client_key:          ; @tls_crypt_v2_wrap_client_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x25, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x3, #8]
Lloh0:
	adrp	x8, _TLS_CRYPT_V2_MAX_WKC_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TLS_CRYPT_V2_MAX_WKC_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	mov	x0, x20
	bl	_cipher_ctx_block_size
	add	x0, x0, x24
	mov	x1, x23
	bl	_alloc_buf_gc
	str	w0, [sp, #8]
Lloh3:
	adrp	x27, _TLS_CRYPT_TAG_SIZE@GOTPAGE
Lloh4:
	ldr	x27, [x27, _TLS_CRYPT_TAG_SIZE@GOTPAGEOFF]
	ldr	w1, [x27]
	add	x0, sp, #8
	bl	_buf_write_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x24, x0
	mov	x0, x21
	bl	_BLEN
Lloh5:
	adrp	x8, _TLS_CRYPT_V2_TAG_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TLS_CRYPT_V2_TAG_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x8, x8, w0, sxtw
	add	x0, x8, #12
	bl	_htons
	str	w0, [sp, #4]
	ldr	x25, [x25]
	mov	x0, x25
	bl	_hmac_ctx_reset
	add	x1, sp, #4
	mov	x0, x25
	mov	w2, #4
	bl	_hmac_ctx_update
	ldr	x1, [x22]
	mov	x0, x25
	mov	w2, #8
	bl	_hmac_ctx_update
	mov	x0, x21
	bl	_BPTR
	mov	x26, x0
	mov	x0, x21
	bl	_BLEN
	mov	x2, x0
	mov	x0, x25
	mov	x1, x26
	bl	_hmac_ctx_update
	mov	x0, x25
	mov	x1, x24
	bl	_hmac_ctx_final
Lloh8:
	adrp	x8, _D_CRYPTO_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _D_CRYPTO_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w25, [x8]
	ldr	w1, [x27]
	mov	x0, x24
	mov	w2, #0
	mov	x3, x23
	bl	_format_hex
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x25
	bl	_dmsg
	mov	x0, x20
	mov	x1, x24
	bl	_cipher_ctx_reset
	bl	_ASSERT
	add	x0, sp, #8
	bl	_buf_forward_capacity
	mov	x23, x0
	mov	x0, x21
	bl	_BLEN
	mov	x24, x0
	mov	x0, x20
	bl	_cipher_ctx_block_size
	add	x8, x0, w24, sxtw
	add	x8, x8, #12
	cmp	x23, x8
	b.hs	LBB0_5
; %bb.2:
Lloh13:
	adrp	x8, _M_WARN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _M_WARN@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh18:
	adrp	x8, _M_WARN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _M_WARN@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_msg
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	str	wzr, [sp]
	add	x0, sp, #8
	bl	_BEND
	mov	x1, x0
	ldr	x3, [x22]
	mov	x2, sp
	mov	x0, x20
	mov	w4, #8
	bl	_cipher_ctx_update
	bl	_ASSERT
	ldr	w1, [sp]
	add	x0, sp, #8
	bl	_buf_inc_len
	bl	_ASSERT
	add	x0, sp, #8
	bl	_BEND
	mov	x22, x0
	mov	x0, x21
	bl	_BPTR
	mov	x23, x0
	mov	x0, x21
	bl	_BLEN
	mov	x4, x0
	mov	x2, sp
	mov	x0, x20
	mov	x1, x22
	mov	x3, x23
	bl	_cipher_ctx_update
	bl	_ASSERT
	ldr	w1, [sp]
	add	x0, sp, #8
	bl	_buf_inc_len
	bl	_ASSERT
	add	x0, sp, #8
	bl	_BEND
	mov	x1, x0
	mov	x2, sp
	mov	x0, x20
	bl	_cipher_ctx_final
	bl	_ASSERT
	ldr	w1, [sp]
	add	x0, sp, #8
	bl	_buf_inc_len
	bl	_ASSERT
	add	x0, sp, #8
	add	x1, sp, #4
	mov	w2, #4
	bl	_buf_write
	bl	_ASSERT
	add	x1, sp, #8
	mov	x0, x19
	bl	_buf_copy
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_CRYPT_V2_MAX_WKC_LEN,8,3   ; @TLS_CRYPT_V2_MAX_WKC_LEN
	.comm	_TLS_CRYPT_TAG_SIZE,4,2         ; @TLS_CRYPT_TAG_SIZE
	.comm	_M_WARN,4,2                     ; @M_WARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: could not write tag"

	.comm	_TLS_CRYPT_V2_TAG_SIZE,8,3      ; @TLS_CRYPT_V2_TAG_SIZE
	.comm	_D_CRYPTO_DEBUG,4,2             ; @D_CRYPTO_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"TLS-CRYPT WRAP TAG: %s"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR: could not crypt: insufficient space in dst"

	.no_dead_strip	_tls_crypt_v2_wrap_client_key
.subsections_via_symbols
