	.file	"extr_auth.c_nfsd_setuser.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nfsd_setuser
	.type	nfsd_setuser, @function
nfsd_setuser:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	call	nfsexp_flags@PLT
	mov	r12d, eax
	xor	eax, eax
	call	validate_process_creds@PLT
	xor	eax, eax
	call	current_real_cred@PLT
	mov	edi, eax
	call	get_cred@PLT
	mov	edi, eax
	call	revert_creds@PLT
	xor	eax, eax
	call	prepare_creds@PLT
	test	rax, rax
	je	.L38
	mov	edi, DWORD PTR 12[rbx]
	mov	rbp, rax
	mov	DWORD PTR 8[rax], edi
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 12[rbp], eax
	test	DWORD PTR NFSEXP_ALLSQUASH[rip], r12d
	jne	.L40
	mov	r14, QWORD PTR [rbx]
	test	DWORD PTR NFSEXP_ROOTSQUASH[rip], r12d
	jne	.L41
	mov	rdi, r14
	call	get_group_info@PLT
	mov	r12, rax
.L6:
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR INVALID_UID[rip]
	call	uid_eq@PLT
	test	rax, rax
	je	.L14
	mov	eax, DWORD PTR 4[r13]
	mov	DWORD PTR 8[rbp], eax
.L14:
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR INVALID_GID[rip]
	call	gid_eq@PLT
	test	rax, rax
	je	.L15
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR 12[rbp], eax
.L15:
	mov	rsi, r12
	mov	rdi, rbp
	call	set_groups@PLT
	mov	rdi, r12
	call	put_group_info@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	esi, DWORD PTR GLOBAL_ROOT_UID[rip]
	call	uid_eq@PLT
	mov	edi, DWORD PTR 4[rbp]
	test	rax, rax
	jne	.L16
	call	cap_drop_nfsd_set@PLT
	mov	DWORD PTR 4[rbp], eax
.L17:
	xor	eax, eax
	call	validate_process_creds@PLT
	mov	rdi, rbp
	call	override_creds@PLT
	mov	rdi, rax
	call	put_cred@PLT
	mov	rdi, rbp
	call	put_cred@PLT
	xor	eax, eax
	call	validate_process_creds@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L41:
	.cfi_restore_state
	mov	esi, DWORD PTR GLOBAL_ROOT_UID[rip]
	call	uid_eq@PLT
	test	rax, rax
	je	.L8
	mov	eax, DWORD PTR 4[r13]
	mov	DWORD PTR 8[rbp], eax
.L8:
	mov	edi, DWORD PTR 12[rbp]
	mov	esi, DWORD PTR GLOBAL_ROOT_GID[rip]
	call	gid_eq@PLT
	test	rax, rax
	jne	.L42
.L9:
	mov	edi, DWORD PTR [r14]
	call	groups_alloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR [r14]
	test	eax, eax
	jle	.L10
	xor	ebx, ebx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L43:
	mov	edx, DWORD PTR 0[r13]
	mov	rax, QWORD PTR 8[r12]
	mov	DWORD PTR [rax+rbx*4], edx
	add	rbx, 1
	cmp	DWORD PTR [r14], ebx
	jle	.L10
.L13:
	mov	rax, QWORD PTR 8[r14]
	mov	edi, DWORD PTR GLOBAL_ROOT_GID[rip]
	mov	esi, DWORD PTR [rax+rbx*4]
	call	gid_eq@PLT
	test	rax, rax
	jne	.L43
	mov	rax, QWORD PTR 8[r14]
	mov	edx, DWORD PTR [rax+rbx*4]
	mov	rax, QWORD PTR 8[r12]
	mov	DWORD PTR [rax+rbx*4], edx
	add	rbx, 1
	cmp	DWORD PTR [r14], ebx
	jg	.L13
.L10:
	mov	rdi, r12
	call	groups_sort@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, DWORD PTR 0[rbp]
	call	cap_raise_nfsd_set@PLT
	mov	DWORD PTR 4[rbp], eax
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L40:
	mov	eax, DWORD PTR 4[r13]
	xor	edi, edi
	mov	DWORD PTR 8[rbp], eax
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR 12[rbp], eax
	call	groups_alloc@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L6
.L5:
	mov	rdi, rbp
	call	abort_creds@PLT
.L38:
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L42:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[r13]
	mov	DWORD PTR 12[rbp], eax
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	nfsd_setuser, .-nfsd_setuser
	.comm	NFSEXP_ROOTSQUASH,4,4
	.comm	NFSEXP_ALLSQUASH,4,4
	.comm	INVALID_UID,4,4
	.comm	INVALID_GID,4,4
	.comm	GLOBAL_ROOT_UID,4,4
	.comm	GLOBAL_ROOT_GID,4,4
	.comm	ENOMEM,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_auth.c_nfsd_setuser.c"
	.text
	.align	2
	.global	nfsd_setuser
	.syntax unified
	.arm
	.fpu softvfp
	.type	nfsd_setuser, %function
nfsd_setuser:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r8, r1
	mov	r7, r0
	bl	nfsexp_flags
	mov	r6, r0
	bl	validate_process_creds
	bl	current_real_cred
	bl	get_cred
	bl	revert_creds
	bl	prepare_creds
	subs	r4, r0, #0
	beq	.L39
	ldr	r3, .L43
	ldr	r0, [r7, #8]
	ldr	r5, [r3]
	ldr	r3, [r7, #4]
	ands	r5, r6, r5
	str	r0, [r4, #8]
	str	r3, [r4, #12]
	bne	.L41
	ldr	r3, .L43+4
	ldr	r7, [r7]
	ldr	r3, [r3]
	tst	r6, r3
	bne	.L42
	mov	r0, r7
	bl	get_group_info
	mov	r6, r0
.L38:
	ldr	r10, .L43+8
.L6:
	ldr	r3, .L43+12
	ldr	r0, [r4, #8]
	ldr	r1, [r3]
	bl	uid_eq
	cmp	r0, #0
	ldrne	r3, [r8, #4]
	ldr	r0, [r4, #12]
	strne	r3, [r4, #8]
	ldr	r3, .L43+16
	ldr	r1, [r3]
	bl	gid_eq
	cmp	r0, #0
	ldrne	r3, [r8]
	mov	r1, r6
	strne	r3, [r4, #12]
	mov	r0, r4
	bl	set_groups
	mov	r0, r6
	bl	put_group_info
	ldr	r1, [r10]
	ldr	r0, [r4, #8]
	bl	uid_eq
	cmp	r0, #0
	bne	.L16
	ldr	r0, [r4, #4]
	bl	cap_drop_nfsd_set
	str	r0, [r4, #4]
.L17:
	bl	validate_process_creds
	mov	r0, r4
	bl	override_creds
	bl	put_cred
	mov	r0, r4
	bl	put_cred
	bl	validate_process_creds
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L42:
	ldr	r10, .L43+8
	ldr	r9, .L43+20
	ldr	r1, [r10]
	bl	uid_eq
	cmp	r0, #0
	ldrne	r3, [r8, #4]
	ldr	r1, [r9]
	strne	r3, [r4, #8]
	ldr	r0, [r4, #12]
	bl	gid_eq
	cmp	r0, #0
	ldrne	r3, [r8]
	ldr	r0, [r7]
	strne	r3, [r4, #12]
	bl	groups_alloc
	subs	r6, r0, #0
	beq	.L5
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L10
.L13:
	ldr	r3, [r7, #4]
	ldr	r0, [r9]
	ldr	r1, [r3, r5, lsl #2]
	bl	gid_eq
	cmp	r0, #0
	ldreq	r2, [r7, #4]
	ldrne	r3, [r6, #4]
	ldreq	r3, [r6, #4]
	ldreq	r2, [r2, r5, lsl #2]
	ldrne	r2, [r8]
	str	r2, [r3, r5, lsl #2]
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L13
.L10:
	mov	r0, r6
	bl	groups_sort
	b	.L6
.L16:
	ldr	r1, [r4]
	ldr	r0, [r4, #4]
	bl	cap_raise_nfsd_set
	str	r0, [r4, #4]
	b	.L17
.L41:
	ldr	r2, [r8, #4]
	ldr	r3, [r8]
	mov	r0, #0
	str	r2, [r4, #8]
	str	r3, [r4, #12]
	bl	groups_alloc
	subs	r6, r0, #0
	bne	.L38
.L5:
	mov	r0, r4
	bl	abort_creds
.L39:
	ldr	r3, .L43+24
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L44:
	.align	2
.L43:
	.word	NFSEXP_ALLSQUASH
	.word	NFSEXP_ROOTSQUASH
	.word	GLOBAL_ROOT_UID
	.word	INVALID_UID
	.word	INVALID_GID
	.word	GLOBAL_ROOT_GID
	.word	ENOMEM
	.size	nfsd_setuser, .-nfsd_setuser
	.comm	NFSEXP_ROOTSQUASH,4,4
	.comm	NFSEXP_ALLSQUASH,4,4
	.comm	INVALID_UID,4,4
	.comm	INVALID_GID,4,4
	.comm	GLOBAL_ROOT_UID,4,4
	.comm	GLOBAL_ROOT_GID,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
