	.file	"extr_dm-ioctl.c___dev_status.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__dev_status, @function
__dev_status:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	dm_disk@PLT
	mov	rdi, rbp
	mov	r12, rax
	mov	eax, DWORD PTR DM_SUSPEND_FLAG[rip]
	or	eax, DWORD PTR DM_READONLY_FLAG[rip]
	or	eax, DWORD PTR DM_ACTIVE_PRESENT_FLAG[rip]
	or	eax, DWORD PTR DM_INTERNAL_SUSPEND_FLAG[rip]
	not	eax
	and	DWORD PTR [rbx], eax
	call	dm_suspended_md@PLT
	test	rax, rax
	je	.L2
	mov	eax, DWORD PTR DM_SUSPEND_FLAG[rip]
	or	DWORD PTR [rbx], eax
.L2:
	mov	rdi, rbp
	call	dm_suspended_internally_md@PLT
	test	rax, rax
	je	.L3
	mov	eax, DWORD PTR DM_INTERNAL_SUSPEND_FLAG[rip]
	or	DWORD PTR [rbx], eax
.L3:
	mov	rdi, rbp
	call	dm_test_deferred_remove_flag@PLT
	test	rax, rax
	je	.L4
	mov	eax, DWORD PTR DM_DEFERRED_REMOVE[rip]
	or	DWORD PTR [rbx], eax
.L4:
	mov	rdi, r12
	call	disk_devt@PLT
	mov	edi, eax
	call	huge_encode_dev@PLT
	mov	rdi, rbp
	mov	DWORD PTR 24[rbx], eax
	call	dm_open_count@PLT
	mov	rdi, rbp
	mov	DWORD PTR 20[rbx], eax
	call	dm_get_event_nr@PLT
	mov	QWORD PTR 8[rbx], 0
	mov	rsi, rsp
	mov	rdi, rbp
	mov	DWORD PTR 16[rbx], eax
	call	dm_get_live_table@PLT
	mov	r13, rax
	test	rax, rax
	je	.L5
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR DM_QUERY_INACTIVE_TABLE_FLAG[rip], eax
	je	.L35
.L6:
	or	eax, DWORD PTR DM_ACTIVE_PRESENT_FLAG[rip]
	mov	DWORD PTR [rbx], eax
.L5:
	mov	esi, DWORD PTR [rsp]
	mov	rdi, rbp
	call	dm_put_live_table@PLT
	mov	eax, DWORD PTR [rbx]
	test	DWORD PTR DM_QUERY_INACTIVE_TABLE_FLAG[rip], eax
	jne	.L36
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L37
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	mov	rdi, r12
	call	get_disk_ro@PLT
	test	rax, rax
	je	.L7
	mov	eax, DWORD PTR DM_READONLY_FLAG[rip]
	or	DWORD PTR [rbx], eax
.L7:
	mov	rdi, r13
	call	dm_table_get_num_targets@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	eax, DWORD PTR [rbx]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L36:
	lea	rsi, 4[rsp]
	mov	rdi, rbp
	call	dm_get_inactive_table@PLT
	mov	r12, rax
	test	rax, rax
	je	.L9
	mov	rdi, rax
	call	dm_table_get_mode@PLT
	test	DWORD PTR FMODE_WRITE[rip], eax
	jne	.L10
	mov	eax, DWORD PTR DM_READONLY_FLAG[rip]
	or	DWORD PTR [rbx], eax
.L10:
	mov	rdi, r12
	call	dm_table_get_num_targets@PLT
	mov	QWORD PTR 8[rbx], rax
.L9:
	mov	esi, DWORD PTR 4[rsp]
	mov	rdi, rbp
	call	dm_put_live_table@PLT
	jmp	.L1
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	__dev_status, .-__dev_status
	.comm	FMODE_WRITE,4,4
	.comm	DM_SUSPEND_FLAG,4,4
	.comm	DM_READONLY_FLAG,4,4
	.comm	DM_QUERY_INACTIVE_TABLE_FLAG,4,4
	.comm	DM_INTERNAL_SUSPEND_FLAG,4,4
	.comm	DM_DEFERRED_REMOVE,4,4
	.comm	DM_ACTIVE_PRESENT_FLAG,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_dm-ioctl.c___dev_status.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__dev_status, %function
__dev_status:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r1
	ldr	r3, .L38
	sub	sp, sp, #16
	mov	r5, r0
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	bl	dm_disk
	ldr	r9, .L38+4
	ldr	r8, .L38+8
	ldr	r6, .L38+12
	ldr	r3, [r9]
	ldr	r1, [r8]
	ldr	r7, .L38+16
	ldr	r2, [r6]
	orr	r3, r3, r1
	ldr	r1, [r7]
	orr	r3, r3, r2
	ldr	r2, [r4]
	orr	r3, r3, r1
	bic	r3, r2, r3
	str	r3, [r4]
	mov	r10, r0
	mov	r0, r5
	bl	dm_suspended_md
	cmp	r0, #0
	ldrne	r2, [r9]
	ldrne	r3, [r4]
	mov	r0, r5
	orrne	r3, r3, r2
	strne	r3, [r4]
	bl	dm_suspended_internally_md
	cmp	r0, #0
	ldrne	r2, [r7]
	ldrne	r3, [r4]
	mov	r0, r5
	orrne	r3, r3, r2
	strne	r3, [r4]
	bl	dm_test_deferred_remove_flag
	cmp	r0, #0
	ldrne	r2, .L38+20
	ldrne	r3, [r4]
	ldrne	r2, [r2]
	mov	r0, r10
	orrne	r3, r3, r2
	strne	r3, [r4]
	bl	disk_devt
	bl	huge_encode_dev
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #16]
	bl	dm_open_count
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #12]
	bl	dm_get_event_nr
	mov	r3, #0
	str	r0, [r4, #8]
	str	r3, [r4, #4]
	mov	r0, r5
	add	r1, sp, #4
	bl	dm_get_live_table
	subs	r7, r0, #0
	ldr	r9, .L38+24
	beq	.L5
	ldr	r2, [r4]
	ldr	r3, [r9]
	tst	r2, r3
	beq	.L35
.L6:
	ldr	r3, [r6]
	orr	r3, r3, r2
	str	r3, [r4]
.L5:
	mov	r0, r5
	ldr	r1, [sp, #4]
	bl	dm_put_live_table
	ldr	r3, [r9]
	ldr	r2, [r4]
	tst	r2, r3
	bne	.L36
.L1:
	ldr	r3, .L38
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L37
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L35:
	mov	r0, r10
	bl	get_disk_ro
	cmp	r0, #0
	ldrne	r2, [r8]
	ldrne	r3, [r4]
	mov	r0, r7
	orrne	r3, r3, r2
	strne	r3, [r4]
	bl	dm_table_get_num_targets
	ldr	r2, [r4]
	str	r0, [r4, #4]
	b	.L6
.L36:
	mov	r0, r5
	add	r1, sp, #8
	bl	dm_get_inactive_table
	subs	r6, r0, #0
	beq	.L9
	bl	dm_table_get_mode
	ldr	r3, .L38+28
	ldr	r3, [r3]
	tst	r0, r3
	ldreq	r2, [r8]
	ldreq	r3, [r4]
	mov	r0, r6
	orreq	r3, r3, r2
	streq	r3, [r4]
	bl	dm_table_get_num_targets
	str	r0, [r4, #4]
.L9:
	mov	r0, r5
	ldr	r1, [sp, #8]
	bl	dm_put_live_table
	b	.L1
.L37:
	bl	__stack_chk_fail
.L39:
	.align	2
.L38:
	.word	.LC0
	.word	DM_SUSPEND_FLAG
	.word	DM_READONLY_FLAG
	.word	DM_ACTIVE_PRESENT_FLAG
	.word	DM_INTERNAL_SUSPEND_FLAG
	.word	DM_DEFERRED_REMOVE
	.word	DM_QUERY_INACTIVE_TABLE_FLAG
	.word	FMODE_WRITE
	.size	__dev_status, .-__dev_status
	.comm	FMODE_WRITE,4,4
	.comm	DM_SUSPEND_FLAG,4,4
	.comm	DM_READONLY_FLAG,4,4
	.comm	DM_QUERY_INACTIVE_TABLE_FLAG,4,4
	.comm	DM_INTERNAL_SUSPEND_FLAG,4,4
	.comm	DM_DEFERRED_REMOVE,4,4
	.comm	DM_ACTIVE_PRESENT_FLAG,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
