	.file	"extr_md.c_kern_mdattach_locked.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	kern_mdattach_locked, @function
kern_mdattach_locked:
.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
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	lea	rdi, md_sx[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR SA_XLOCKED[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	sx_assert@PLT
	mov	edx, DWORD PTR 24[rbp]
	lea	eax, -128[rdx]
	cmp	eax, 4
	ja	.L5
	mov	ebx, DWORD PTR 0[rbp]
	test	ebx, ebx
	cmove	ebx, DWORD PTR DEV_BSIZE[rip]
	cmp	DWORD PTR MAXPHYS[rip], ebx
	jb	.L5
	cmp	DWORD PTR 4[rbp], ebx
	jb	.L5
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR MD_AUTOUNIT[rip], eax
	jne	.L29
	mov	edi, DWORD PTR 12[rbp]
	cmp	edi, DWORD PTR INT_MAX[rip]
	jg	.L5
	lea	rsi, 4[rsp]
	call	mdnew@PLT
	mov	r14, rax
.L8:
	test	r14, r14
	je	.L27
	mov	rdi, QWORD PTR 16[rbp]
	test	rdi, rdi
	je	.L30
	mov	esi, DWORD PTR 20[r14]
	xor	ecx, ecx
	mov	edx, 4
	call	copyinstr@PLT
	mov	DWORD PTR 4[rsp], eax
.L11:
	test	eax, eax
	jne	.L21
	mov	eax, DWORD PTR 8[rbp]
	test	DWORD PTR MD_AUTOUNIT[rip], eax
	jne	.L31
.L13:
	mov	eax, DWORD PTR 4[rbp]
	mov	r13d, DWORD PTR EDOOFUS[rip]
	mov	DWORD PTR 8[r14], ebx
	mov	DWORD PTR 4[r14], eax
	mov	eax, DWORD PTR 12[r14]
	mov	DWORD PTR 4[rsp], r13d
	add	eax, -128
	cmp	eax, 4
	ja	.L14
	lea	rdx, .L16[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L16:
	.long	.L20-.L16
	.long	.L19-.L16
	.long	.L18-.L16
	.long	.L17-.L16
	.long	.L15-.L16
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r13d, DWORD PTR EINVAL[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L32
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 40
	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
.L29:
	.cfi_restore_state
	lea	rsi, 4[rsp]
	mov	edi, -1
	call	mdnew@PLT
	mov	r14, rax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	mov	eax, DWORD PTR mdstart_null[rip]
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r14
	mov	DWORD PTR 16[r14], eax
	call	mdcreate_null@PLT
	mov	DWORD PTR 4[rsp], eax
	mov	r13d, eax
.L14:
	test	r13d, r13d
	jne	.L21
	mov	ecx, DWORD PTR 4[r14]
	xor	edx, edx
	mov	rdi, r14
	mov	eax, ecx
	div	DWORD PTR 8[r14]
	sub	ecx, edx
	mov	DWORD PTR 4[r14], ecx
	call	mdinit@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rsi, r12
	mov	rdi, r14
	call	mddestroy@PLT
.L27:
	mov	r13d, DWORD PTR 4[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	eax, DWORD PTR 4[rsp]
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L31:
	mov	eax, DWORD PTR [r14]
	mov	DWORD PTR 12[rbp], eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r13d, DWORD PTR EOPNOTSUPP[rip]
	mov	DWORD PTR 4[rsp], r13d
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L19:
	mov	eax, DWORD PTR mdstart_swap[rip]
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r14
	mov	DWORD PTR 16[r14], eax
	call	mdcreate_swap@PLT
	mov	DWORD PTR 4[rsp], eax
	mov	r13d, eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR mdstart_vnode[rip]
	mov	rdx, r12
	mov	rsi, rbp
	mov	rdi, r14
	mov	DWORD PTR 16[r14], eax
	call	mdcreate_vnode@PLT
	mov	DWORD PTR 4[rsp], eax
	mov	r13d, eax
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, DWORD PTR mdstart_malloc[rip]
	mov	rsi, rbp
	mov	rdi, r14
	mov	DWORD PTR 16[r14], eax
	call	mdcreate_malloc@PLT
	mov	DWORD PTR 4[rsp], eax
	mov	r13d, eax
	jmp	.L14
.L32:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	kern_mdattach_locked, .-kern_mdattach_locked
	.comm	mdstart_vnode,4,4
	.comm	mdstart_swap,4,4
	.comm	mdstart_null,4,4
	.comm	mdstart_malloc,4,4
	.comm	md_sx,4,4
	.comm	SA_XLOCKED,4,4
	.comm	MD_AUTOUNIT,4,4
	.comm	MAXPHYS,4,4
	.comm	INT_MAX,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	EDOOFUS,4,4
	.comm	DEV_BSIZE,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_md.c_kern_mdattach_locked.c"
	.text
	.global	__aeabi_uidivmod
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	kern_mdattach_locked, %function
kern_mdattach_locked:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r1
	ldr	r3, .L32
	sub	sp, sp, #8
	ldr	r1, [r3]
	ldr	r3, .L32+4
	mov	r7, r0
	ldr	r0, .L32+8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	sx_assert
	ldr	r2, [r4, #20]
	sub	r3, r2, #128
	cmp	r3, #4
	bhi	.L5
	ldr	r6, [r4]
	cmp	r6, #0
	ldreq	r3, .L32+12
	ldreq	r6, [r3]
	ldr	r3, .L32+16
	ldr	r3, [r3]
	cmp	r3, r6
	bcc	.L5
	ldr	r3, [r4, #4]
	cmp	r3, r6
	bcc	.L5
	ldr	r5, .L32+20
	ldr	r1, [r4, #8]
	ldr	r3, [r5]
	tst	r1, r3
	bne	.L29
	ldr	r3, .L32+24
	ldr	r0, [r4, #12]
	ldr	r3, [r3]
	cmp	r0, r3
	bgt	.L5
	mov	r1, sp
	bl	mdnew
	mov	r8, r0
.L8:
	cmp	r8, #0
	beq	.L27
	ldr	r0, [r4, #16]
	cmp	r0, #0
	beq	.L30
	mov	r3, #0
	mov	r2, #4
	ldr	r1, [r8, #20]
	bl	copyinstr
	str	r0, [sp]
.L11:
	cmp	r0, #0
	bne	.L21
	ldr	r3, [r5]
	ldr	r2, [r4, #8]
	tst	r2, r3
	ldrne	r3, [r8]
	ldr	r2, .L32+28
	strne	r3, [r4, #12]
	ldr	r3, [r8, #12]
	ldr	r5, [r2]
	ldr	r2, [r4, #4]
	sub	r3, r3, #128
	stmib	r8, {r2, r6}
	str	r5, [sp]
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L14
.L16:
	.word	.L20
	.word	.L19
	.word	.L18
	.word	.L17
	.word	.L15
.L5:
	ldr	r3, .L32+32
	ldr	r5, [r3]
.L1:
	ldr	r3, .L32+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L29:
	mov	r1, sp
	mvn	r0, #0
	bl	mdnew
	mov	r8, r0
	b	.L8
.L17:
	ldr	r3, .L32+36
	mov	r1, r4
	ldr	r3, [r3]
	mov	r2, r7
	mov	r0, r8
	str	r3, [r8, #16]
	bl	mdcreate_null
	mov	r5, r0
	str	r0, [sp]
.L14:
	cmp	r5, #0
	bne	.L21
	ldr	r4, [r8, #4]
	ldr	r1, [r8, #8]
	mov	r0, r4
	bl	__aeabi_uidivmod
	sub	r4, r4, r1
	mov	r0, r8
	str	r4, [r8, #4]
	bl	mdinit
	b	.L1
.L21:
	mov	r1, r7
	mov	r0, r8
	bl	mddestroy
.L27:
	ldr	r5, [sp]
	b	.L1
.L30:
	ldr	r0, [sp]
	b	.L11
.L15:
	ldr	r3, .L32+40
	mov	r1, r4
	ldr	r3, [r3]
	mov	r0, r8
	str	r3, [r8, #16]
	bl	mdcreate_malloc
	mov	r5, r0
	str	r0, [sp]
	b	.L14
.L18:
	ldr	r3, .L32+44
	ldr	r5, [r3]
	str	r5, [sp]
	b	.L14
.L19:
	ldr	r3, .L32+48
	mov	r1, r4
	ldr	r3, [r3]
	mov	r2, r7
	mov	r0, r8
	str	r3, [r8, #16]
	bl	mdcreate_swap
	mov	r5, r0
	str	r0, [sp]
	b	.L14
.L20:
	ldr	r3, .L32+52
	mov	r1, r4
	ldr	r3, [r3]
	mov	r2, r7
	mov	r0, r8
	str	r3, [r8, #16]
	bl	mdcreate_vnode
	mov	r5, r0
	str	r0, [sp]
	b	.L14
.L31:
	bl	__stack_chk_fail
.L33:
	.align	2
.L32:
	.word	SA_XLOCKED
	.word	.LC0
	.word	md_sx
	.word	DEV_BSIZE
	.word	MAXPHYS
	.word	MD_AUTOUNIT
	.word	INT_MAX
	.word	EDOOFUS
	.word	EINVAL
	.word	mdstart_null
	.word	mdstart_malloc
	.word	EOPNOTSUPP
	.word	mdstart_swap
	.word	mdstart_vnode
	.size	kern_mdattach_locked, .-kern_mdattach_locked
	.comm	mdstart_vnode,4,4
	.comm	mdstart_swap,4,4
	.comm	mdstart_null,4,4
	.comm	mdstart_malloc,4,4
	.comm	md_sx,4,4
	.comm	SA_XLOCKED,4,4
	.comm	MD_AUTOUNIT,4,4
	.comm	MAXPHYS,4,4
	.comm	INT_MAX,4,4
	.comm	EOPNOTSUPP,4,4
	.comm	EINVAL,4,4
	.comm	EDOOFUS,4,4
	.comm	DEV_BSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
