	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_prepare_rates          ## -- Begin function hostapd_prepare_rates
	.p2align	4, 0x90
_hostapd_prepare_rates:                 ## @hostapd_prepare_rates
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movaps	L___const.hostapd_prepare_rates.basic_rates_a(%rip), %xmm0
	movaps	%xmm0, -64(%rbp)
	movl	l___const.hostapd_prepare_rates.basic_rates_b+8(%rip), %eax
	movl	%eax, -72(%rbp)
	movq	l___const.hostapd_prepare_rates.basic_rates_b(%rip), %rax
	movq	%rax, -80(%rbp)
	movl	l___const.hostapd_prepare_rates.basic_rates_g+16(%rip), %eax
	movl	%eax, -96(%rbp)
	movaps	l___const.hostapd_prepare_rates.basic_rates_g(%rip), %xmm0
	movaps	%xmm0, -112(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
LBB0_6:
	movl	$1, %eax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	decl	%eax
	cmpl	$0, (%rcx,%rbx)
	leaq	4(%rbx), %rbx
	jns	LBB0_7
## %bb.8:
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	testl	%eax, %eax
	cmovel	%eax, %ebx
	movq	24(%r13), %rdi
	callq	_os_free
	movl	%ebx, %edi
	callq	_os_malloc
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, %rdi
	movq	-128(%rbp), %rsi                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_os_memcpy
LBB0_10:
	movq	16(%r13), %rdi
	callq	_os_free
	movq	$0, (%r13)
	movl	4(%r15), %edi
	movl	$8, %esi
	callq	_os_calloc
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	cmpl	$0, 4(%r15)
	jle	LBB0_12
## %bb.14:
	xorl	%ebx, %ebx
	movl	$0, -116(%rbp)                  ## 4-byte Folded Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r14,%r12,8), %r8d
	movq	_HOSTAPD_RATE_BASIC@GOTPCREL(%rip), %rax
	orl	(%rax), %r8d
	movl	%r8d, (%r14,%r12,8)
	incl	-116(%rbp)                      ## 4-byte Folded Spill
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r13), %rdx
	movl	4(%r14,%r12,8), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	incq	(%r13)
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	movslq	4(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_22
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	callq	_hostapd_rate_found
	testq	%rax, %rax
	je	LBB0_21
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	(%r13), %r12
	movq	16(%r13), %r14
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	%esi, 4(%r14,%r12,8)
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	callq	_hostapd_rate_found
	testq	%rax, %rax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	(%r14,%r12,8), %r8d
	jmp	LBB0_20
LBB0_1:
	movl	(%r15), %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_28
## %bb.2:
	xorl	%eax, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	leaq	-112(%rbp), %rcx
	jmp	LBB0_6
LBB0_22:
	movq	(%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_23
## %bb.24:
	xorl	%eax, %eax
	movl	-116(%rbp), %ecx                ## 4-byte Reload
	testl	%ecx, %ecx
	jne	LBB0_29
	jmp	LBB0_25
LBB0_13:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_28
LBB0_12:
	movq	(%r13), %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_25
LBB0_23:
	movl	-116(%rbp), %ecx                ## 4-byte Reload
LBB0_25:
	movq	8(%r13), %rsi
	cmpl	$0, 20(%rsi)
	je	LBB0_27
## %bb.26:
	xorl	%eax, %eax
	cmpl	$0, 16(%rsi)
	jne	LBB0_29
LBB0_27:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_28:
	movl	$-1, %eax
LBB0_29:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_31
## %bb.30:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	-80(%rbp), %rcx
	jmp	LBB0_6
LBB0_5:
	leaq	-64(%rbp), %rcx
	jmp	LBB0_6
LBB0_31:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_4
	.long	L0_0_set_3
	.long	L0_0_set_29
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.hostapd_prepare_rates.basic_rates_a
L___const.hostapd_prepare_rates.basic_rates_a:
	.long	60                              ## 0x3c
	.long	120                             ## 0x78
	.long	240                             ## 0xf0
	.long	4294967295                      ## 0xffffffff

	.section	__TEXT,__const
	.p2align	2                               ## @__const.hostapd_prepare_rates.basic_rates_b
l___const.hostapd_prepare_rates.basic_rates_b:
	.long	10                              ## 0xa
	.long	20                              ## 0x14
	.long	4294967295                      ## 0xffffffff

	.p2align	4                               ## @__const.hostapd_prepare_rates.basic_rates_g
l___const.hostapd_prepare_rates.basic_rates_g:
	.long	10                              ## 0xa
	.long	20                              ## 0x14
	.long	55                              ## 0x37
	.long	110                             ## 0x6e
	.long	4294967295                      ## 0xffffffff

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate memory for rate table."

	.comm	_HOSTAPD_RATE_BASIC,4,2         ## @HOSTAPD_RATE_BASIC
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"RATE[%d] rate=%d flags=0x%x"

L_.str.2:                               ## @.str.2
	.asciz	"No rates remaining in supported/basic rate sets (%d,%d)."

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hostapd_prepare_rates          ; -- Begin function hostapd_prepare_rates
	.p2align	2
_hostapd_prepare_rates:                 ; @hostapd_prepare_rates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, l___const.hostapd_prepare_rates.basic_rates_a@PAGE
Lloh4:
	add	x8, x8, l___const.hostapd_prepare_rates.basic_rates_a@PAGEOFF
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp, #80]
Lloh6:
	adrp	x8, l___const.hostapd_prepare_rates.basic_rates_b@PAGE
Lloh7:
	add	x8, x8, l___const.hostapd_prepare_rates.basic_rates_b@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #64]
	ldr	w8, [x8, #8]
	str	w8, [sp, #72]
Lloh8:
	adrp	x8, l___const.hostapd_prepare_rates.basic_rates_g@PAGE
Lloh9:
	add	x8, x8, l___const.hostapd_prepare_rates.basic_rates_g@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #32]
	ldr	w8, [x8, #16]
	str	w8, [sp, #48]
	ldr	x8, [x0, #8]
	ldr	x21, [x8]
	cbz	x21, LBB0_15
LBB0_1:
	mov	x8, #0
	mov	w9, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x21, x8]
	add	x8, x8, #4
	sub	w9, w9, #1
	tbz	w10, #31, LBB0_2
; %bb.3:
	cmp	w9, #0
	csel	w22, wzr, w8, eq
	ldr	x0, [x19, #24]
	bl	_os_free
	mov	x0, x22
	bl	_os_malloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_5
; %bb.4:
	mov	x1, x21
	mov	x2, x22
	bl	_os_memcpy
LBB0_5:
	ldr	x0, [x19, #16]
	bl	_os_free
	str	xzr, [x19]
	ldr	w0, [x20, #4]
	mov	w1, #8
	bl	_os_calloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_20
; %bb.6:
	ldr	w8, [x20, #4]
	cmp	w8, #0
	b.le	LBB0_21
; %bb.7:
	mov	x24, #0
	mov	w23, #0
Lloh10:
	adrp	x25, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	adrp	x26, _HOSTAPD_RATE_BASIC@GOTPAGE
Lloh13:
	ldr	x26, [x26, _HOSTAPD_RATE_BASIC@GOTPAGEOFF]
Lloh14:
	adrp	x22, l_.str.1@PAGE
Lloh15:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x26]
	ldr	w9, [x28]
	orr	w8, w9, w8
	str	w8, [x28]
	add	w23, w23, #1
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w0, [x25]
	ldr	x9, [x19]
	ldr	w10, [x27]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
	mov	x1, x22
	bl	_wpa_printf
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x20, #4]
	cmp	x24, x8
	b.ge	LBB0_18
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x24, lsl #2]
	bl	_hostapd_rate_found
	cbz	x0, LBB0_10
LBB0_13:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #16]
	ldr	x9, [x19]
	add	x28, x8, x9, lsl #3
	ldr	x8, [x20, #8]
	ldr	w1, [x8, x24, lsl #2]
	mov	x27, x28
	str	w1, [x27, #4]!
	mov	x0, x21
	bl	_hostapd_rate_found
	cbnz	x0, LBB0_8
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x28]
	b	LBB0_9
LBB0_15:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_27
; %bb.16:
	mov	w0, #0
Lloh16:
	adrp	x9, lJTI0_0@PAGE
Lloh17:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_17
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_17:
	add	x21, sp, #32
	b	LBB0_1
LBB0_18:
	ldr	x8, [x19]
	cbz	x8, LBB0_22
; %bb.19:
	cbnz	w23, LBB0_24
	b	LBB0_22
LBB0_20:
Lloh18:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_26
LBB0_21:
	mov	w23, #0
	ldr	x8, [x19]
LBB0_22:
	ldr	x9, [x19, #8]
	ldr	w10, [x9, #20]
	cbz	w10, LBB0_25
; %bb.23:
	ldr	w9, [x9, #16]
	cbz	w9, LBB0_25
LBB0_24:
	mov	w0, #0
	b	LBB0_28
LBB0_25:
Lloh23:
	adrp	x9, _MSG_ERROR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _MSG_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x9]
	stp	x8, x23, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_26:
	bl	_wpa_printf
LBB0_27:
	mov	w0, #-1
LBB0_28:
	ldur	x8, [x29, #-88]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.29:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_30:
	add	x21, sp, #64
	b	LBB0_1
LBB0_31:
	add	x21, sp, #80
	b	LBB0_1
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_17-LBB0_17)>>2
	.byte	(LBB0_30-LBB0_17)>>2
	.byte	(LBB0_28-LBB0_17)>>2
	.byte	(LBB0_31-LBB0_17)>>2
                                        ; -- End function
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @__const.hostapd_prepare_rates.basic_rates_a
l___const.hostapd_prepare_rates.basic_rates_a:
	.long	60                              ; 0x3c
	.long	120                             ; 0x78
	.long	240                             ; 0xf0
	.long	4294967295                      ; 0xffffffff

	.section	__TEXT,__const
	.p2align	2                               ; @__const.hostapd_prepare_rates.basic_rates_b
l___const.hostapd_prepare_rates.basic_rates_b:
	.long	10                              ; 0xa
	.long	20                              ; 0x14
	.long	4294967295                      ; 0xffffffff

	.p2align	2                               ; @__const.hostapd_prepare_rates.basic_rates_g
l___const.hostapd_prepare_rates.basic_rates_g:
	.long	10                              ; 0xa
	.long	20                              ; 0x14
	.long	55                              ; 0x37
	.long	110                             ; 0x6e
	.long	4294967295                      ; 0xffffffff

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate memory for rate table."

	.comm	_HOSTAPD_RATE_BASIC,4,2         ; @HOSTAPD_RATE_BASIC
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"RATE[%d] rate=%d flags=0x%x"

l_.str.2:                               ; @.str.2
	.asciz	"No rates remaining in supported/basic rate sets (%d,%d)."

.subsections_via_symbols
