	.file	"extr_hooks.c_selinux_inode_setxattr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"op=setxattr invalid_context="
	.text
	.p2align 4
	.type	selinux_inode_setxattr, @function
selinux_inode_setxattr:
.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, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	call	d_backing_inode@PLT
	mov	r15, rax
	xor	eax, eax
	call	current_sid@PLT
	mov	esi, DWORD PTR XATTR_NAME_SELINUX[rip]
	mov	rdi, r12
	mov	DWORD PTR 4[rsp], eax
	call	strcmp@PLT
	test	rax, rax
	jne	.L13
	mov	rax, QWORD PTR [r15]
	mov	rbx, QWORD PTR [rax]
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR SBLABEL_MNT[rip], eax
	jne	.L4
	mov	r12d, DWORD PTR EOPNOTSUPP[rip]
	neg	r12d
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L4:
	.cfi_restore_state
	mov	rdi, r15
	call	inode_owner_or_capable@PLT
	test	eax, eax
	jne	.L5
	mov	r12d, DWORD PTR EPERM[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rsi, r12
	mov	r8d, ebx
	mov	rcx, r13
	mov	rdx, r14
	mov	rdi, rbp
	call	cap_inode_setxattr@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	r12d, DWORD PTR FILE__SETATTR[rip]
	xor	eax, eax
	call	current_cred@PLT
	mov	rsi, rbp
	mov	edx, r12d
	mov	edi, eax
	call	dentry_has_perm@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR LSM_AUDIT_DATA_DENTRY[rip]
	mov	rdi, rbp
	mov	QWORD PTR 32[rsp], rbp
	lea	r15, 32[rsp]
	mov	DWORD PTR 40[rsp], eax
	call	backing_inode_security@PLT
	mov	r8d, DWORD PTR FILE__RELABELFROM[rip]
	mov	esi, DWORD PTR 4[rsp]
	mov	r9, r15
	mov	edx, DWORD PTR 4[rax]
	mov	ecx, DWORD PTR [rax]
	lea	rdi, selinux_state[rip]
	mov	rbp, rax
	call	avc_has_perm@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	r8d, DWORD PTR GFP_KERNEL[rip]
	lea	rcx, 28[rsp]
	mov	rdx, r13
	mov	rsi, r14
	lea	rdi, selinux_state[rip]
	mov	QWORD PTR 8[rsp], rcx
	call	security_context_to_sid@PLT
	mov	r12d, eax
	add	eax, DWORD PTR EINVAL[rip]
	je	.L15
.L6:
	test	r12d, r12d
	jne	.L1
	mov	r14d, DWORD PTR 4[rsp]
	mov	r8d, DWORD PTR FILE__RELABELTO[rip]
	mov	r9, r15
	lea	rdi, selinux_state[rip]
	mov	ecx, DWORD PTR 0[rbp]
	mov	edx, DWORD PTR 28[rsp]
	mov	esi, r14d
	call	avc_has_perm@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	esi, DWORD PTR 4[rbp]
	mov	r8d, DWORD PTR 0[rbp]
	mov	ecx, r14d
	lea	rdi, selinux_state[rip]
	mov	edx, DWORD PTR 28[rsp]
	call	security_validate_transition@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	edx, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR FILESYSTEM__ASSOCIATE[rip]
	mov	r9, r15
	lea	rdi, selinux_state[rip]
	mov	ecx, DWORD PTR SECCLASS_FILESYSTEM[rip]
	mov	esi, DWORD PTR 28[rsp]
	call	avc_has_perm@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, 1
	call	has_cap_mac_admin@PLT
	mov	rcx, QWORD PTR 8[rsp]
	test	eax, eax
	jne	.L7
	test	r14, r14
	je	.L10
	lea	rax, -1[r13]
	cmp	BYTE PTR -1[r14+r13], 0
	cmove	r13, rax
.L8:
	mov	r15d, DWORD PTR AUDIT_SELINUX_ERR[rip]
	mov	ebp, DWORD PTR GFP_ATOMIC[rip]
	xor	eax, eax
	call	audit_context@PLT
	mov	edi, eax
	mov	edx, r15d
	mov	esi, ebp
	call	audit_log_start@PLT
	lea	rsi, .LC0[rip]
	mov	rbp, rax
	mov	rdi, rax
	call	audit_log_format@PLT
	mov	rdi, rbp
	mov	rdx, r13
	mov	rsi, r14
	call	audit_log_n_untrustedstring@PLT
	mov	rdi, rbp
	call	audit_log_end@PLT
	jmp	.L1
.L7:
	mov	rdx, r13
	mov	rsi, r14
	lea	rdi, selinux_state[rip]
	call	security_context_to_sid_force@PLT
	mov	r12d, eax
	jmp	.L6
.L10:
	xor	r13d, r13d
	jmp	.L8
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	selinux_inode_setxattr, .-selinux_inode_setxattr
	.comm	selinux_state,4,4
	.comm	XATTR_NAME_SELINUX,4,4
	.comm	SECCLASS_FILESYSTEM,4,4
	.comm	SBLABEL_MNT,4,4
	.comm	LSM_AUDIT_DATA_DENTRY,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FILE__SETATTR,4,4
	.comm	FILE__RELABELTO,4,4
	.comm	FILE__RELABELFROM,4,4
	.comm	FILESYSTEM__ASSOCIATE,4,4
	.comm	EPERM,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	AUDIT_SELINUX_ERR,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_hooks.c_selinux_inode_setxattr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"op=setxattr invalid_context=\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	selinux_inode_setxattr, %function
selinux_inode_setxattr:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r3
	ldr	r3, .L16
	sub	sp, sp, #24
	mov	r4, r1
	mov	r7, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r5, r0
	bl	d_backing_inode
	mov	r8, r0
	bl	current_sid
	ldr	r2, .L16+4
	mov	r9, r0
	ldr	r1, [r2]
	mov	r0, r4
	bl	strcmp
	cmp	r0, #0
	bne	.L13
	ldr	r2, [r8]
	ldr	r3, .L16+8
	ldr	r10, [r2]
	ldr	r3, [r3]
	ldr	r2, [r10]
	tst	r2, r3
	bne	.L4
	ldr	r3, .L16+12
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r4
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r0, r8
	bl	inode_owner_or_capable
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L16+16
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L13:
	ldr	r3, [sp, #56]
	mov	r1, r4
	str	r3, [sp]
	mov	r2, r7
	mov	r3, r6
	mov	r0, r5
	bl	cap_inode_setxattr
	subs	r4, r0, #0
	bne	.L1
	bl	current_cred
	ldr	r3, .L16+20
	mov	r1, r5
	ldr	r2, [r3]
	bl	dentry_has_perm
	mov	r4, r0
	b	.L1
.L5:
	ldr	r3, .L16+24
	mov	r0, r5
	ldr	r3, [r3]
	str	r5, [sp, #12]
	str	r3, [sp, #16]
	bl	backing_inode_security
	ldr	r1, .L16+28
	ldr	r3, [r0]
	ldr	r1, [r1]
	ldr	r2, [r0, #4]
	str	r1, [sp]
	add	r1, sp, #12
	str	r1, [sp, #4]
	mov	r5, r0
	mov	r1, r9
	ldr	r0, .L16+32
	bl	avc_has_perm
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L16+36
	mov	r1, r7
	ldr	r2, [r3]
	ldr	r0, .L16+32
	add	r3, sp, #8
	str	r2, [sp]
	mov	r2, r6
	bl	security_context_to_sid
	ldr	r3, .L16+40
	mov	r4, r0
	ldr	r3, [r3]
	cmn	r0, r3
	beq	.L15
.L6:
	cmp	r4, #0
	bne	.L1
	ldr	r2, .L16+44
	ldr	r3, [r5]
	ldr	r2, [r2]
	mov	r1, r9
	str	r2, [sp]
	add	r2, sp, #12
	str	r2, [sp, #4]
	ldr	r0, .L16+32
	ldr	r2, [sp, #8]
	bl	avc_has_perm
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, [r5]
	ldr	r1, [r5, #4]
	mov	r3, r9
	str	r2, [sp]
	ldr	r0, .L16+32
	ldr	r2, [sp, #8]
	bl	security_validate_transition
	subs	r4, r0, #0
	bne	.L1
	ldr	r3, .L16+48
	add	r0, sp, #12
	ldr	r1, [r3]
	ldr	r3, .L16+52
	ldr	r2, [r10, #4]
	str	r0, [sp, #4]
	str	r1, [sp]
	ldr	r3, [r3]
	ldr	r1, [sp, #8]
	ldr	r0, .L16+32
	bl	avc_has_perm
	mov	r4, r0
	b	.L1
.L15:
	mov	r0, #1
	bl	has_cap_mac_admin
	cmp	r0, #0
	bne	.L7
	cmp	r7, #0
	moveq	r6, r7
	beq	.L8
	sub	r3, r6, #1
	ldrb	r2, [r7, r3]	@ zero_extendqisi2
	cmp	r2, #0
	moveq	r6, r3
.L8:
	bl	audit_context
	ldr	r3, .L16+56
	ldr	r2, .L16+60
	ldr	r1, [r3]
	ldr	r2, [r2]
	bl	audit_log_start
	mov	r5, r0
	ldr	r1, .L16+64
	bl	audit_log_format
	mov	r2, r6
	mov	r1, r7
	mov	r0, r5
	bl	audit_log_n_untrustedstring
	mov	r0, r5
	bl	audit_log_end
	b	.L1
.L7:
	mov	r2, r6
	mov	r1, r7
	ldr	r0, .L16+32
	add	r3, sp, #8
	bl	security_context_to_sid_force
	mov	r4, r0
	b	.L6
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC1
	.word	XATTR_NAME_SELINUX
	.word	SBLABEL_MNT
	.word	EOPNOTSUPP
	.word	EPERM
	.word	FILE__SETATTR
	.word	LSM_AUDIT_DATA_DENTRY
	.word	FILE__RELABELFROM
	.word	selinux_state
	.word	GFP_KERNEL
	.word	EINVAL
	.word	FILE__RELABELTO
	.word	FILESYSTEM__ASSOCIATE
	.word	SECCLASS_FILESYSTEM
	.word	GFP_ATOMIC
	.word	AUDIT_SELINUX_ERR
	.word	.LC0
	.size	selinux_inode_setxattr, .-selinux_inode_setxattr
	.comm	selinux_state,4,4
	.comm	XATTR_NAME_SELINUX,4,4
	.comm	SECCLASS_FILESYSTEM,4,4
	.comm	SBLABEL_MNT,4,4
	.comm	LSM_AUDIT_DATA_DENTRY,4,4
	.comm	GFP_KERNEL,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FILE__SETATTR,4,4
	.comm	FILE__RELABELTO,4,4
	.comm	FILE__RELABELFROM,4,4
	.comm	FILESYSTEM__ASSOCIATE,4,4
	.comm	EPERM,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	AUDIT_SELINUX_ERR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
