	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_verify_ntlm2         ## -- Begin function heim_ntlm_verify_ntlm2
	.p2align	4, 0x90
_heim_ntlm_verify_ntlm2:                ## @heim_ntlm_verify_ntlm2
	.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	$72, %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	24(%rbp), %rcx
	movq	16(%rbp), %rdx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, (%rcx)
	movq	$0, 8(%rcx)
	cmpl	$15, (%rdx)
	jg	LBB0_2
## %bb.1:
	movq	_HNTLM_ERR_INVALID_LENGTH@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_2:
	movq	%r8, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	32(%rbp), %r8
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	callq	_time
	movq	32(%rbp), %r8
	movq	%rax, %rbx
LBB0_4:
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_heim_ntlm_ntlmv2_key
	movq	16(%rbp), %r12
	movq	8(%r12), %rdi
	movl	(%r12), %esi
	callq	_krb5_storage_from_readonly_mem
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	_KRB5_STORAGE_BYTEORDER_LE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_krb5_storage_set_flags
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_krb5_storage_read
	movl	%eax, %edi
	movl	$16, %esi
	callq	_CHECK
	leaq	-100(%rbp), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_krb5_ret_uint32
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_CHECK
	movl	-100(%rbp), %edi
	movl	$257, %esi                      ## imm = 0x101
	callq	_CHECK
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_krb5_ret_uint32
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_CHECK
	movl	-100(%rbp), %edi
	xorl	%esi, %esi
	callq	_CHECK
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_krb5_ret_uint32
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_CHECK
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_krb5_ret_uint32
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_CHECK
	callq	_nt2unixtime
	subl	%ebx, %eax
	movl	%eax, %edi
	callq	_abs
	movq	_authtimediff@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
## %bb.7:
	movq	_HNTLM_ERR_TIME_SKEW@GOTPCREL(%rip), %rax
	movq	24(%rbp), %rdi
	jmp	LBB0_8
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %ebx
	jmp	LBB0_19
LBB0_9:
	leaq	-72(%rbp), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_krb5_storage_read
	movl	%eax, %edi
	movl	$8, %esi
	callq	_CHECK
	leaq	-100(%rbp), %rsi
	movq	%r14, %rdi
	callq	_krb5_ret_uint32
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_CHECK
	movl	(%r12), %ebx
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_krb5_storage_seek
	subl	%eax, %ebx
	movq	24(%rbp), %r15
	movl	%ebx, (%r15)
	movl	%ebx, %edi
	callq	_malloc
	movq	%r15, %rdi
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	(%rdi), %edx
	movq	%rdi, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_krb5_storage_read
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_CHECK
	movq	%r14, %rdi
	callq	_krb5_storage_free
	movl	(%r12), %edx
	cmpl	$15, %edx
	jg	LBB0_14
## %bb.12:
	movq	_HNTLM_ERR_INVALID_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
	callq	_heim_ntlm_free_buf
	movq	%r14, %rdi
	callq	_krb5_storage_free
	jmp	LBB0_19
LBB0_14:
	movq	8(%r12), %rsi
	addq	$16, %rsi
	addl	$-16, %edx
	leaq	-96(%rbp), %r8
	movq	32(%rbp), %rdi
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	callq	_heim_ntlm_derive_ntlm2_sess
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_15
LBB0_13:
	movq	24(%rbp), %rdi
	callq	_heim_ntlm_free_buf
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	-96(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	movl	$16, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movq	24(%rbp), %rdi
	callq	_heim_ntlm_free_buf
	movq	_HNTLM_ERR_AUTH@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_16:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HNTLM_ERR_INVALID_LENGTH,4,2   ## @HNTLM_ERR_INVALID_LENGTH
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KRB5_STORAGE_BYTEORDER_LE,4,2  ## @KRB5_STORAGE_BYTEORDER_LE
	.comm	_authtimediff,8,3               ## @authtimediff
	.comm	_HNTLM_ERR_TIME_SKEW,4,2        ## @HNTLM_ERR_TIME_SKEW
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_HNTLM_ERR_AUTH,4,2             ## @HNTLM_ERR_AUTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_heim_ntlm_verify_ntlm2         ; -- Begin function heim_ntlm_verify_ntlm2
	.p2align	2
_heim_ntlm_verify_ntlm2:                ; @heim_ntlm_verify_ntlm2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	str	wzr, [x7]
	str	xzr, [x7, #8]
	ldr	w8, [x6]
	cmp	w8, #15
	b.gt	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HNTLM_ERR_INVALID_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HNTLM_ERR_INVALID_LENGTH@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	mov	x19, x7
	mov	x21, x6
	mov	x20, x5
	mov	x24, x4
	mov	x23, x3
	mov	x25, x2
	mov	x26, x1
	mov	x27, x0
	ldr	x22, [x29, #16]
	cbnz	x4, LBB0_4
; %bb.3:
	mov	x0, #0
	bl	_time
	mov	x24, x0
LBB0_4:
	mov	x0, x27
	mov	x1, x26
	mov	x2, x25
	mov	x3, x23
	mov	x4, x22
	bl	_heim_ntlm_ntlmv2_key
	ldr	x0, [x21, #8]
	ldr	w1, [x21]
	bl	_krb5_storage_from_readonly_mem
	cbz	x0, LBB0_7
; %bb.5:
	mov	x23, x0
Lloh5:
	adrp	x8, _KRB5_STORAGE_BYTEORDER_LE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KRB5_STORAGE_BYTEORDER_LE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_krb5_storage_set_flags
	add	x1, sp, #40
	mov	x0, x23
	mov	w2, #16
	bl	_krb5_storage_read
	mov	w1, #16
	bl	_CHECK
	add	x1, sp, #12
	mov	x0, x23
	bl	_krb5_ret_uint32
	mov	w1, #0
	bl	_CHECK
	ldr	w0, [sp, #12]
	mov	w1, #257
	bl	_CHECK
	add	x1, sp, #12
	mov	x0, x23
	bl	_krb5_ret_uint32
	mov	w1, #0
	bl	_CHECK
	ldr	w0, [sp, #12]
	mov	w1, #0
	bl	_CHECK
	add	x1, sp, #12
	mov	x0, x23
	bl	_krb5_ret_uint32
	mov	w1, #0
	bl	_CHECK
	add	x1, sp, #12
	mov	x0, x23
	bl	_krb5_ret_uint32
	mov	w1, #0
	bl	_CHECK
	bl	_nt2unixtime
	sub	w0, w0, w24
	bl	_abs
Lloh8:
	adrp	x8, _authtimediff@GOTPAGE
Lloh9:
	ldr	x8, [x8, _authtimediff@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_9
; %bb.6:
Lloh11:
	adrp	x8, _HNTLM_ERR_TIME_SKEW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HNTLM_ERR_TIME_SKEW@GOTPAGEOFF]
	b	LBB0_13
LBB0_7:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w20, [x8]
	b	LBB0_16
LBB0_9:
	add	x1, sp, #32
	mov	x0, x23
	mov	w2, #8
	bl	_krb5_storage_read
	mov	w1, #8
	bl	_CHECK
	add	x1, sp, #12
	mov	x0, x23
	bl	_krb5_ret_uint32
	mov	w1, #0
	bl	_CHECK
	ldr	w24, [x21]
Lloh15:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #0
	bl	_krb5_storage_seek
	sub	w0, w24, w0
	str	w0, [x19]
	bl	_malloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_12
; %bb.10:
	mov	x1, x0
	ldr	w2, [x19]
	mov	x0, x23
	bl	_krb5_storage_read
	ldr	w1, [x19]
	bl	_CHECK
	mov	x0, x23
	bl	_krb5_storage_free
	ldr	w8, [x21]
	cmp	w8, #15
	b.gt	LBB0_14
; %bb.11:
Lloh18:
	adrp	x8, _HNTLM_ERR_INVALID_LENGTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HNTLM_ERR_INVALID_LENGTH@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_12:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_13:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_heim_ntlm_free_buf
	mov	x0, x23
	bl	_krb5_storage_free
	b	LBB0_16
LBB0_14:
	ldr	x9, [x21, #8]
	add	x1, x9, #16
	sub	w2, w8, #16
	add	x4, sp, #16
	mov	x0, x22
	mov	x3, x20
	bl	_heim_ntlm_derive_ntlm2_sess
	mov	x20, x0
	cbz	w0, LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_heim_ntlm_free_buf
LBB0_16:
	ldr	x8, [sp, #56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.17:
	mov	x0, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_18:
	add	x0, sp, #16
	add	x1, sp, #40
	mov	w2, #16
	bl	_memcmp
	cbz	x0, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_heim_ntlm_free_buf
Lloh26:
	adrp	x8, _HNTLM_ERR_AUTH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _HNTLM_ERR_AUTH@GOTPAGEOFF]
	b	LBB0_8
LBB0_20:
	mov	w20, #0
	b	LBB0_16
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HNTLM_ERR_INVALID_LENGTH,4,2   ; @HNTLM_ERR_INVALID_LENGTH
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KRB5_STORAGE_BYTEORDER_LE,4,2  ; @KRB5_STORAGE_BYTEORDER_LE
	.comm	_authtimediff,8,3               ; @authtimediff
	.comm	_HNTLM_ERR_TIME_SKEW,4,2        ; @HNTLM_ERR_TIME_SKEW
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_HNTLM_ERR_AUTH,4,2             ; @HNTLM_ERR_AUTH
.subsections_via_symbols
