	.file	"extr_dasd_eckd.c_dasd_eckd_reserve.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dasd_eckd_reserve, @function
dasd_eckd_reserve:
.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
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR CAP_SYS_ADMIN[rip]
	call	capable@PLT
	test	eax, eax
	jne	.L2
	mov	r13d, DWORD PTR EACCES[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r13d
	pop	r12
	.cfi_def_cfa_offset 16
	mov	eax, r13d
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	edi, DWORD PTR DASD_ECKD_MAGIC[rip]
	mov	rcx, r12
	mov	edx, 32
	mov	esi, 1
	call	dasd_smalloc_request@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L4
	mov	rdx, QWORD PTR 48[rbp]
	mov	rax, QWORD PTR 72[rbp]
	xor	ebx, ebx
.L5:
	mov	ecx, DWORD PTR DASD_ECKD_CCW_RESERVE[rip]
	mov	QWORD PTR 56[rax], rdx
	lea	r13, 32[rbp]
	mov	edi, DWORD PTR DASD_CQR_FLAGS_USE_ERP[rip]
	mov	rsi, r13
	mov	DWORD PTR 64[rax], ecx
	mov	ecx, DWORD PTR CCW_FLAG_SLI[rip]
	or	DWORD PTR 32[rax], ecx
	mov	DWORD PTR [rax], 32
	mov	QWORD PTR 40[rbp], r12
	mov	QWORD PTR 16[rbp], r12
	call	clear_bit@PLT
	mov	edi, DWORD PTR DASD_CQR_FLAGS_FAILFAST[rip]
	mov	rsi, r13
	call	set_bit@PLT
	mov	eax, DWORD PTR HZ[rip]
	mov	DWORD PTR 4[rbp], 2
	add	eax, eax
	mov	DWORD PTR 8[rbp], eax
	xor	eax, eax
	call	get_clock@PLT
	mov	rdi, rbp
	mov	DWORD PTR 28[rbp], eax
	mov	eax, DWORD PTR DASD_CQR_FILLED[rip]
	mov	DWORD PTR 24[rbp], eax
	call	dasd_sleep_on_immediatly@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L10
.L6:
	test	ebx, ebx
	je	.L7
	lea	rdi, dasd_reserve_mutex[rip]
	call	mutex_unlock@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L7:
	.cfi_restore_state
	mov	rsi, QWORD PTR 16[rbp]
	mov	rdi, rbp
	call	dasd_sfree_request@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r13d
	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
.L4:
	.cfi_restore_state
	lea	rdi, dasd_reserve_mutex[rip]
	call	mutex_lock@PLT
	mov	rbx, QWORD PTR dasd_reserve_req[rip]
	mov	edx, 88
	xor	esi, esi
	lea	rbp, 96[rbx]
	mov	rdi, rbp
	call	memset@PLT
	mov	rax, QWORD PTR dasd_reserve_req[rip]
	mov	edx, 88
	xor	esi, esi
	lea	rdi, 8[rax]
	call	memset@PLT
	mov	rdx, QWORD PTR dasd_reserve_req[rip]
	mov	ecx, DWORD PTR DASD_ECKD_MAGIC[rip]
	lea	rax, 8[rdx]
	mov	QWORD PTR 144[rbx], rdx
	mov	QWORD PTR 168[rbx], rax
	mov	DWORD PTR 176[rbx], ecx
	mov	ebx, 1
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L10:
	mov	edi, DWORD PTR DASD_FLAG_IS_RESERVED[rip]
	mov	rsi, r12
	call	set_bit@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	dasd_eckd_reserve, .-dasd_eckd_reserve
	.comm	dasd_reserve_req,8,8
	.comm	dasd_reserve_mutex,4,4
	.comm	HZ,4,4
	.comm	EACCES,4,4
	.comm	DASD_FLAG_IS_RESERVED,4,4
	.comm	DASD_ECKD_MAGIC,4,4
	.comm	DASD_ECKD_CCW_RESERVE,4,4
	.comm	DASD_CQR_FLAGS_USE_ERP,4,4
	.comm	DASD_CQR_FLAGS_FAILFAST,4,4
	.comm	DASD_CQR_FILLED,4,4
	.comm	CCW_FLAG_SLI,4,4
	.comm	CAP_SYS_ADMIN,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_dasd_eckd.c_dasd_eckd_reserve.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dasd_eckd_reserve, %function
dasd_eckd_reserve:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L11
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, [r3]
	bl	capable
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L11+4
	ldr	r6, [r3]
	rsb	r6, r6, #0
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	ldr	r8, .L11+8
	mov	r3, r5
	mov	r2, #32
	mov	r1, #1
	ldr	r0, [r8]
	bl	dasd_smalloc_request
	mov	r4, r0
	bl	IS_ERR
	subs	r7, r0, #0
	bne	.L4
	ldr	r2, [r4, #32]
	ldr	r6, [r4, #44]
.L5:
	mov	r0, #32
	ldr	r3, .L11+12
	ldr	r1, .L11+16
	ldr	ip, [r3]
	ldr	r1, [r1]
	ldr	r3, [r6, #24]
	str	ip, [r6, #40]
	orr	r3, r3, r1
	add	r1, r4, #24
	str	r2, [r6, #36]
	str	r3, [r6, #24]
	str	r0, [r6]
	mov	r6, r1
	ldr	r2, .L11+20
	str	r5, [r4, #28]
	ldr	r0, [r2]
	str	r5, [r4, #12]
	bl	clear_bit
	ldr	r3, .L11+24
	mov	r1, r6
	ldr	r0, [r3]
	bl	set_bit
	mov	r2, #2
	ldr	r3, .L11+28
	str	r2, [r4, #4]
	ldr	r3, [r3]
	lsl	r3, r3, #1
	str	r3, [r4, #8]
	bl	get_clock
	ldr	r3, .L11+32
	str	r0, [r4, #20]
	ldr	r3, [r3]
	mov	r0, r4
	str	r3, [r4, #16]
	bl	dasd_sleep_on_immediatly
	subs	r6, r0, #0
	beq	.L10
.L6:
	cmp	r7, #0
	beq	.L7
	ldr	r0, .L11+36
	bl	mutex_unlock
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L7:
	mov	r0, r4
	ldr	r1, [r4, #12]
	bl	dasd_sfree_request
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r0, .L11+36
	bl	mutex_lock
	ldr	r3, .L11+40
	mov	r2, #52
	ldr	r9, [r3]
	mov	r1, #0
	add	r4, r9, #56
	add	r6, r9, #4
	mov	r0, r4
	bl	memset
	mov	r2, #52
	mov	r0, r6
	mov	r1, #0
	bl	memset
	ldr	r3, [r8]
	mov	r2, r9
	mov	r7, #1
	str	r6, [r9, #100]
	str	r9, [r9, #88]
	str	r3, [r9, #104]
	b	.L5
.L10:
	ldr	r3, .L11+44
	mov	r1, r5
	ldr	r0, [r3]
	bl	set_bit
	b	.L6
.L12:
	.align	2
.L11:
	.word	CAP_SYS_ADMIN
	.word	EACCES
	.word	DASD_ECKD_MAGIC
	.word	DASD_ECKD_CCW_RESERVE
	.word	CCW_FLAG_SLI
	.word	DASD_CQR_FLAGS_USE_ERP
	.word	DASD_CQR_FLAGS_FAILFAST
	.word	HZ
	.word	DASD_CQR_FILLED
	.word	dasd_reserve_mutex
	.word	dasd_reserve_req
	.word	DASD_FLAG_IS_RESERVED
	.size	dasd_eckd_reserve, .-dasd_eckd_reserve
	.comm	dasd_reserve_req,4,4
	.comm	dasd_reserve_mutex,4,4
	.comm	HZ,4,4
	.comm	EACCES,4,4
	.comm	DASD_FLAG_IS_RESERVED,4,4
	.comm	DASD_ECKD_MAGIC,4,4
	.comm	DASD_ECKD_CCW_RESERVE,4,4
	.comm	DASD_CQR_FLAGS_USE_ERP,4,4
	.comm	DASD_CQR_FLAGS_FAILFAST,4,4
	.comm	DASD_CQR_FILLED,4,4
	.comm	CCW_FLAG_SLI,4,4
	.comm	CAP_SYS_ADMIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
