	.file	"extr_hdaa.c_hdaa_prepare_pcms.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Unable to allocate memory for devices\n"
	.text
	.p2align 4
	.type	hdaa_prepare_pcms, @function
hdaa_prepare_pcms:
.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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	edx, DWORD PTR [rdi]
	mov	rbx, rdi
	mov	r14, QWORD PTR 32[rdi]
	test	edx, edx
	jle	.L25
	sub	edx, 1
	mov	rsi, QWORD PTR HDAA_CTL_IN[rip]
	mov	rax, r14
	xor	r13d, r13d
	lea	rdx, [rdx+rdx*4]
	xor	r12d, r12d
	xor	edi, edi
	xor	r8d, r8d
	lea	rcx, 40[r14+rdx*8]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	test	edx, edx
	je	.L6
	add	r12d, 1
.L3:
	add	rax, 40
	cmp	rax, rcx
	je	.L2
.L7:
	cmp	QWORD PTR [rax], 0
	je	.L3
	mov	edx, DWORD PTR 16[rax]
	cmp	QWORD PTR 8[rax], rsi
	jne	.L4
	test	edx, edx
	je	.L5
	add	rax, 40
	add	r13d, 1
	cmp	rax, rcx
	jne	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, r8d
	call	max@PLT
	mov	esi, r12d
	mov	edi, r13d
	mov	ebp, eax
	call	max@PLT
	mov	esi, DWORD PTR M_HDAA[rip]
	mov	edx, DWORD PTR M_ZERO[rip]
	add	eax, ebp
	or	edx, DWORD PTR M_NOWAIT[rip]
	mov	DWORD PTR 4[rbx], eax
	lea	edi, [rax+rax*2]
	sal	edi, 3
	call	malloc@PLT
	mov	QWORD PTR 8[rbx], rax
	mov	rbp, rax
	test	rax, rax
	je	.L8
	mov	r11d, DWORD PTR 4[rbx]
	mov	rdx, rax
	xor	ecx, ecx
	movabs	rax, 1099511627775
	test	r11d, r11d
	jle	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	mov	DWORD PTR [rdx], ecx
	add	ecx, 1
	add	rdx, 24
	mov	QWORD PTR -8[rdx], rbx
	mov	DWORD PTR -20[rdx], -1
	mov	QWORD PTR -16[rdx], rax
	cmp	ecx, r11d
	jne	.L12
.L13:
	mov	r12d, DWORD PTR [rbx]
	test	r12d, r12d
	jle	.L1
	lea	eax, -1[r11]
	mov	r13, QWORD PTR HDAA_CTL_IN[rip]
	mov	rsi, r14
	xor	r8d, r8d
	lea	rax, 3[rax+rax*2]
	lea	rax, 0[rbp+rax*8]
	jmp	.L24
	.p2align 4,,10
	.p2align 3
.L15:
	add	r8d, 1
	add	rsi, 40
	cmp	r12d, r8d
	je	.L1
.L24:
	cmp	QWORD PTR [rsi], 0
	je	.L15
	test	r11d, r11d
	jle	.L15
	mov	rcx, rbp
.L23:
	mov	edx, DWORD PTR 12[rcx]
	cmp	edx, 255
	je	.L16
	mov	r9d, DWORD PTR 16[rsi]
	test	edx, edx
	sete	dil
	test	r9d, r9d
	sete	dl
	cmp	dil, dl
	jne	.L17
.L16:
	cmp	QWORD PTR 8[rsi], r13
	je	.L37
	mov	edx, DWORD PTR 4[rcx]
	test	edx, edx
	js	.L38
.L17:
	add	rcx, 24
	cmp	rcx, rax
	jne	.L23
	add	r8d, 1
	add	rsi, 40
	cmp	r12d, r8d
	jne	.L24
.L1:
	pop	rbx
	.cfi_remember_state
	.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
.L6:
	.cfi_restore_state
	add	r8d, 1
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L37:
	mov	edi, DWORD PTR 8[rcx]
	test	edi, edi
	jns	.L17
	mov	DWORD PTR 8[rcx], r8d
.L19:
	mov	edx, DWORD PTR 20[rsi]
	mov	QWORD PTR 32[rsi], rcx
	test	edx, edx
	jle	.L22
	mov	rdi, QWORD PTR 24[rsi]
	lea	r9d, -1[rdx]
	mov	r10, QWORD PTR 16[rbx]
	lea	rdx, 8[rdi]
	lea	r9, [rdx+r9*8]
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L39:
	add	rdx, 8
.L21:
	mov	rdi, QWORD PTR [rdi]
	mov	QWORD PTR [r10+rdi*8], rcx
	mov	rdi, rdx
	cmp	r9, rdx
	jne	.L39
.L22:
	mov	edx, DWORD PTR 16[rsi]
	mov	DWORD PTR 12[rcx], edx
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L38:
	mov	DWORD PTR 4[rcx], r8d
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L5:
	add	edi, 1
	jmp	.L3
.L25:
	xor	r13d, r13d
	xor	r12d, r12d
	xor	edi, edi
	xor	r8d, r8d
	jmp	.L2
.L8:
	mov	edi, DWORD PTR 24[rbx]
	lea	rsi, .LC0[rip]
	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
	jmp	device_printf@PLT
	.cfi_endproc
.LFE0:
	.size	hdaa_prepare_pcms, .-hdaa_prepare_pcms
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_HDAA,4,4
	.comm	HDAA_CTL_IN,8,8
	.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_hdaa.c_hdaa_prepare_pcms.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Unable to allocate memory for devices\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hdaa_prepare_pcms, %function
hdaa_prepare_pcms:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, [r0]
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	cmp	ip, #0
	mov	r4, r0
	mov	r5, #0
	ldr	r7, [r0, #20]
	ble	.L25
	ldr	r2, .L45
	add	ip, ip, ip, lsl #1
	mov	r3, r7
	mov	r6, r5
	mov	r0, r5
	mov	r1, r5
	ldr	r8, [r2]
	add	ip, r7, ip, lsl #3
	b	.L7
.L4:
	cmp	r2, #0
	addne	r6, r6, #1
	addeq	r1, r1, #1
.L3:
	add	r3, r3, #24
	cmp	r3, ip
	beq	.L2
.L7:
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L3
	ldr	lr, [r3, #4]
	ldr	r2, [r3, #8]
	cmp	lr, r8
	bne	.L4
	cmp	r2, #0
	add	r3, r3, #24
	addne	r5, r5, #1
	addeq	r0, r0, #1
	cmp	r3, ip
	bne	.L7
.L2:
	bl	max
	mov	r3, r0
	mov	r1, r6
	mov	r0, r5
	mov	r5, r3
	bl	max
	ldr	r1, .L45+4
	ldr	r2, .L45+8
	ldr	ip, [r1]
	add	r3, r5, r0
	ldr	r2, [r2]
	ldr	r1, .L45+12
	add	r0, r3, r3, lsl #2
	ldr	r1, [r1]
	str	r3, [r4, #4]
	lsl	r0, r0, #2
	orr	r2, ip, r2
	bl	malloc
	cmp	r0, #0
	str	r0, [r4, #8]
	beq	.L8
	ldr	r5, [r4, #4]
	cmp	r5, #0
	movgt	r3, r0
	movgt	r2, #0
	mvngt	r1, #0
	movgt	ip, #255
	ble	.L13
.L12:
	str	r2, [r3]
	add	r2, r2, #1
	cmp	r2, r5
	str	r4, [r3, #16]
	str	r1, [r3, #4]
	str	r1, [r3, #8]
	str	ip, [r3, #12]
	add	r3, r3, #20
	bne	.L12
.L13:
	ldr	r6, [r4]
	cmp	r6, #0
	pople	{r4, r5, r6, r7, r8, r9, r10, pc}
	ldr	r3, .L45
	mov	r1, r7
	mov	lr, #0
	ldr	r7, [r3]
	b	.L24
.L15:
	add	lr, lr, #1
	cmp	r6, lr
	add	r1, r1, #24
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
.L24:
	ldr	r3, [r1]
	cmp	r3, #0
	beq	.L15
	cmp	r5, #0
	ble	.L15
	mov	r2, r0
	mov	r8, #0
.L23:
	ldr	r3, [r2, #12]
	add	r8, r8, #1
	cmp	r3, #255
	beq	.L16
	ldr	ip, [r1, #8]
	clz	r3, r3
	clz	ip, ip
	lsr	r3, r3, #5
	lsr	ip, ip, #5
	cmp	r3, ip
	bne	.L17
.L16:
	ldr	r3, [r1, #4]
	cmp	r3, r7
	beq	.L43
	ldr	r3, [r2, #4]
	cmp	r3, #0
	blt	.L44
.L17:
	cmp	r8, r5
	add	r2, r2, #20
	bne	.L23
	b	.L15
.L43:
	ldr	r3, [r2, #8]
	cmp	r3, #0
	bge	.L17
	str	lr, [r2, #8]
.L19:
	ldr	r8, [r1, #12]
	str	r2, [r1, #20]
	cmp	r8, #0
	ble	.L22
	ldr	r3, [r1, #16]
	ldr	r9, [r4, #12]
	sub	r3, r3, #4
	add	r8, r3, r8, lsl #2
.L21:
	ldr	ip, [r3, #4]!
	cmp	r8, r3
	str	r2, [r9, ip, lsl #2]
	bne	.L21
.L22:
	ldr	r3, [r1, #8]
	str	r3, [r2, #12]
	b	.L15
.L44:
	str	lr, [r2, #4]
	b	.L19
.L25:
	mov	r6, r5
	mov	r0, r5
	mov	r1, r5
	b	.L2
.L8:
	ldr	r0, [r4, #16]
	ldr	r1, .L45+16
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	device_printf
.L46:
	.align	2
.L45:
	.word	HDAA_CTL_IN
	.word	M_ZERO
	.word	M_NOWAIT
	.word	M_HDAA
	.word	.LC0
	.size	hdaa_prepare_pcms, .-hdaa_prepare_pcms
	.comm	M_ZERO,4,4
	.comm	M_NOWAIT,4,4
	.comm	M_HDAA,4,4
	.comm	HDAA_CTL_IN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
