	.file	"extr_hw_features.c_hostapd_prepare_rates.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to allocate memory for rate table."
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"RATE[%d] rate=%d flags=0x%x"
	.section	.rodata.str1.8
	.align 8
.LC2:
	.string	"No rates remaining in supported/basic rate sets (%d,%d)."
	.text
	.p2align 4
	.globl	hostapd_prepare_rates
	.type	hostapd_prepare_rates, @function
hostapd_prepare_rates:
.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, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 28[rsp], -1
	movabs	rax, 515396075580
	mov	QWORD PTR 32[rsp], rax
	movabs	rax, -4294967056
	mov	QWORD PTR 40[rsp], rax
	movabs	rax, 85899345930
	mov	QWORD PTR 20[rsp], rax
	mov	QWORD PTR 48[rsp], rax
	movabs	rax, 472446402615
	mov	QWORD PTR 56[rsp], rax
	mov	rax, QWORD PTR 8[rdi]
	mov	DWORD PTR 64[rsp], -1
	mov	r13, QWORD PTR [rax]
	test	r13, r13
	je	.L44
	mov	r9d, DWORD PTR 0[r13]
	test	r9d, r9d
	js	.L25
.L6:
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L8:
	mov	edx, eax
	add	rax, 1
	mov	r8d, DWORD PTR 0[r13+rax*4]
	test	r8d, r8d
	jns	.L8
	lea	r14d, 8[0+rdx*4]
.L7:
	mov	rdi, QWORD PTR 24[rbx]
	call	os_free@PLT
	mov	edi, r14d
	call	os_malloc@PLT
	mov	QWORD PTR 24[rbx], rax
	mov	rdi, rax
	test	rax, rax
	je	.L9
	mov	edx, r14d
	mov	rsi, r13
	call	os_memcpy@PLT
.L9:
	mov	rdi, QWORD PTR 16[rbx]
	call	os_free@PLT
	mov	edi, DWORD PTR 4[r12]
	mov	esi, 8
	mov	QWORD PTR [rbx], 0
	call	os_calloc@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	je	.L10
	mov	edi, DWORD PTR 4[r12]
	xor	ebp, ebp
	mov	DWORD PTR 12[rsp], 0
	lea	r15, .LC1[rip]
	test	edi, edi
	jle	.L45
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR 8[rbx]
	lea	r14, 0[0+rbp*4]
	mov	rdi, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 8[r12]
	mov	esi, DWORD PTR [rax+rbp*4]
	test	rdi, rdi
	je	.L13
	call	hostapd_rate_found@PLT
	test	rax, rax
	je	.L14
	mov	rax, QWORD PTR 8[r12]
	mov	esi, DWORD PTR [rax+r14]
.L13:
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 16[rbx]
	mov	rdi, r13
	lea	r14, [rax+rdx*8]
	mov	DWORD PTR 4[r14], esi
	call	hostapd_rate_found@PLT
	mov	r8d, DWORD PTR [r14]
	test	rax, rax
	je	.L16
	or	r8d, DWORD PTR HOSTAPD_RATE_BASIC[rip]
	add	DWORD PTR 12[rsp], 1
	mov	DWORD PTR [r14], r8d
.L16:
	mov	ecx, DWORD PTR 4[r14]
	mov	rdx, QWORD PTR [rbx]
	mov	rsi, r15
	xor	eax, eax
	mov	edi, DWORD PTR MSG_DEBUG[rip]
	call	wpa_printf@PLT
	add	QWORD PTR [rbx], 1
.L14:
	add	rbp, 1
	cmp	DWORD PTR 4[r12], ebp
	jg	.L11
	mov	esi, DWORD PTR 12[rsp]
	mov	rdx, QWORD PTR [rbx]
	test	esi, esi
	je	.L17
	test	rdx, rdx
	jne	.L21
.L17:
	mov	rax, QWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 20[rax]
	test	ecx, ecx
	je	.L18
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	je	.L18
.L21:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 72[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L46
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L44:
	.cfi_restore_state
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 130
	je	.L21
	jg	.L4
	cmp	eax, 128
	je	.L22
	cmp	eax, 129
	jne	.L42
	lea	r13, 20[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L4:
	lea	r13, 32[rsp]
	cmp	eax, 131
	je	.L6
.L42:
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L25:
	xor	r14d, r14d
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L22:
	lea	r13, 48[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rdx, QWORD PTR [rbx]
	jmp	.L17
.L18:
	mov	ecx, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR MSG_ERROR[rip]
	lea	rsi, .LC2[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	jmp	.L42
.L10:
	mov	edi, DWORD PTR MSG_ERROR[rip]
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	wpa_printf@PLT
	mov	eax, -1
	jmp	.L1
.L46:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	hostapd_prepare_rates, .-hostapd_prepare_rates
	.comm	MSG_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.comm	HOSTAPD_RATE_BASIC,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_hw_features.c_hostapd_prepare_rates.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC3:
	.ascii	"Failed to allocate memory for rate table.\000"
	.align	2
.LC4:
	.ascii	"RATE[%d] rate=%d flags=0x%x\000"
	.align	2
.LC5:
	.ascii	"No rates remaining in supported/basic rate sets (%d"
	.ascii	",%d).\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	hostapd_prepare_rates
	.syntax unified
	.arm
	.fpu softvfp
	.type	hostapd_prepare_rates, %function
hostapd_prepare_rates:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, .L47
	sub	sp, sp, #76
	add	r8, r3, #16
	add	lr, r3, #28
	add	ip, sp, #48
	add	r5, sp, #32
	add	r7, sp, #20
	mov	r6, r1
	ldm	r3, {r0, r1, r2, r3}
	stm	r5, {r0, r1, r2, r3}
	ldm	r8, {r0, r1, r2}
	stm	r7, {r0, r1, r2}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r2, [r4, #4]
	ldr	r3, [lr]
	ldr	r9, [r2]
	ldr	r2, .L47+4
	cmp	r9, #0
	ldr	r2, [r2]
	str	r2, [sp, #68]
	mov	r2,#0
	str	r3, [ip]
	beq	.L44
.L2:
	ldr	r3, [r9]
	cmp	r3, #0
	blt	.L24
	mov	r2, r9
	mov	r3, #0
.L9:
	ldr	r1, [r2, #4]!
	mov	r0, r3
	cmp	r1, #0
	add	r3, r3, #1
	bge	.L9
	add	r0, r0, #2
	lsl	r5, r0, #2
.L8:
	ldr	r0, [r4, #12]
	bl	os_free
	mov	r0, r5
	bl	os_malloc
	cmp	r0, #0
	str	r0, [r4, #12]
	beq	.L10
	mov	r2, r5
	mov	r1, r9
	bl	os_memcpy
.L10:
	mov	r8, #0
	ldr	r0, [r4, #8]
	bl	os_free
	mov	r1, #8
	ldr	r0, [r6, #4]
	str	r8, [r4]
	bl	os_calloc
	cmp	r0, r8
	str	r0, [r4, #8]
	beq	.L11
	ldr	r3, [r6, #4]
	cmp	r3, r8
	ble	.L45
	mov	r5, r8
	ldr	r10, .L47+8
	str	r8, [sp, #12]
.L12:
	ldr	r2, [r4, #4]
	ldr	r3, [r6, #8]
	ldr	r0, [r2, #4]
	ldr	r1, [r3, r5, lsl #2]
	cmp	r0, #0
	lsl	r8, r5, #2
	beq	.L14
	bl	hostapd_rate_found
	cmp	r0, #0
	beq	.L15
	ldr	r3, [r6, #8]
	ldr	r1, [r3, r8]
.L14:
	ldr	fp, [r4]
	ldr	r8, [r4, #8]
	mov	r0, r9
	add	r7, r8, fp, lsl #3
	str	r1, [r7, #4]
	bl	hostapd_rate_found
	cmp	r0, #0
	ldrne	r3, .L47+12
	ldr	r1, [r8, fp, lsl #3]
	ldrne	r2, [r3]
	ldrne	r3, [sp, #12]
	orrne	r1, r1, r2
	addne	r3, r3, #1
	ldr	r0, .L47+16
	strne	r1, [r8, fp, lsl #3]
	ldr	r2, [r4]
	strne	r3, [sp, #12]
	ldr	r3, [r7, #4]
	str	r1, [sp]
	ldr	r0, [r0]
	mov	r1, r10
	bl	wpa_printf
	ldr	r3, [r4]
	add	r3, r3, #1
	str	r3, [r4]
.L15:
	ldr	r3, [r6, #4]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L12
	ldr	r2, [r4]
	ldr	r3, [sp, #12]
	cmp	r2, #0
	cmpne	r3, #0
	bne	.L22
.L18:
	ldr	r3, [r4, #4]
	ldr	r1, [r3, #12]
	cmp	r1, #0
	beq	.L19
	ldr	r3, [r3, #8]
	cmp	r3, #0
	beq	.L19
.L22:
	mov	r0, #0
.L1:
	ldr	r3, .L47+4
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L46
	add	sp, sp, #76
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L44:
	ldr	r3, [r6]
	sub	r3, r3, #128
	cmp	r3, #3
	ldrls	pc, [pc, r3, asl #2]
	b	.L42
.L4:
	.word	.L7
	.word	.L6
	.word	.L22
	.word	.L23
.L23:
	mov	r9, r5
	b	.L2
.L6:
	mov	r9, r7
	b	.L2
.L7:
	add	r9, sp, #48
	b	.L2
.L45:
	ldr	r2, [r4]
	str	r8, [sp, #12]
	b	.L18
.L24:
	mov	r5, #0
	b	.L8
.L19:
	ldr	r1, .L47+20
	ldr	r3, [sp, #12]
	ldr	r0, [r1]
	ldr	r1, .L47+24
	bl	wpa_printf
.L42:
	mvn	r0, #0
	b	.L1
.L11:
	ldr	r3, .L47+20
	ldr	r1, .L47+28
	ldr	r0, [r3]
	bl	wpa_printf
	mvn	r0, #0
	b	.L1
.L46:
	bl	__stack_chk_fail
.L48:
	.align	2
.L47:
	.word	.LANCHOR0
	.word	.LC6
	.word	.LC4
	.word	HOSTAPD_RATE_BASIC
	.word	MSG_DEBUG
	.word	MSG_ERROR
	.word	.LC5
	.word	.LC3
	.size	hostapd_prepare_rates, .-hostapd_prepare_rates
	.comm	MSG_ERROR,4,4
	.comm	MSG_DEBUG,4,4
	.comm	HOSTAPD_RATE_BASIC,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
.LC0:
	.word	60
	.word	120
	.word	240
	.word	-1
.LC1:
	.word	10
	.word	20
	.word	-1
.LC2:
	.word	10
	.word	20
	.word	55
	.word	110
	.word	-1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
