	.file	"extr_pktcdvd.c_pkt_alloc_packet_data.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pkt_alloc_packet_data, @function
pkt_alloc_packet_data:
.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	r12d, edi
	mov	edi, 40
	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	esi, DWORD PTR GFP_KERNEL[rip]
	call	kzalloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L1
	mov	DWORD PTR [rax], r12d
	mov	edi, r12d
	call	pkt_bio_alloc@PLT
	mov	QWORD PTR 8[r13], rax
	test	rax, rax
	je	.L3
	mov	eax, r12d
	cdq
	idiv	DWORD PTR FRAMES_PER_PAGE[rip]
	test	eax, eax
	jle	.L10
	mov	rcx, QWORD PTR 16[r13]
	xor	ebx, ebx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, r12d
	add	rbx, 1
	cdq
	idiv	DWORD PTR FRAMES_PER_PAGE[rip]
	cmp	eax, ebx
	jle	.L10
.L9:
	mov	edi, DWORD PTR GFP_KERNEL[rip]
	or	edi, DWORD PTR __GFP_ZERO[rip]
	lea	rbp, [rcx+rbx*8]
	call	alloc_page@PLT
	mov	rcx, QWORD PTR 16[r13]
	mov	QWORD PTR 0[rbp], rax
	cmp	QWORD PTR [rcx+rbx*8], 0
	jne	.L6
.L14:
	mov	eax, r12d
	xor	ebx, ebx
	cdq
	idiv	DWORD PTR FRAMES_PER_PAGE[rip]
	test	eax, eax
	jg	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L15:
	mov	eax, r12d
	add	rbx, 1
	cdq
	idiv	DWORD PTR FRAMES_PER_PAGE[rip]
	cmp	eax, ebx
	jle	.L8
.L7:
	mov	rax, QWORD PTR 16[r13]
	mov	rdi, QWORD PTR [rax+rbx*8]
	test	rdi, rdi
	je	.L15
	call	__free_page@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, QWORD PTR 8[r13]
	call	bio_put@PLT
.L3:
	mov	rdi, r13
	xor	r13d, r13d
	call	kfree@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	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
.L10:
	.cfi_restore_state
	lea	rdi, 32[r13]
	call	spin_lock_init@PLT
	test	r12d, r12d
	jle	.L1
	lea	eax, -1[r12]
	xor	ebx, ebx
	lea	rbp, 8[0+rax*8]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L37:
	mov	rdx, QWORD PTR 24[r13]
	mov	QWORD PTR [rdx+rbx], rax
	add	rbx, 8
	cmp	rbp, rbx
	je	.L1
.L12:
	mov	edi, 1
	call	pkt_bio_alloc@PLT
	test	rax, rax
	jne	.L37
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 24[r13]
	mov	rdi, QWORD PTR [rax+rbx]
	test	rdi, rdi
	je	.L13
	call	bio_put@PLT
.L13:
	add	rbx, 8
	cmp	rbp, rbx
	jne	.L11
	jmp	.L14
	.cfi_endproc
.LFE0:
	.size	pkt_alloc_packet_data, .-pkt_alloc_packet_data
	.comm	__GFP_ZERO,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FRAMES_PER_PAGE,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_pktcdvd.c_pkt_alloc_packet_data.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pkt_alloc_packet_data, %function
pkt_alloc_packet_data:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r9, .L37
	mov	r6, r0
	ldr	r1, [r9]
	mov	r0, #20
	bl	kzalloc
	subs	r5, r0, #0
	beq	.L1
	mov	r0, r6
	str	r6, [r5]
	bl	pkt_bio_alloc
	cmp	r0, #0
	str	r0, [r5, #4]
	beq	.L3
	ldr	r8, .L37+4
	mov	r0, r6
	ldr	r1, [r8]
	bl	__aeabi_idiv
	cmp	r0, #0
	ble	.L10
	mov	r4, #0
	ldr	r7, [r5, #8]
	ldr	r10, .L37+8
	b	.L9
.L6:
	mov	r0, r6
	ldr	r1, [r8]
	bl	__aeabi_idiv
	cmp	r0, r4
	ble	.L10
.L9:
	ldr	r3, [r10]
	ldr	r0, [r9]
	orr	r0, r0, r3
	bl	alloc_page
	str	r0, [r7, r4, lsl #2]
	ldr	r7, [r5, #8]
	ldr	r3, [r7, r4, lsl #2]
	add	r4, r4, #1
	cmp	r3, #0
	bne	.L6
.L13:
	mov	r0, r6
	ldr	r1, [r8]
	bl	__aeabi_idiv
	cmp	r0, #0
	movgt	r4, #0
	bgt	.L7
	b	.L8
.L14:
	mov	r0, r6
	ldr	r1, [r8]
	bl	__aeabi_idiv
	cmp	r0, r4
	ble	.L8
.L7:
	ldr	r3, [r5, #8]
	ldr	r0, [r3, r4, lsl #2]
	add	r4, r4, #1
	cmp	r0, #0
	beq	.L14
	bl	__free_page
	b	.L14
.L8:
	ldr	r0, [r5, #4]
	bl	bio_put
.L3:
	mov	r0, r5
	bl	kfree
	mov	r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	add	r0, r5, #16
	bl	spin_lock_init
	cmp	r6, #0
	movgt	r4, #0
	bgt	.L5
	b	.L1
.L36:
	ldr	r3, [r5, #12]
	str	r0, [r3, r4, lsl #2]
	add	r4, r4, #1
	cmp	r6, r4
	beq	.L1
.L5:
	mov	r0, #1
	bl	pkt_bio_alloc
	cmp	r0, #0
	bne	.L36
	mov	r4, r0
.L11:
	ldr	r3, [r5, #12]
	ldr	r0, [r3, r4, lsl #2]
	add	r4, r4, #1
	cmp	r0, #0
	beq	.L12
	bl	bio_put
.L12:
	cmp	r6, r4
	bne	.L11
	b	.L13
.L38:
	.align	2
.L37:
	.word	GFP_KERNEL
	.word	FRAMES_PER_PAGE
	.word	__GFP_ZERO
	.size	pkt_alloc_packet_data, .-pkt_alloc_packet_data
	.comm	__GFP_ZERO,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FRAMES_PER_PAGE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
