	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function il3945_get_measurement
_il3945_get_measurement:                ## @il3945_get_measurement
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	-136(%rbp), %rax
	movq	%rax, -88(%rbp)
	movq	$0, -72(%rbp)
	movq	_CMD_WANT_SKB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_C_SPECTRUM_MEASUREMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movl	4(%rsi), %edi
	callq	_le64_to_cpu
	movq	%rax, %rbx
	movl	8(%r15), %edi
	callq	_le16_to_cpu
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_il_is_associated
	testq	%rax, %rax
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movl	4(%r15), %edi
	callq	_le64_to_cpu
	movq	%rax, %rbx
	subq	24(%r13), %rbx
	movl	8(%r13), %edi
	callq	_le16_to_cpu
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_il_usecs_to_beacons
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_1:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
LBB0_3:
	leaq	-136(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	$1, %edi
	callq	_cpu_to_le16
	movq	%rax, -96(%rbp)
	movq	_RXON_FLG_TSF2HOST_MSK@GOTPCREL(%rip), %rax
	movq	_RXON_FLG_ANT_A_MSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_RXON_FLG_DIS_DIV_MSK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -136(%rbp)
	movq	_MEASUREMENT_FILTER_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	movl	$48, -80(%rbp)
	movl	$40, %edi
	callq	_cpu_to_le16
	movq	%rax, -112(%rbp)
	movq	%r13, %rdi
	callq	_il_is_associated
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	8(%r13), %edi
	movl	16(%r13), %ebx
	callq	_le16_to_cpu
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_il_add_beacon_time
	movq	%rax, %r14
LBB0_5:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movq	%r14, -120(%rbp)
	movq	_TIME_UNIT@GOTPCREL(%rip), %rax
	imull	(%rax), %r12d
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movq	-128(%rbp), %rcx
	movl	%eax, 8(%rcx)
	movl	(%r15), %eax
	movl	%eax, 4(%rcx)
	movl	%ebx, (%rcx)
	movq	_RXON_FLG_BAND_24G_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_7
## %bb.6:
	movq	_RXON_FLG_AUTO_DETECT_MSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_RXON_FLG_TGG_PROTECT_MSK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	orl	%eax, -136(%rbp)
LBB0_7:
	leaq	-88(%rbp), %rsi
	movq	%r13, %rdi
	callq	_il_send_cmd_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.8:
	movq	-72(%rbp), %r14
	movq	_IL_CMD_FAILED_MSK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_9
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_IL_ERR
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_9:
	xorl	%ebx, %ebx
LBB0_11:
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	cmpl	$1, %eax
	je	LBB0_17
## %bb.12:
	testl	%eax, %eax
	jne	LBB0_18
## %bb.13:
	movl	(%r14), %esi
	cmpl	$255, %esi
	jne	LBB0_15
## %bb.14:
	movl	(%r13), %eax
	jmp	LBB0_16
LBB0_17:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_15:
	leaq	L_.str.1(%rip), %rdi
	callq	_D_INFO
	movq	_MEASUREMENT_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	(%r13), %eax
	movl	%eax, (%r13)
LBB0_16:
	movq	_MEASUREMENT_ACTIVE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r13)
	xorl	%ebx, %ebx
LBB0_18:
	movq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_il_free_pages
LBB0_19:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_WANT_SKB,4,2               ## @CMD_WANT_SKB
	.comm	_C_SPECTRUM_MEASUREMENT,4,2     ## @C_SPECTRUM_MEASUREMENT
	.comm	_RXON_FLG_TSF2HOST_MSK,4,2      ## @RXON_FLG_TSF2HOST_MSK
	.comm	_RXON_FLG_ANT_A_MSK,4,2         ## @RXON_FLG_ANT_A_MSK
	.comm	_RXON_FLG_DIS_DIV_MSK,4,2       ## @RXON_FLG_DIS_DIV_MSK
	.comm	_MEASUREMENT_FILTER_FLAG,4,2    ## @MEASUREMENT_FILTER_FLAG
	.comm	_TIME_UNIT,4,2                  ## @TIME_UNIT
	.comm	_RXON_FLG_BAND_24G_MSK,4,2      ## @RXON_FLG_BAND_24G_MSK
	.comm	_RXON_FLG_AUTO_DETECT_MSK,4,2   ## @RXON_FLG_AUTO_DETECT_MSK
	.comm	_RXON_FLG_TGG_PROTECT_MSK,4,2   ## @RXON_FLG_TGG_PROTECT_MSK
	.comm	_IL_CMD_FAILED_MSK,4,2          ## @IL_CMD_FAILED_MSK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad return from N_RX_ON_ASSOC command\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Replaced existing measurement: %d\n"

	.comm	_MEASUREMENT_READY,4,2          ## @MEASUREMENT_READY
	.comm	_MEASUREMENT_ACTIVE,4,2         ## @MEASUREMENT_ACTIVE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_il3945_get_measurement
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function il3945_get_measurement
_il3945_get_measurement:                ; @il3945_get_measurement
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	add	x8, sp, #32
	str	x8, [sp]
	str	xzr, [sp, #16]
Lloh0:
	adrp	x8, _CMD_WANT_SKB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_WANT_SKB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _C_SPECTRUM_MEASUREMENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _C_SPECTRUM_MEASUREMENT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #24]
	ldr	w0, [x1, #4]
	bl	_le64_to_cpu
	mov	x23, x0
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	mov	x22, x0
	mov	x0, x19
	bl	_il_is_associated
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x21, #4]
	bl	_le64_to_cpu
	ldr	x8, [x19, #24]
	sub	x23, x0, x8
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_il_usecs_to_beacons
	mov	x23, x0
LBB0_2:
	mov	w24, #48
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	w0, #1
	bl	_cpu_to_le16
	str	x0, [sp, #72]
Lloh6:
	adrp	x8, _RXON_FLG_TSF2HOST_MSK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RXON_FLG_TSF2HOST_MSK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _RXON_FLG_ANT_A_MSK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RXON_FLG_ANT_A_MSK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _RXON_FLG_DIS_DIV_MSK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _RXON_FLG_DIS_DIV_MSK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _MEASUREMENT_FILTER_FLAG@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MEASUREMENT_FILTER_FLAG@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	str	w8, [sp, #32]
	str	w9, [sp, #64]
	str	w24, [sp, #8]
	mov	w0, #40
	bl	_cpu_to_le16
	str	x0, [sp, #56]
	mov	x0, x19
	bl	_il_is_associated
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w24, [x19, #16]
	ldr	w0, [x19, #8]
	bl	_le16_to_cpu
	mov	x3, x0
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_il_add_beacon_time
LBB0_4:
	str	x0, [sp, #48]
Lloh18:
	adrp	x8, _TIME_UNIT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TIME_UNIT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mul	w0, w8, w22
	bl	_cpu_to_le32
	ldr	x8, [sp, #40]
	str	w0, [x8, #8]
	ldr	w9, [x21]
	stp	w20, w9, [x8]
	ldr	w9, [x19, #4]
Lloh21:
	adrp	x8, _RXON_FLG_BAND_24G_MSK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RXON_FLG_BAND_24G_MSK@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.5:
Lloh24:
	adrp	x9, _RXON_FLG_AUTO_DETECT_MSK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _RXON_FLG_AUTO_DETECT_MSK@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _RXON_FLG_TGG_PROTECT_MSK@GOTPAGE
Lloh28:
	ldr	x10, [x10, _RXON_FLG_TGG_PROTECT_MSK@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh29:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [sp, #32]
	orr	w8, w8, w9
	str	w8, [sp, #32]
LBB0_6:
	mov	x1, sp
	mov	x0, x19
	bl	_il_send_cmd_sync
	mov	x20, x0
	cbnz	w0, LBB0_18
; %bb.7:
	ldr	x21, [sp, #16]
	ldr	w8, [x21, #8]
Lloh30:
	adrp	x9, _IL_CMD_FAILED_MSK@GOTPAGE
Lloh31:
	ldr	x9, [x9, _IL_CMD_FAILED_MSK@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
Lloh33:
	adrp	x0, l_.str@PAGE
Lloh34:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IL_ERR
Lloh35:
	adrp	x8, _EIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	cmp	w0, #1
	b.eq	LBB0_14
; %bb.11:
	cbnz	w0, LBB0_17
; %bb.12:
	ldr	w1, [x21]
	cmp	w1, #255
	b.ne	LBB0_15
; %bb.13:
	ldr	w8, [x19]
	b	LBB0_16
LBB0_14:
Lloh38:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_17
LBB0_15:
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_D_INFO
Lloh43:
	adrp	x8, _MEASUREMENT_READY@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MEASUREMENT_READY@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
LBB0_16:
	mov	w20, #0
Lloh46:
	adrp	x9, _MEASUREMENT_ACTIVE@GOTPAGE
Lloh47:
	ldr	x9, [x9, _MEASUREMENT_ACTIVE@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_17:
	ldr	x1, [sp, #16]
	mov	x0, x19
	bl	_il_free_pages
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_WANT_SKB,4,2               ; @CMD_WANT_SKB
	.comm	_C_SPECTRUM_MEASUREMENT,4,2     ; @C_SPECTRUM_MEASUREMENT
	.comm	_RXON_FLG_TSF2HOST_MSK,4,2      ; @RXON_FLG_TSF2HOST_MSK
	.comm	_RXON_FLG_ANT_A_MSK,4,2         ; @RXON_FLG_ANT_A_MSK
	.comm	_RXON_FLG_DIS_DIV_MSK,4,2       ; @RXON_FLG_DIS_DIV_MSK
	.comm	_MEASUREMENT_FILTER_FLAG,4,2    ; @MEASUREMENT_FILTER_FLAG
	.comm	_TIME_UNIT,4,2                  ; @TIME_UNIT
	.comm	_RXON_FLG_BAND_24G_MSK,4,2      ; @RXON_FLG_BAND_24G_MSK
	.comm	_RXON_FLG_AUTO_DETECT_MSK,4,2   ; @RXON_FLG_AUTO_DETECT_MSK
	.comm	_RXON_FLG_TGG_PROTECT_MSK,4,2   ; @RXON_FLG_TGG_PROTECT_MSK
	.comm	_IL_CMD_FAILED_MSK,4,2          ; @IL_CMD_FAILED_MSK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad return from N_RX_ON_ASSOC command\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Replaced existing measurement: %d\n"

	.comm	_MEASUREMENT_READY,4,2          ; @MEASUREMENT_READY
	.comm	_MEASUREMENT_ACTIVE,4,2         ; @MEASUREMENT_ACTIVE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_il3945_get_measurement
.subsections_via_symbols
