	.file	"extr_dasd_eckd.c_dasd_eckd_build_cp.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dasd_eckd_build_cp, @function
dasd_eckd_build_cp:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR 8[rsi]
	mov	r14d, DWORD PTR [rsi]
	xor	esi, esi
	mov	QWORD PTR [rsp], rdi
	mov	r15, QWORD PTR [rax]
	mov	edx, r14d
	lea	rdi, 24[r15]
	call	recs_per_track@PLT
	test	eax, eax
	je	.L42
	mov	rdi, r12
	mov	ebx, eax
	call	blk_rq_pos@PLT
	mov	ecx, DWORD PTR 4[rbp]
	mov	esi, ebx
	sar	eax, cl
	mov	edi, eax
	mov	r13d, eax
	call	sector_div@PLT
	mov	rdi, r12
	mov	DWORD PTR 16[rsp], eax
	call	blk_rq_pos@PLT
	mov	rdi, r12
	mov	DWORD PTR 8[rsp], eax
	call	blk_rq_sectors@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	ecx, DWORD PTR 4[rbp]
	mov	esi, ebx
	lea	eax, -1[rdx+rax]
	sar	eax, cl
	mov	edi, eax
	mov	DWORD PTR 12[rsp], eax
	call	sector_div@PLT
	cmp	QWORD PTR 16[r15], 0
	mov	DWORD PTR 8[rsp], 0
	mov	DWORD PTR 20[rsp], eax
	je	.L3
	lea	eax, [rbx+rbx]
	cmp	eax, r13d
	seta	al
	movzx	eax, al
	mov	DWORD PTR 8[rsp], eax
.L3:
	mov	rax, QWORD PTR 8[r15]
	mov	rdi, r12
	mov	eax, DWORD PTR 160[rax]
	mov	DWORD PTR 28[rsp], eax
	call	blk_rq_bytes@PLT
	xor	edx, edx
	mov	ecx, eax
	div	r14d
	test	edx, edx
	jne	.L42
	mov	rdi, r12
	mov	DWORD PTR 24[rsp], ecx
	call	rq_data_dir@PLT
	cmp	rax, QWORD PTR WRITE[rip]
	mov	ecx, DWORD PTR 24[rsp]
	jne	.L5
	mov	eax, DWORD PTR 12[rsp]
	sub	eax, r13d
	lea	ecx, [rcx+rax*4]
.L5:
	mov	eax, DWORD PTR 8[rsp]
	test	eax, eax
	jne	.L8
	cmp	QWORD PTR dasd_page_cache[rip], 0
	jne	.L8
	cmp	DWORD PTR [r15], ecx
	jb	.L9
	test	BYTE PTR 28[rsp], 32
	jne	.L17
	cmp	r13d, DWORD PTR 12[rsp]
	je	.L17
.L9:
	mov	rax, QWORD PTR 8[r15]
	test	BYTE PTR 32[rax], 1
	jne	.L46
	.p2align 4,,10
	.p2align 3
.L8:
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	r9d, r13d
	mov	ecx, r13d
	mov	rdx, r12
	push	r14
	.cfi_def_cfa_offset 112
	mov	rsi, rbp
	push	rbx
	.cfi_def_cfa_offset 120
	mov	eax, DWORD PTR 44[rsp]
	push	rax
	.cfi_def_cfa_offset 128
	mov	eax, DWORD PTR 48[rsp]
	push	rax
	.cfi_def_cfa_offset 136
	mov	eax, DWORD PTR 52[rsp]
	push	rax
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR 48[rsp]
	mov	r8d, eax
	call	dasd_eckd_build_cp_cmd_single@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 96
	mov	r15, rax
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r15
	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
.L42:
	.cfi_restore_state
	mov	edi, DWORD PTR EINVAL[rip]
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	edi
	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
	jmp	ERR_PTR@PLT
	.p2align 4,,10
	.p2align 3
.L46:
	.cfi_restore_state
	mov	r15d, DWORD PTR 36[rax]
	mov	eax, DWORD PTR 48[rax]
	mov	rdi, r12
	mov	DWORD PTR 8[rsp], eax
	call	rq_data_dir@PLT
	and	r15d, 32
	je	.L12
	cmp	QWORD PTR READ[rip], rax
	je	.L14
.L12:
	mov	rdi, r12
	call	rq_data_dir@PLT
	cmp	QWORD PTR WRITE[rip], rax
	jne	.L8
	test	BYTE PTR 8[rsp], 64
	je	.L8
.L14:
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	r9d, r13d
	mov	ecx, r13d
	mov	rdx, r12
	push	r14
	.cfi_def_cfa_offset 112
	mov	rsi, rbp
	push	rbx
	.cfi_def_cfa_offset 120
	mov	eax, DWORD PTR 44[rsp]
	push	rax
	.cfi_def_cfa_offset 128
	mov	eax, DWORD PTR 48[rsp]
	push	rax
	.cfi_def_cfa_offset 136
	mov	eax, DWORD PTR 52[rsp]
	push	rax
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR 48[rsp]
	mov	r8d, eax
	call	dasd_eckd_build_cp_cmd_track@PLT
.L44:
	add	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rdi, rax
	mov	r15, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L47
.L11:
	test	r15, r15
	jne	.L1
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L17:
	sub	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 104
	mov	r9d, r13d
	mov	ecx, r13d
	mov	rdx, r12
	push	r14
	.cfi_def_cfa_offset 112
	mov	rsi, rbp
	push	rbx
	.cfi_def_cfa_offset 120
	mov	eax, DWORD PTR 44[rsp]
	push	rax
	.cfi_def_cfa_offset 128
	mov	eax, DWORD PTR 48[rsp]
	push	rax
	.cfi_def_cfa_offset 136
	mov	eax, DWORD PTR 52[rsp]
	push	rax
	.cfi_def_cfa_offset 144
	mov	rdi, QWORD PTR 48[rsp]
	mov	r8d, eax
	call	dasd_eckd_build_cp_tpm_track@PLT
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L47:
	.cfi_restore_state
	mov	rdi, r15
	call	PTR_ERR@PLT
	add	eax, DWORD PTR EAGAIN[rip]
	je	.L11
	mov	rdi, r15
	call	PTR_ERR@PLT
	add	eax, DWORD PTR ENOMEM[rip]
	jne	.L8
	jmp	.L11
	.cfi_endproc
.LFE0:
	.size	dasd_eckd_build_cp, .-dasd_eckd_build_cp
	.comm	dasd_page_cache,8,8
	.comm	WRITE,8,8
	.comm	READ,8,8
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,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_build_cp.c"
	.text
	.global	__aeabi_uidivmod
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dasd_eckd_build_cp, %function
dasd_eckd_build_cp:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r9, r0
	ldr	r3, [r1, #8]
	ldr	r10, [r1]
	ldr	r8, [r3]
	sub	sp, sp, #60
	mov	r5, r1
	mov	r6, r2
	mov	r1, #0
	mov	r2, r10
	add	r0, r8, #12
	str	r9, [sp, #36]
	bl	recs_per_track
	subs	r7, r0, #0
	beq	.L32
	mov	r0, r6
	bl	blk_rq_pos
	ldr	r3, [r5, #4]
	mov	r1, r7
	asr	r9, r0, r3
	mov	r0, r9
	bl	sector_div
	mov	r2, r0
	mov	r0, r6
	str	r2, [sp, #40]
	bl	blk_rq_pos
	mov	fp, r0
	mov	r0, r6
	bl	blk_rq_sectors
	ldr	r2, [r5, #4]
	add	r4, fp, r0
	sub	r4, r4, #1
	asr	r4, r4, r2
	mov	r0, r4
	mov	r1, r7
	bl	sector_div
	ldr	fp, [r8, #8]
	str	r0, [sp, #44]
	cmp	fp, #0
	beq	.L3
	cmp	r9, r7, lsl #1
	movcc	fp, #1
	movcs	fp, #0
.L3:
	ldr	r2, [r8, #4]
	mov	r0, r6
	ldr	r3, [r2, #160]
	str	r3, [sp, #52]
	bl	blk_rq_bytes
	mov	r1, r10
	str	r0, [sp, #48]
	bl	__aeabi_uidivmod
	cmp	r1, #0
	bne	.L32
	mov	r0, r6
	bl	rq_data_dir
	ldr	r1, .L36
	ldr	r2, [r1]
	cmp	r0, r2
	ldreq	r3, [sp, #48]
	subeq	r2, r4, r9
	addeq	r3, r3, r2, lsl #2
	ldr	r2, .L36+4
	streq	r3, [sp, #48]
	ldr	r2, [r2]
	orrs	r3, fp, r2
	bne	.L10
	ldr	r2, [r8]
	ldr	r3, [sp, #48]
	cmp	r2, r3
	bcc	.L8
	ldr	r3, [sp, #52]
	lsr	r2, r3, #5
	cmp	r9, r4
	orreq	r2, r2, #1
	tst	r2, #1
	bne	.L34
.L8:
	ldr	r2, [r8, #4]
	ldr	r0, [r2, #32]
	tst	r0, #1
	bne	.L35
.L10:
	ldr	r3, [sp, #44]
	mov	r2, r6
	str	r3, [sp, #16]
	ldr	r3, [sp, #40]
	mov	r1, r5
	str	r3, [sp, #12]
	stm	sp, {r4, r9}
	mov	r3, r9
	ldr	r0, [sp, #36]
	str	r10, [sp, #24]
	str	r7, [sp, #20]
	str	r4, [sp, #8]
	bl	dasd_eckd_build_cp_cmd_single
	mov	r8, r0
.L1:
	mov	r0, r8
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	ldr	r3, .L36+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	ERR_PTR
.L35:
	mov	r0, r6
	ldr	fp, [r2, #36]
	ldr	r8, [r2, #48]
	bl	rq_data_dir
	ldr	r2, .L36+12
	ldr	r2, [r2]
	sub	r2, r2, r0
	clz	r2, r2
	lsr	r2, r2, #5
	ands	r3, r2, fp, lsr #5
	bne	.L13
	mov	r0, r6
	bl	rq_data_dir
	ldr	r1, .L36
	lsr	r8, r8, #6
	ldr	r2, [r1]
	cmp	r2, r0
	movne	r8, #0
	andeq	r8, r8, #1
	cmp	r8, #0
	beq	.L10
.L13:
	ldr	r3, [sp, #44]
	mov	r2, r6
	str	r3, [sp, #16]
	ldr	r3, [sp, #40]
	mov	r1, r5
	str	r3, [sp, #12]
	stm	sp, {r4, r9}
	mov	r3, r9
	ldr	r0, [sp, #36]
	str	r10, [sp, #24]
	str	r7, [sp, #20]
	str	r4, [sp, #8]
	bl	dasd_eckd_build_cp_cmd_track
	mov	r8, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L12
.L9:
	cmp	r8, #0
	bne	.L1
	b	.L10
.L34:
	ldr	r3, [sp, #44]
	mov	r2, r6
	str	r3, [sp, #16]
	ldr	r3, [sp, #40]
	mov	r1, r5
	str	r3, [sp, #12]
	stm	sp, {r4, r9}
	mov	r3, r9
	ldr	r0, [sp, #36]
	str	r10, [sp, #24]
	str	r7, [sp, #20]
	str	r4, [sp, #8]
	bl	dasd_eckd_build_cp_tpm_track
	mov	r8, r0
	bl	IS_ERR
	cmp	r0, #0
	beq	.L9
.L12:
	mov	r0, r8
	bl	PTR_ERR
	ldr	r2, .L36+16
	ldr	r2, [r2]
	cmn	r0, r2
	beq	.L9
	mov	r0, r8
	bl	PTR_ERR
	ldr	r2, .L36+20
	ldr	r2, [r2]
	cmn	r0, r2
	bne	.L10
	b	.L9
.L37:
	.align	2
.L36:
	.word	WRITE
	.word	dasd_page_cache
	.word	EINVAL
	.word	READ
	.word	EAGAIN
	.word	ENOMEM
	.size	dasd_eckd_build_cp, .-dasd_eckd_build_cp
	.comm	dasd_page_cache,4,4
	.comm	WRITE,4,4
	.comm	READ,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EAGAIN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
