	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_add_beacon_rep_elem
_wpas_add_beacon_rep_elem:              ## @wpas_add_beacon_rep_elem
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPCREL(%rip), %rdx
	movq	16(%rdi), %rax
	testq	%rax, %rax
	movq	_BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %r13
	cmoveq	%rax, %r13
	addq	(%rdx), %r13
	movq	(%r9), %rax
	leaq	(%rax,%r13), %rdi
	addq	$18, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_os_memcpy
	movl	24(%r15), %edi
	movq	(%r15), %rsi
	leaq	16(%r14), %rcx
	movl	(%r12), %r8d
	addl	$14, %r8d
	xorl	%eax, %eax
	cmpl	$0, 16(%rbp)
	sete	%al
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	pushq	%rax
	pushq	%r12
	callq	_wpas_beacon_rep_add_frame_body
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	%ebx, %eax
	leaq	(%r14,%rax,4), %rcx
	addq	$16, %rcx
	movq	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 16(%r14,%rax,4)
	movabsq	$4294967298, %rdx               ## imm = 0x100000002
	movq	%rdx, 20(%r14,%rax,4)
	movl	16(%rbp), %edi
	movl	%edi, 28(%r14,%rax,4)
	movq	(%r15), %rdx
	movq	_BEACON_REPORT_DETAIL_NONE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	movl	%edi, %esi
	je	LBB0_6
## %bb.4:
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:
	movq	_REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPCREL(%rip), %rdx
	orl	(%rdx), %esi
	movl	%esi, %edx
	jmp	LBB0_7
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_11
LBB0_6:
	movq	_REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%esi, %edx
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%edx, 12(%rcx)
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.8:
	movq	_REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, (%rcx,%rdx,4)
	movq	$1, 4(%rcx,%rdx,4)
LBB0_9:
	movl	8(%r15), %esi
	movq	_MEASUREMENT_REPORT_MODE_ACCEPT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MEASURE_TYPE_BEACON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%r13), %r9
	addq	$4, %r9
	movq	%r14, %r8
	callq	_wpas_rrm_report_elem
	movl	%eax, %ebx
LBB0_10:
	movq	%r14, %rdi
	callq	_os_free
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REPORTED_FRAME_BODY_SUBELEM_LEN,8,3 ## @REPORTED_FRAME_BODY_SUBELEM_LEN
	.comm	_BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN,4,2 ## @BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN
	.comm	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID,4,2 ## @WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID
	.comm	_BEACON_REPORT_DETAIL_NONE,8,3  ## @BEACON_REPORT_DETAIL_NONE
	.comm	_REPORTED_FRAME_BODY_MORE_FRAGMENTS,4,2 ## @REPORTED_FRAME_BODY_MORE_FRAGMENTS
	.comm	_WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION,4,2 ## @WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION
	.comm	_MEASUREMENT_REPORT_MODE_ACCEPT,4,2 ## @MEASUREMENT_REPORT_MODE_ACCEPT
	.comm	_MEASURE_TYPE_BEACON,4,2        ## @MEASURE_TYPE_BEACON
	.no_dead_strip	_wpas_add_beacon_rep_elem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function wpas_add_beacon_rep_elem
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_wpas_add_beacon_rep_elem:              ; @wpas_add_beacon_rep_elem
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x6
	mov	x23, x5
	mov	x24, x4
	mov	x26, x3
	mov	x19, x2
	mov	x25, x1
	mov	x21, x0
Lloh0:
	adrp	x28, _REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPAGE
Lloh1:
	ldr	x28, [x28, _REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPAGEOFF]
	ldr	x8, [x28]
	ldr	x9, [x0, #16]
Lloh2:
	adrp	x10, _BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN@GOTPAGEOFF]
Lloh4:
	ldrsw	x10, [x10]
	cmp	x9, #0
	csel	x9, xzr, x10, eq
	ldr	x10, [x5]
	add	x27, x9, x8
	add	x8, x10, x27
	add	x0, x8, #18
	bl	_os_malloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x1, x26
	mov	w2, #4
	bl	_os_memcpy
	ldr	w0, [x21, #24]
	ldr	x1, [x21]
	add	x3, x20, #16
	ldr	w8, [x23]
	add	w4, w8, #14
	cmp	w22, #0
	cset	w7, eq
	mov	x2, x25
	mov	x5, x24
	mov	x6, x23
	bl	_wpas_beacon_rep_add_frame_body
	mov	x24, x0
	tbnz	w0, #31, LBB0_10
; %bb.2:
	mov	w8, w24
	add	x9, x20, w24, uxtw #2
Lloh5:
	adrp	x10, _WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID@GOTPAGE
Lloh6:
	ldr	x10, [x10, _WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	str	w10, [x9, #16]!
Lloh8:
	adrp	x10, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x10, lCPI0_0@PAGEOFF]
	stur	d0, [x9, #4]
	str	w22, [x9, #12]
	ldr	x10, [x21]
Lloh10:
	adrp	x11, _BEACON_REPORT_DETAIL_NONE@GOTPAGE
Lloh11:
	ldr	x11, [x11, _BEACON_REPORT_DETAIL_NONE@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	cmp	x10, x11
	b.eq	LBB0_6
; %bb.3:
	ldr	x10, [x23]
	cbz	x10, LBB0_6
; %bb.4:
Lloh13:
	adrp	x10, _REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPAGE
Lloh14:
	ldr	x10, [x10, _REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	orr	w10, w10, w22
	b	LBB0_7
LBB0_5:
	mov	w24, #-1
	b	LBB0_11
LBB0_6:
Lloh16:
	adrp	x10, _REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPAGE
Lloh17:
	ldr	x10, [x10, _REPORTED_FRAME_BODY_MORE_FRAGMENTS@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	bic	w10, w22, w10
LBB0_7:
	str	w10, [x9, #12]
	ldr	x10, [x21, #16]
	cbz	x10, LBB0_9
; %bb.8:
	ldr	x10, [x28]
Lloh19:
	adrp	x11, _WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION@GOTPAGE
Lloh20:
	ldr	x11, [x11, _WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION@GOTPAGEOFF]
	add	x9, x9, x10, lsl #2
Lloh21:
	ldr	w10, [x11]
	str	w10, [x9]
Lloh22:
	adrp	x10, lCPI0_1@PAGE
Lloh23:
	ldr	d0, [x10, lCPI0_1@PAGEOFF]
	stur	d0, [x9, #4]
LBB0_9:
	ldr	w1, [x21, #8]
Lloh24:
	adrp	x9, _MEASUREMENT_REPORT_MODE_ACCEPT@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MEASUREMENT_REPORT_MODE_ACCEPT@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x9]
Lloh27:
	adrp	x9, _MEASURE_TYPE_BEACON@GOTPAGE
Lloh28:
	ldr	x9, [x9, _MEASURE_TYPE_BEACON@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x9]
	add	x8, x27, x8
	add	x5, x8, #4
	mov	x0, x19
	mov	x4, x20
	bl	_wpas_rrm_report_elem
	mov	x24, x0
LBB0_10:
	mov	x0, x20
	bl	_os_free
LBB0_11:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdr	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_REPORTED_FRAME_BODY_SUBELEM_LEN,8,3 ; @REPORTED_FRAME_BODY_SUBELEM_LEN
	.comm	_BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN,4,2 ; @BEACON_REPORT_LAST_INDICATION_SUBELEM_LEN
	.comm	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID,4,2 ; @WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY_FRAGMENT_ID
	.comm	_BEACON_REPORT_DETAIL_NONE,8,3  ; @BEACON_REPORT_DETAIL_NONE
	.comm	_REPORTED_FRAME_BODY_MORE_FRAGMENTS,4,2 ; @REPORTED_FRAME_BODY_MORE_FRAGMENTS
	.comm	_WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION,4,2 ; @WLAN_BEACON_REPORT_SUBELEM_LAST_INDICATION
	.comm	_MEASUREMENT_REPORT_MODE_ACCEPT,4,2 ; @MEASUREMENT_REPORT_MODE_ACCEPT
	.comm	_MEASURE_TYPE_BEACON,4,2        ; @MEASURE_TYPE_BEACON
	.no_dead_strip	_wpas_add_beacon_rep_elem
.subsections_via_symbols
