	.file	"extr_sess.c_build_ntlmssp_auth_blob.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Error %d during NTLMSSP authentication"
	.text
	.p2align 4
	.type	build_ntlmssp_auth_blob, @function
build_ntlmssp_auth_blob:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	mov	edx, 8
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR [rdi]
	mov	QWORD PTR [rsp], rsi
	mov	esi, DWORD PTR NTLMSSP_SIGNATURE[rip]
	call	memcpy@PLT
	mov	eax, DWORD PTR NtLmAuthenticate[rip]
	mov	rdx, QWORD PTR 32[rbp]
	mov	edi, DWORD PTR NTLMSSP_NEGOTIATE_56[rip]
	or	edi, DWORD PTR NTLMSSP_REQUEST_TARGET[rip]
	mov	DWORD PTR 160[rbx], eax
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_TARGET_INFO[rip]
	mov	eax, DWORD PTR SECMODE_SIGN_REQUIRED[rip]
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_128[rip]
	or	eax, DWORD PTR SECMODE_SIGN_ENABLED[rip]
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_UNICODE[rip]
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_NTLM[rip]
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_EXTENDED_SEC[rip]
	test	DWORD PTR [rdx], eax
	je	.L2
	mov	eax, DWORD PTR 4[rdx]
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_SIGN[rip]
	test	eax, eax
	je	.L18
.L2:
	call	cpu_to_le32@PLT
	mov	edi, 168
	lea	r15, 168[rbx]
	mov	QWORD PTR 152[rbx], rax
	call	cpu_to_le32@PLT
	mov	edi, 168
	mov	QWORD PTR 136[rbx], 0
	mov	QWORD PTR 144[rbx], rax
	mov	QWORD PTR 128[rbx], 0
	call	cpu_to_le32@PLT
	mov	rsi, r14
	mov	rdi, rbp
	mov	QWORD PTR 120[rbx], rax
	call	setup_ntlmv2_rsp@PLT
	mov	r13d, eax
	test	eax, eax
	jne	.L19
	mov	esi, DWORD PTR CIFS_SESS_KEY_SIZE[rip]
	mov	edx, DWORD PTR 28[rbp]
	mov	rdi, r15
	sub	edx, esi
	add	esi, DWORD PTR 24[rbp]
	call	memcpy@PLT
	mov	edi, DWORD PTR 28[rbp]
	sub	edi, DWORD PTR CIFS_SESS_KEY_SIZE[rip]
	movsx	r12, edi
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR 28[rbp]
	sub	edi, DWORD PTR CIFS_SESS_KEY_SIZE[rip]
	add	r15, r12
	mov	QWORD PTR 112[rbx], rax
	call	cpu_to_le16@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	r8, r15
	mov	QWORD PTR 104[rbx], rax
	sub	r8, rbx
	test	rsi, rsi
	je	.L20
	mov	edx, DWORD PTR MAX_USERNAME_SIZE[rip]
	mov	rcx, r14
	mov	rdi, r15
	mov	QWORD PTR 8[rsp], r8
	call	cifs_strtoUCS@PLT
	mov	r8, QWORD PTR 8[rsp]
	lea	r12d, [rax+rax]
	mov	edi, r8d
	call	cpu_to_le32@PLT
	mov	edi, r12d
	mov	QWORD PTR 96[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, r12d
	movsx	r12, r12d
	mov	QWORD PTR 88[rbx], rax
	add	r15, r12
	call	cpu_to_le16@PLT
	mov	rsi, QWORD PTR 8[rbp]
	mov	r8, r15
	mov	QWORD PTR 80[rbx], rax
	sub	r8, rbx
	test	rsi, rsi
	je	.L21
.L7:
	mov	edx, DWORD PTR MAX_USERNAME_SIZE[rip]
	mov	rcx, r14
	mov	rdi, r15
	mov	QWORD PTR 8[rsp], r8
	call	cifs_strtoUCS@PLT
	mov	r8, QWORD PTR 8[rsp]
	lea	r12d, [rax+rax]
	mov	edi, r8d
	call	cpu_to_le32@PLT
	mov	edi, r12d
	mov	QWORD PTR 72[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, r12d
	mov	QWORD PTR 64[rbx], rax
	call	cpu_to_le16@PLT
	mov	QWORD PTR 56[rbx], rax
	movsx	rax, r12d
	add	r15, rax
.L8:
	mov	rdi, r15
	add	r15, 2
	sub	rdi, rbx
	mov	r14, r15
	call	cpu_to_le32@PLT
	mov	rdx, QWORD PTR 0[rbp]
	sub	r14, rbx
	mov	QWORD PTR 40[rbx], 0
	mov	QWORD PTR 48[rbx], rax
	mov	r12d, r14d
	mov	eax, DWORD PTR NTLMSSP_NEGOTIATE_KEY_XCH[rip]
	mov	QWORD PTR 32[rbx], 0
	or	eax, DWORD PTR NTLMSSP_NEGOTIATE_EXTENDED_SEC[rip]
	test	DWORD PTR [rdx], eax
	je	.L9
	mov	rdi, rbp
	call	calc_seckey@PLT
	test	eax, eax
	je	.L22
.L9:
	mov	edi, r14d
	call	cpu_to_le32@PLT
	mov	QWORD PTR 16[rbx], 0
	mov	QWORD PTR 24[rbx], rax
	mov	QWORD PTR 8[rbx], 0
.L4:
	mov	rax, QWORD PTR [rsp]
	mov	DWORD PTR [rax], r12d
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	or	edi, DWORD PTR NTLMSSP_NEGOTIATE_KEY_XCH[rip]
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edx, eax
	lea	rsi, .LC0[rip]
	mov	edi, 1
	mov	r12d, 168
	call	cERROR@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, r8d
	add	r15, 2
	call	cpu_to_le32@PLT
	mov	rsi, QWORD PTR 8[rbp]
	mov	r8, r15
	mov	QWORD PTR 88[rbx], 0
	mov	QWORD PTR 96[rbx], rax
	sub	r8, rbx
	mov	QWORD PTR 80[rbx], 0
	test	rsi, rsi
	jne	.L7
.L21:
	mov	edi, r8d
	add	r15, 2
	call	cpu_to_le32@PLT
	mov	QWORD PTR 64[rbx], 0
	mov	QWORD PTR 72[rbx], rax
	mov	QWORD PTR 56[rbx], 0
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, QWORD PTR 0[rbp]
	mov	edx, DWORD PTR CIFS_CPHTXT_SIZE[rip]
	mov	rdi, r15
	mov	esi, DWORD PTR 4[rax]
	call	memcpy@PLT
	mov	edi, r14d
	call	cpu_to_le32@PLT
	mov	edi, DWORD PTR CIFS_CPHTXT_SIZE[rip]
	mov	QWORD PTR 24[rbx], rax
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR CIFS_CPHTXT_SIZE[rip]
	mov	QWORD PTR 16[rbx], rax
	call	cpu_to_le16@PLT
	mov	r12d, DWORD PTR CIFS_CPHTXT_SIZE[rip]
	mov	QWORD PTR 8[rbx], rax
	add	r12d, r15d
	sub	r12d, ebx
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	build_ntlmssp_auth_blob, .-build_ntlmssp_auth_blob
	.comm	SECMODE_SIGN_REQUIRED,4,4
	.comm	SECMODE_SIGN_ENABLED,4,4
	.comm	NtLmAuthenticate,4,4
	.comm	NTLMSSP_SIGNATURE,4,4
	.comm	NTLMSSP_REQUEST_TARGET,4,4
	.comm	NTLMSSP_NEGOTIATE_UNICODE,4,4
	.comm	NTLMSSP_NEGOTIATE_TARGET_INFO,4,4
	.comm	NTLMSSP_NEGOTIATE_SIGN,4,4
	.comm	NTLMSSP_NEGOTIATE_NTLM,4,4
	.comm	NTLMSSP_NEGOTIATE_KEY_XCH,4,4
	.comm	NTLMSSP_NEGOTIATE_EXTENDED_SEC,4,4
	.comm	NTLMSSP_NEGOTIATE_56,4,4
	.comm	NTLMSSP_NEGOTIATE_128,4,4
	.comm	MAX_USERNAME_SIZE,4,4
	.comm	CIFS_SESS_KEY_SIZE,4,4
	.comm	CIFS_CPHTXT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sess.c_build_ntlmssp_auth_blob.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Error %d during NTLMSSP authentication\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_ntlmssp_auth_blob, %function
build_ntlmssp_auth_blob:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r2
	mov	r4, r0
	ldr	r2, .L22
	mov	r7, r1
	ldr	r0, [r0]
	ldr	r1, [r2]
	sub	sp, sp, #12
	mov	r2, #8
	mov	r6, r3
	bl	memcpy
	ldr	r1, .L22+4
	ldr	r2, .L22+8
	ldr	r3, .L22+12
	ldr	ip, [r2]
	ldr	r0, [r1]
	ldr	r2, .L22+16
	ldr	r1, [r3]
	ldr	r8, .L22+20
	ldr	r2, [r2]
	orr	r0, r0, ip
	ldr	r3, .L22+24
	ldr	lr, .L22+28
	ldr	r8, [r8]
	orr	r0, r0, r1
	ldr	r1, .L22+32
	ldr	lr, [lr]
	orr	r0, r0, r2
	ldr	r3, [r3]
	ldr	r2, [r5, #20]
	ldr	r1, [r1]
	orr	r0, r0, r8
	ldr	ip, .L22+36
	ldr	r8, .L22+40
	orr	r3, r3, lr
	ldr	lr, [r2]
	orr	r0, r0, r1
	ldr	ip, [ip]
	ldr	r1, [r8]
	tst	r3, lr
	str	ip, [r4, #80]
	orr	r0, r0, r1
	beq	.L2
	ldr	r3, .L22+44
	ldr	r2, [r2, #4]
	ldr	r3, [r3]
	cmp	r2, #0
	orr	r0, r0, r3
	ldreq	r3, .L22+48
	ldreq	r3, [r3]
	orreq	r0, r0, r3
.L2:
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, #84
	str	r3, [r4, #76]
	bl	cpu_to_le32
	mov	r3, #0
	str	r0, [r4, #72]
	str	r3, [r4, #68]
	str	r3, [r4, #64]
	mov	r0, #84
	bl	cpu_to_le32
	mov	r1, r6
	str	r0, [r4, #60]
	mov	r0, r5
	bl	setup_ntlmv2_rsp
	subs	r9, r0, #0
	add	fp, r4, #84
	bne	.L18
	ldr	r10, .L22+52
	ldr	r2, [r5, #16]
	ldr	r3, [r10]
	ldr	r1, [r5, #12]
	sub	r2, r2, r3
	add	r1, r3, r1
	mov	r0, fp
	bl	memcpy
	ldr	r3, [r10]
	ldr	r0, [r5, #16]
	sub	r0, r0, r3
	add	fp, fp, r0
	bl	cpu_to_le16
	ldr	r3, [r10]
	ldr	r2, [r5, #16]
	str	r0, [r4, #56]
	sub	r0, r2, r3
	bl	cpu_to_le16
	ldr	r1, [r5, #8]
	sub	r10, fp, r4
	cmp	r1, #0
	str	r0, [r4, #52]
	beq	.L19
	ldr	r3, .L22+56
	mov	r0, fp
	ldr	r2, [r3]
	mov	r3, r6
	bl	cifs_strtoUCS
	mov	r3, r0
	mov	r0, r10
	lsl	r10, r3, #1
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, r10
	str	r3, [r4, #48]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r10
	str	r3, [r4, #44]
	bl	cpu_to_le16
	ldr	r1, [r5, #4]
	add	fp, fp, r10
	cmp	r1, #0
	str	r0, [r4, #40]
	sub	r10, fp, r4
	beq	.L20
.L7:
	ldr	r2, .L22+56
	mov	r3, r6
	ldr	r2, [r2]
	mov	r0, fp
	bl	cifs_strtoUCS
	mov	r6, r0
	mov	r0, r10
	bl	cpu_to_le32
	mov	r3, r0
	lsl	r6, r6, #1
	mov	r0, r6
	str	r3, [r4, #36]
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r6
	str	r3, [r4, #32]
	bl	cpu_to_le16
	add	r6, fp, r6
	str	r0, [r4, #28]
.L8:
	sub	r0, r6, r4
	bl	cpu_to_le32
	mov	r2, #0
	ldr	r3, .L22+48
	ldr	r1, [r5]
	ldr	ip, [r8]
	ldr	r3, [r3]
	ldr	r1, [r1]
	orr	r3, r3, ip
	add	r6, r6, #2
	tst	r3, r1
	str	r0, [r4, #24]
	sub	r8, r6, r4
	str	r2, [r4, #20]
	str	r2, [r4, #16]
	beq	.L9
	mov	r0, r5
	bl	calc_seckey
	cmp	r0, #0
	beq	.L21
.L9:
.L4:
	mov	r0, r8
	bl	cpu_to_le32
	mov	r3, #0
	str	r0, [r4, #12]
	mov	r0, r9
	str	r3, [r4, #8]
	str	r3, [r4, #4]
	str	r8, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L18:
	mov	r2, r9
	ldr	r1, .L22+60
	mov	r0, #1
	bl	cERROR
	mov	r8, #84
	mov	r0, r9
	str	r8, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	mov	r0, r10
	bl	cpu_to_le32
	ldr	r1, [r5, #4]
	add	fp, fp, #2
	cmp	r1, #0
	str	r9, [r4, #44]
	str	r0, [r4, #48]
	str	r9, [r4, #40]
	sub	r10, fp, r4
	bne	.L7
.L20:
	mov	r0, r10
	str	r1, [sp, #4]
	bl	cpu_to_le32
	ldr	r1, [sp, #4]
	str	r0, [r4, #36]
	str	r1, [r4, #32]
	str	r1, [r4, #28]
	add	r6, fp, #2
	b	.L8
.L21:
	ldr	r3, [r5]
	ldr	r5, .L22+64
	ldr	r1, [r3, #4]
	ldr	r2, [r5]
	mov	r0, r6
	bl	memcpy
	mov	r0, r8
	bl	cpu_to_le32
	mov	r3, r0
	ldr	r0, [r5]
	str	r3, [r4, #12]
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r0, [r5]
	str	r3, [r4, #8]
	bl	cpu_to_le16
	str	r0, [r4, #4]
	mov	r0, r9
	ldr	r8, [r5]
	add	r6, r6, r8
	sub	r8, r6, r4
	str	r8, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	.align	2
.L22:
	.word	NTLMSSP_SIGNATURE
	.word	NTLMSSP_NEGOTIATE_56
	.word	NTLMSSP_REQUEST_TARGET
	.word	NTLMSSP_NEGOTIATE_TARGET_INFO
	.word	NTLMSSP_NEGOTIATE_128
	.word	NTLMSSP_NEGOTIATE_UNICODE
	.word	SECMODE_SIGN_REQUIRED
	.word	SECMODE_SIGN_ENABLED
	.word	NTLMSSP_NEGOTIATE_NTLM
	.word	NtLmAuthenticate
	.word	NTLMSSP_NEGOTIATE_EXTENDED_SEC
	.word	NTLMSSP_NEGOTIATE_SIGN
	.word	NTLMSSP_NEGOTIATE_KEY_XCH
	.word	CIFS_SESS_KEY_SIZE
	.word	MAX_USERNAME_SIZE
	.word	.LC0
	.word	CIFS_CPHTXT_SIZE
	.size	build_ntlmssp_auth_blob, .-build_ntlmssp_auth_blob
	.comm	SECMODE_SIGN_REQUIRED,4,4
	.comm	SECMODE_SIGN_ENABLED,4,4
	.comm	NtLmAuthenticate,4,4
	.comm	NTLMSSP_SIGNATURE,4,4
	.comm	NTLMSSP_REQUEST_TARGET,4,4
	.comm	NTLMSSP_NEGOTIATE_UNICODE,4,4
	.comm	NTLMSSP_NEGOTIATE_TARGET_INFO,4,4
	.comm	NTLMSSP_NEGOTIATE_SIGN,4,4
	.comm	NTLMSSP_NEGOTIATE_NTLM,4,4
	.comm	NTLMSSP_NEGOTIATE_KEY_XCH,4,4
	.comm	NTLMSSP_NEGOTIATE_EXTENDED_SEC,4,4
	.comm	NTLMSSP_NEGOTIATE_56,4,4
	.comm	NTLMSSP_NEGOTIATE_128,4,4
	.comm	MAX_USERNAME_SIZE,4,4
	.comm	CIFS_SESS_KEY_SIZE,4,4
	.comm	CIFS_CPHTXT_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
