	.file	"extr_sd_zbc.c_sd_zbc_read_zones.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sd_zbc_read_zones
	.type	sd_zbc_read_zones, @function
sd_zbc_read_zones:
.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, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rbp, QWORD PTR 40[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	call	sd_is_zoned@PLT
	test	eax, eax
	jne	.L2
.L7:
	xor	r12d, r12d
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L2:
	.cfi_restore_state
	mov	rsi, r12
	mov	rdi, rbx
	call	sd_zbc_check_zoned_characteristics@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	rsi, rsp
	mov	rdi, rbx
	call	sd_zbc_check_zones@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L13
.L4:
	mov	QWORD PTR 16[rbx], 0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, QWORD PTR 32[rbx]
	mov	rsi, QWORD PTR [rsp]
	call	logical_to_sectors@PLT
	mov	esi, eax
	mov	rax, QWORD PTR 40[rbx]
	mov	rdi, QWORD PTR [rax]
	call	blk_queue_chunk_sectors@PLT
	mov	rax, QWORD PTR 40[rbx]
	mov	edi, DWORD PTR QUEUE_FLAG_ZONE_RESETALL[rip]
	mov	rsi, QWORD PTR [rax]
	call	blk_queue_flag_set@PLT
	mov	rax, QWORD PTR 40[rbx]
	mov	esi, DWORD PTR ELEVATOR_F_ZBD_SEQ_WRITE[rip]
	mov	rdi, QWORD PTR [rax]
	call	blk_queue_required_elevator_features@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rsi, QWORD PTR [rsp]
	call	round_up@PLT
	mov	rdi, QWORD PTR [rsp]
	mov	r13d, eax
	call	ilog2@PLT
	mov	ecx, eax
	mov	rax, QWORD PTR 32[rbx]
	shr	r13d, cl
	cmp	QWORD PTR 24[rbx], 0
	mov	DWORD PTR [rax], 1
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR [rsp]
	jne	.L10
	cmp	QWORD PTR [rbx], rax
	jne	.L6
	cmp	DWORD PTR 8[rbx], r13d
	jne	.L6
	mov	rax, QWORD PTR 0[rbp]
	cmp	DWORD PTR [rax], r13d
	je	.L7
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	call	blk_revalidate_disk_zones@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR [rsp]
.L10:
	mov	QWORD PTR [rbx], rax
	mov	DWORD PTR 8[rbx], r13d
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sd_zbc_read_zones, .-sd_zbc_read_zones
	.comm	QUEUE_FLAG_ZONE_RESETALL,4,4
	.comm	ELEVATOR_F_ZBD_SEQ_WRITE,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_sd_zbc.c_sd_zbc_read_zones.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sd_zbc_read_zones
	.syntax unified
	.arm
	.fpu softvfp
	.type	sd_zbc_read_zones, %function
sd_zbc_read_zones:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, r7, lr}
	ldr	r2, .L14
	sub	sp, sp, #12
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	mov	r4, r0
	mov	r5, r1
	ldr	r6, [r0, #20]
	str	r3, [sp]
	bl	sd_is_zoned
	cmp	r0, #0
	bne	.L2
.L7:
	mov	r5, #0
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L12
	mov	r0, r5
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L2:
	mov	r1, r5
	mov	r0, r4
	bl	sd_zbc_check_zoned_characteristics
	subs	r5, r0, #0
	bne	.L4
	mov	r1, sp
	mov	r0, r4
	bl	sd_zbc_check_zones
	subs	r5, r0, #0
	beq	.L13
.L4:
	mov	r3, #0
	str	r3, [r4, #8]
	b	.L1
.L13:
	ldr	r3, [r4, #20]
	ldr	r1, [sp]
	ldr	r0, [r4, #16]
	ldr	r7, [r3]
	bl	logical_to_sectors
	mov	r1, r0
	mov	r0, r7
	bl	blk_queue_chunk_sectors
	ldr	r2, [r4, #20]
	ldr	r3, .L14+4
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	blk_queue_flag_set
	ldr	r2, .L14+8
	ldr	r3, [r4, #20]
	ldr	r1, [r2]
	ldr	r0, [r3]
	bl	blk_queue_required_elevator_features
	ldr	r1, [sp]
	ldr	r0, [r4, #8]
	bl	round_up
	mov	r7, r0
	ldr	r0, [sp]
	bl	ilog2
	mov	r2, #1
	ldr	r1, [r4, #12]
	ldr	r3, [r4, #16]
	cmp	r1, #0
	stm	r3, {r2, r5}
	lsr	r7, r7, r0
	bne	.L10
	ldr	r2, [r4]
	ldr	r3, [sp]
	cmp	r2, r3
	bne	.L6
	ldr	r3, [r4, #4]
	cmp	r3, r7
	bne	.L6
	ldr	r3, [r6]
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L7
.L6:
	mov	r0, r6
	bl	blk_revalidate_disk_zones
	subs	r5, r0, #0
	bne	.L4
.L10:
	ldr	r3, [sp]
	stm	r4, {r3, r7}
	b	.L1
.L12:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	QUEUE_FLAG_ZONE_RESETALL
	.word	ELEVATOR_F_ZBD_SEQ_WRITE
	.size	sd_zbc_read_zones, .-sd_zbc_read_zones
	.comm	QUEUE_FLAG_ZONE_RESETALL,4,4
	.comm	ELEVATOR_F_ZBD_SEQ_WRITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
