	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_beacon_rep_add_frame_body
_wpas_beacon_rep_add_frame_body:        ## @wpas_beacon_rep_add_frame_body
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %edx
	movq	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jae	LBB0_2
## %bb.1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$-1, %r13d
	jmp	LBB0_21
LBB0_2:
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	_BEACON_REPORT_DETAIL_NONE@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	cmpl	%edx, (%rax)
	je	LBB0_21
## %bb.3:
	movq	%rcx, %rbx
	movl	24(%rbp), %eax
	movq	16(%rbp), %rsi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %r14
	movq	(%rsi), %r15
	movq	_REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cmpq	$13, %r8
	ja	LBB0_5
## %bb.4:
	movl	$-1, %r13d
	testl	%eax, %eax
	jne	LBB0_21
LBB0_5:
	leaq	8(%rbx), %r13
	movq	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rbx)
	testl	%eax, %eax
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	je	LBB0_7
## %bb.6:
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %esi
	movq	%r13, %rdi
	movq	%r8, %r13
	callq	_WPA_PUT_LE64
	leaq	24(%rbx), %rdi
	movl	4(%r12), %esi
	callq	_WPA_PUT_LE16
	leaq	32(%rbx), %rdi
	movl	(%r12), %esi
	callq	_WPA_PUT_LE16
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %r8
	leaq	40(%rbx), %r13
LBB0_7:
	cmpq	$3, %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jb	LBB0_20
## %bb.8:
	movq	%r13, %rax
	subq	%rbx, %rax
	shrq	$2, %rax
	addl	%eax, %esi
	movl	$245, %r12d
	subl	%esi, %r12d
	leaq	(%rbx,%r8,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPCREL(%rip), %rdx
	jmp	LBB0_9
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%r14), %eax
	addl	$2, %eax
	subq	%rax, %r15
	leaq	(%r14,%rax,4), %r14
	cmpq	$2, %r15
	jbe	LBB0_20
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %ebx
	leal	2(%rbx), %eax
	cmpq	%rax, %r15
	jb	LBB0_20
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	testl	%r12d, %r12d
	jle	LBB0_20
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpl	%ecx, (%rdx)
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %esi
	callq	_bitfield_is_set
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%r14), %ebx
	leal	2(%rbx), %eax
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subq	%r13, %rcx
	sarq	$2, %rcx
	cmpq	%rax, %rcx
	jl	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_9 Depth=1
	subl	%eax, %r12d
	jb	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14), %eax
	movl	%eax, (%r13)
	leaq	8(%r13), %rdi
	movl	%ebx, 4(%r13)
	leaq	8(%r14), %rsi
	movl	%ebx, %edx
	callq	_os_memcpy
	movq	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPCREL(%rip), %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %eax
	leaq	8(%r13,%rax,4), %r13
	jmp	LBB0_19
LBB0_20:
	movq	16(%rbp), %rax
	movq	%r15, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	subq	%rcx, %r13
	shrq	$2, %r13
	leal	-2(%r13), %eax
	movl	%eax, 4(%rcx)
LBB0_21:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REPORTED_FRAME_BODY_SUBELEM_LEN,4,2 ## @REPORTED_FRAME_BODY_SUBELEM_LEN
	.comm	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS,4,2 ## @BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Beacon Request: Invalid reporting detail: %d"

	.comm	_BEACON_REPORT_DETAIL_NONE,4,2  ## @BEACON_REPORT_DETAIL_NONE
	.comm	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY,4,2 ## @WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY
	.no_dead_strip	_wpas_beacon_rep_add_frame_body
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_beacon_rep_add_frame_body
_wpas_beacon_rep_add_frame_body:        ; @wpas_beacon_rep_add_frame_body
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x1
Lloh0:
	adrp	x8, _BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.hs	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_wpa_printf
	mov	w0, #-1
	b	LBB0_20
LBB0_2:
Lloh8:
	adrp	x8, _BEACON_REPORT_DETAIL_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BEACON_REPORT_DETAIL_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_20
LBB0_4:
	mov	x20, x5
	mov	x25, x4
	mov	x19, x3
	mov	x26, x2
	mov	x23, x0
	ldr	x27, [x5]
	ldr	x28, [x6]
Lloh11:
	adrp	x8, _REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _REPORTED_FRAME_BODY_SUBELEM_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	cmp	x4, #13
	b.hi	LBB0_7
; %bb.5:
	cbz	w7, LBB0_7
; %bb.6:
	mov	w0, #-1
	b	LBB0_20
LBB0_7:
	str	x6, [sp, #8]                    ; 8-byte Folded Spill
Lloh14:
	adrp	x8, _WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	mov	x24, x19
	str	w8, [x24], #8
	cbz	w7, LBB0_9
; %bb.8:
	ldr	w1, [x26, #8]
	mov	x0, x24
	bl	_WPA_PUT_LE64
	add	x0, x19, #24
	ldr	w1, [x26, #4]
	bl	_WPA_PUT_LE16
	add	x0, x19, #32
	ldr	w1, [x26]
	bl	_WPA_PUT_LE16
	add	x24, x19, #40
LBB0_9:
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	cmp	x28, #3
	b.lo	LBB0_19
; %bb.10:
	sub	x8, x24, x19
	lsr	x8, x8, #2
	mov	w9, #245
	add	w8, w21, w8
	sub	w21, w9, w8
	add	x8, x19, x25, lsl #2
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	b	LBB0_14
LBB0_11:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	sub	x8, x8, x24
	cmp	x20, x8, asr #2
	ccmp	w21, w20, #0, le
	b.lo	LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x27
	ldr	w8, [x1], #8
	add	x26, x24, #8
	stp	w8, w25, [x24]
	mov	x0, x26
	mov	x2, x25
	bl	_os_memcpy
	add	x24, x26, w25, uxtw #2
	sub	w21, w21, w20
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [x27, #4]
	add	w8, w8, #2
	sub	x28, x28, x8
	add	x27, x27, w8, uxtw #2
	cmp	x28, #2
	b.ls	LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x27, #4]
	add	w20, w25, #2
	cmp	x28, x20
	ccmp	w21, #1, #8, hs
	b.lt	LBB0_19
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh17:
	adrp	x8, _BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	cbz	x23, LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w1, [x27]
	mov	x0, x23
	bl	_bitfield_is_set
	cbz	x0, LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w25, [x27, #4]
	add	w20, w25, #2
	b	LBB0_11
LBB0_19:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x28, [x8]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x27, [x8]
	sub	x8, x24, x19
	lsr	x0, x8, #2
	sub	w8, w0, #2
	str	w8, [x19, #4]
LBB0_20:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_REPORTED_FRAME_BODY_SUBELEM_LEN,4,2 ; @REPORTED_FRAME_BODY_SUBELEM_LEN
	.comm	_BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS,4,2 ; @BEACON_REPORT_DETAIL_ALL_FIELDS_AND_ELEMENTS
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Beacon Request: Invalid reporting detail: %d"

	.comm	_BEACON_REPORT_DETAIL_NONE,4,2  ; @BEACON_REPORT_DETAIL_NONE
	.comm	_WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY,4,2 ; @WLAN_BEACON_REPORT_SUBELEM_FRAME_BODY
	.no_dead_strip	_wpas_beacon_rep_add_frame_body
.subsections_via_symbols
