	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_keyex_wrap           ## -- Begin function heim_ntlm_keyex_wrap
	.p2align	4, 0x90
_heim_ntlm_keyex_wrap:                  ## @heim_ntlm_keyex_wrap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_MD4_DIGEST_LENGTH@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	%rdi, (%rsi)
	callq	_malloc
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	(%rbx), %rdi
	movq	%rdi, (%r14)
	callq	_malloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	xorl	%eax, %eax
	callq	_EVP_CIPHER_CTX_new
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_EVP_rc4
	movq	8(%r12), %rcx
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	movl	$1, %r9d
	callq	_EVP_CipherInit_ex
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.4:
	movq	(%r13), %rsi
	movq	8(%r13), %rdi
	callq	_RAND_bytes
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.5:
	movq	(%r14), %rcx
	movq	8(%r14), %rsi
	movq	8(%r13), %rdx
	movq	%r15, %rdi
	callq	_EVP_Cipher
	movq	%r15, %rdi
	callq	_EVP_CIPHER_CTX_free
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	movq	$0, (%r13)
	jmp	LBB0_9
LBB0_7:
	movq	%r13, %rdi
	callq	_heim_ntlm_free_buf
	movq	$0, (%r14)
	jmp	LBB0_9
LBB0_8:
	movq	%r14, %rdi
	callq	_heim_ntlm_free_buf
	movq	%r13, %rdi
	callq	_heim_ntlm_free_buf
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r15, %rdi
	callq	_EVP_CIPHER_CTX_free
	movq	%r14, %rdi
	callq	_heim_ntlm_free_buf
	movq	%r13, %rdi
	callq	_heim_ntlm_free_buf
	movq	_HNTLM_ERR_CRYPTO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movq	%r15, %rdi
	callq	_EVP_CIPHER_CTX_free
	movq	%r14, %rdi
	callq	_heim_ntlm_free_buf
	movq	%r13, %rdi
	callq	_heim_ntlm_free_buf
	movq	_HNTLM_ERR_RAND@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MD4_DIGEST_LENGTH,8,3          ## @MD4_DIGEST_LENGTH
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HNTLM_ERR_CRYPTO,4,2           ## @HNTLM_ERR_CRYPTO
	.comm	_HNTLM_ERR_RAND,4,2             ## @HNTLM_ERR_RAND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_keyex_wrap           ; -- Begin function heim_ntlm_keyex_wrap
	.p2align	2
_heim_ntlm_keyex_wrap:                  ; @heim_ntlm_keyex_wrap
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
Lloh0:
	adrp	x21, _MD4_DIGEST_LENGTH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MD4_DIGEST_LENGTH@GOTPAGEOFF]
	ldr	x0, [x21]
	str	x0, [x1]
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	x0, [x21]
	str	x0, [x20]
	bl	_malloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_7
; %bb.2:
	bl	_EVP_CIPHER_CTX_new
	cbz	x0, LBB0_8
; %bb.3:
	mov	x21, x0
	bl	_EVP_rc4
	mov	x1, x0
	ldr	x3, [x22, #8]
	mov	x0, x21
	mov	x2, #0
	mov	x4, #0
	mov	w5, #1
	bl	_EVP_CipherInit_ex
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.4:
	ldp	x1, x0, [x19]
	bl	_RAND_bytes
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.5:
	ldr	x2, [x19, #8]
	ldp	x3, x1, [x20]
	mov	x0, x21
	bl	_EVP_Cipher
	mov	x0, x21
	bl	_EVP_CIPHER_CTX_free
	mov	w0, #0
	b	LBB0_11
LBB0_6:
	str	xzr, [x19]
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	bl	_heim_ntlm_free_buf
	str	xzr, [x20]
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	_heim_ntlm_free_buf
	mov	x0, x19
	bl	_heim_ntlm_free_buf
LBB0_9:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x21
	bl	_EVP_CIPHER_CTX_free
	mov	x0, x20
	bl	_heim_ntlm_free_buf
	mov	x0, x19
	bl	_heim_ntlm_free_buf
Lloh4:
	adrp	x8, _HNTLM_ERR_CRYPTO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HNTLM_ERR_CRYPTO@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
	mov	x0, x21
	bl	_EVP_CIPHER_CTX_free
	mov	x0, x20
	bl	_heim_ntlm_free_buf
	mov	x0, x19
	bl	_heim_ntlm_free_buf
Lloh6:
	adrp	x8, _HNTLM_ERR_RAND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HNTLM_ERR_RAND@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MD4_DIGEST_LENGTH,8,3          ; @MD4_DIGEST_LENGTH
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HNTLM_ERR_CRYPTO,4,2           ; @HNTLM_ERR_CRYPTO
	.comm	_HNTLM_ERR_RAND,4,2             ; @HNTLM_ERR_RAND
.subsections_via_symbols
