	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_find_disconn_antenna
_iwl_find_disconn_antenna:              ## @iwl_find_disconn_antenna
	.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	%rdx, %rbx
	movq	%rdi, %r15
	movl	(%rdx), %eax
	movq	_IWL_CAL_NUM_BEACONS@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movl	%eax, %r8d
	movl	%eax, (%rsi)
	movl	4(%rbx), %eax
	movl	(%rcx), %edi
	cltd
	idivl	%edi
	movl	%eax, %ecx
	movl	%eax, 4(%rsi)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %eax
	cltd
	idivl	%edi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, 8(%rsi)
	xorl	%edx, %edx
	cmpl	%ecx, %r8d
	setl	%dl
	movl	%ecx, %ebx
	cmovgl	%r8d, %ebx
	cmpl	%ebx, %eax
	movl	$2, %r14d
	cmovll	%edx, %r14d
	cmovgl	%eax, %ebx
	leal	1(%rdx), %edx
	movl	$4, %r13d
	cmovll	%edx, %r13d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r8d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	movq	_NUM_RX_CHAINS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	%r15, %r12
	movl	%r14d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	btsl	%r14d, %r13d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	(%rax,%r14,4), %r8d
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	movq	_NUM_RX_CHAINS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	%ecx, %rax
	cmpq	%rax, %r14
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %r15
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ebx, %ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	subl	(%rax,%r14,4), %ecx
	movq	_MAXIMUM_ALLOWED_PATHLOSS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	$1, (%rax,%r14,4)
	movl	$1, %r8d
	jmp	LBB0_7
LBB0_9:
	movq	%r12, %r15
	movq	(%r12), %rdx
	movl	(%rdx), %eax
	andl	%eax, %r13d
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.10:
	movq	8(%rdx), %rdi
	movl	%ecx, %edx
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%rcx
	cmpq	%rcx, %rdx
	je	LBB0_16
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	$1, %ebx
	shll	%cl, %ebx
	movslq	%ebx, %rbx
	testq	%rbx, %rdi
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	16(%rbx), %rbx
	cmpl	$0, (%rbx,%rcx,4)
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rsi
	cmpq	16(%r15), %rsi
	jne	LBB0_15
## %bb.14:
	callq	_find_first_chain
	movq	%rax, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movl	$0, (%rax,%rbx,4)
	movq	%rbx, %rdi
	callq	_BIT
	orl	%eax, %r13d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
	movq	(%r15), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_1:
	movq	(%r15), %rax
	movl	(%rax), %eax
	andl	%eax, %r13d
LBB0_16:
	cmpl	%eax, %r13d
	je	LBB0_19
## %bb.17:
	cmpl	8(%r15), %r13d
	je	LBB0_19
## %bb.18:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_IWL_DEBUG_CALIB
LBB0_19:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r13d, 24(%rax)
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IWL_DEBUG_CALIB                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IWL_CAL_NUM_BEACONS,4,2        ## @IWL_CAL_NUM_BEACONS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"average_sig: a %d b %d c %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"max_average_sig = %d, antenna %d\n"

	.comm	_NUM_RX_CHAINS,4,2              ## @NUM_RX_CHAINS
	.comm	_MAXIMUM_ALLOWED_PATHLOSS,4,2   ## @MAXIMUM_ALLOWED_PATHLOSS
L_.str.2:                               ## @.str.2
	.asciz	"i = %d  rssiDelta = %d  disconn_array[i] = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"All Tx chains are disconnected W/A - declare %d as connected\n"

L_.str.4:                               ## @.str.4
	.asciz	"Detected that not all antennas are connected! Connected: %#x, valid: %#x.\n"

L_.str.5:                               ## @.str.5
	.asciz	"active_chains (bitwise) = 0x%x\n"

	.no_dead_strip	_iwl_find_disconn_antenna
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_find_disconn_antenna
_iwl_find_disconn_antenna:              ; @iwl_find_disconn_antenna
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _IWL_CAL_NUM_BEACONS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IWL_CAL_NUM_BEACONS@GOTPAGEOFF]
	ldr	w10, [x9]
	sdiv	w2, w8, w10
	str	w2, [x1]
	ldr	w8, [x20, #4]
	ldr	w9, [x9]
	sdiv	w8, w8, w9
	str	w8, [x1, #4]
	ldr	w10, [x20, #8]
	sdiv	w9, w10, w9
	str	w9, [x1, #8]
	cmp	w2, w8
	csel	w10, w2, w8, gt
	cset	w11, lt
	mov	w12, #1
	cinc	w12, w12, lt
	mov	w13, #2
	cmp	w9, w10
	csel	w27, w11, w13, lt
	csel	w22, w9, w10, gt
	mov	w10, #4
	csel	w25, w12, w10, lt
	stp	x8, x9, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_IWL_DEBUG_CALIB
	mov	x8, x27
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_IWL_DEBUG_CALIB
Lloh6:
	adrp	x28, _NUM_RX_CHAINS@GOTPAGE
Lloh7:
	ldr	x28, [x28, _NUM_RX_CHAINS@GOTPAGEOFF]
	ldr	w9, [x28]
	cmp	w9, #0
	b.le	LBB0_15
; %bb.1:
	mov	x23, #0
Lloh8:
	adrp	x26, _MAXIMUM_ALLOWED_PATHLOSS@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MAXIMUM_ALLOWED_PATHLOSS@GOTPAGEOFF]
Lloh10:
	adrp	x24, l_.str.2@PAGE
Lloh11:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w9, #1
	lsl	w9, w9, w23
	orr	w25, w25, w9
	ldr	x9, [x20, #16]
	ldr	w9, [x9, x23, lsl #2]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	stp	x8, x9, [sp]
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_IWL_DEBUG_CALIB
	ldr	w9, [x28]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	cmp	x23, w9, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x23
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21, x23, lsl #2]
	ldr	w9, [x26]
	sub	w8, w22, w8
	cmp	w8, w9
	b.le	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x10, [x20, #16]
	mov	w9, #1
	str	w9, [x10, x23, lsl #2]
	b	LBB0_3
LBB0_8:
	ldr	x12, [x19]
	ldr	w8, [x12]
	and	w21, w8, w25
	cmp	w9, #1
	b.lt	LBB0_16
; %bb.9:
	mov	x10, #0
	mov	x11, #0
	ldr	x0, [x12, #8]
	mov	w12, #1
	mov	w9, w9
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x10, x10, #1
	cmp	x9, x10
	b.eq	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	lsl	w13, w12, w10
	sxtw	x13, w13
	tst	x0, x13
	b.eq	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x13, [x20, #16]
	ldr	w13, [x13, x10, lsl #2]
	cbz	w13, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x11, x11, #1
	ldr	x13, [x19, #16]
	cmp	x11, x13
	b.ne	LBB0_10
; %bb.14:
	bl	_find_first_chain
	mov	x22, x0
	ldr	x8, [x20, #16]
	str	wzr, [x8, x0, lsl #2]
	bl	_BIT
	orr	w21, w0, w21
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_IWL_DEBUG_CALIB
	ldr	x8, [x19]
	ldr	w8, [x8]
	b	LBB0_16
LBB0_15:
	ldr	x8, [x19]
	ldr	w8, [x8]
	and	w21, w8, w25
LBB0_16:
	cmp	w21, w8
	b.eq	LBB0_19
; %bb.17:
	ldr	w9, [x19, #8]
	cmp	w21, w9
	b.eq	LBB0_19
; %bb.18:
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_IWL_DEBUG_CALIB
LBB0_19:
	str	w21, [x20, #24]
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_IWL_DEBUG_CALIB
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_IWL_CAL_NUM_BEACONS,4,2        ; @IWL_CAL_NUM_BEACONS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"average_sig: a %d b %d c %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"max_average_sig = %d, antenna %d\n"

	.comm	_NUM_RX_CHAINS,4,2              ; @NUM_RX_CHAINS
	.comm	_MAXIMUM_ALLOWED_PATHLOSS,4,2   ; @MAXIMUM_ALLOWED_PATHLOSS
l_.str.2:                               ; @.str.2
	.asciz	"i = %d  rssiDelta = %d  disconn_array[i] = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"All Tx chains are disconnected W/A - declare %d as connected\n"

l_.str.4:                               ; @.str.4
	.asciz	"Detected that not all antennas are connected! Connected: %#x, valid: %#x.\n"

l_.str.5:                               ; @.str.5
	.asciz	"active_chains (bitwise) = 0x%x\n"

	.no_dead_strip	_iwl_find_disconn_antenna
.subsections_via_symbols
