	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_calculate_lm2        ## -- Begin function heim_ntlm_calculate_lm2
	.p2align	4, 0x90
_heim_ntlm_calculate_lm2:               ## @heim_ntlm_calculate_lm2
	.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
	movq	%r9, %r15
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-56(%rbp), %rdi
	movl	$8, %esi
	callq	_RAND_bytes
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.1:
	movq	16(%rbp), %rax
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rbx
	movq	%r13, %rdx
	movq	%r12, %rcx
	movq	%r15, %r8
	callq	_heim_ntlm_ntlmv2_key
	movl	$24, %edi
	callq	_malloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	$24, (%rbx)
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	$8, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r8
	callq	_heim_ntlm_derive_ntlm2_sess
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	8(%rbx), %rdi
	addq	$64, %rdi
	leaq	-56(%rbp), %rsi
	movl	$8, %edx
	callq	_memcpy
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movq	_HNTLM_ERR_RAND@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HNTLM_ERR_RAND,4,2             ## @HNTLM_ERR_RAND
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_calculate_lm2        ; -- Begin function heim_ntlm_calculate_lm2
	.p2align	2
_heim_ntlm_calculate_lm2:               ; @heim_ntlm_calculate_lm2
	.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	x19, x6
	mov	x21, x5
	mov	x20, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x25, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	x0, sp
	mov	w1, #8
	bl	_RAND_bytes
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
	mov	x0, x25
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_heim_ntlm_ntlmv2_key
	mov	w22, #24
	mov	w0, #24
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x4, x0
	str	w22, [x19]
	mov	x1, sp
	mov	x0, x21
	mov	w2, #8
	mov	x3, x20
	bl	_heim_ntlm_derive_ntlm2_sess
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	x8, [x19, #8]
	add	x0, x8, #64
	mov	x1, sp
	mov	w2, #8
	bl	_memcpy
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh3:
	adrp	x8, _HNTLM_ERR_RAND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNTLM_ERR_RAND@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
LBB0_7:
	ldr	x8, [sp, #8]
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_9
; %bb.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:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_HNTLM_ERR_RAND,4,2             ; @HNTLM_ERR_RAND
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
