	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_dbgfs_scan_ant_rxchain_write
_iwl_dbgfs_scan_ant_rxchain_write:      ## @iwl_dbgfs_scan_ant_rxchain_write
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_iwl_mvm_firmware_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movl	-28(%rbp), %ebx
	movq	_ANT_ABC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_4
## %bb.6:
	movq	%r14, %rdi
	callq	_iwl_mvm_get_valid_rx_ant
	notl	%eax
	testl	%eax, %ebx
	je	LBB0_7
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r15d, %r15d
	subq	(%rax), %r15
LBB0_10:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	-28(%rbp), %eax
	cmpl	%eax, (%r14)
	je	LBB0_10
## %bb.8:
	movl	%eax, (%r14)
	movq	8(%r14), %rdi
	movq	_IWL_UCODE_TLV_CAPA_UMAC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_fw_has_capa
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_iwl_mvm_config_scan
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,8,3                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%hhx"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_ANT_ABC,4,2                    ## @ANT_ABC
	.comm	_IWL_UCODE_TLV_CAPA_UMAC_SCAN,4,2 ## @IWL_UCODE_TLV_CAPA_UMAC_SCAN
	.no_dead_strip	_iwl_dbgfs_scan_ant_rxchain_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iwl_dbgfs_scan_ant_rxchain_write
_iwl_dbgfs_scan_ant_rxchain_write:      ; @iwl_dbgfs_scan_ant_rxchain_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_iwl_mvm_firmware_running
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x21
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.2:
	ldr	w21, [sp, #12]
Lloh2:
	adrp	x8, _ANT_ABC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ANT_ABC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w21, w8
	b.gt	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_iwl_mvm_get_valid_rx_ant
	bics	wzr, w21, w0
	b.eq	LBB0_8
LBB0_4:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_6:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w9, [x20]
	ldr	w8, [sp, #12]
	cmp	w9, w8
	b.eq	LBB0_7
; %bb.9:
	str	w8, [x20]
	ldr	x0, [x20, #8]
Lloh9:
	adrp	x8, _IWL_UCODE_TLV_CAPA_UMAC_SCAN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IWL_UCODE_TLV_CAPA_UMAC_SCAN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_fw_has_capa
	cbz	x0, LBB0_7
; %bb.10:
	mov	x0, x20
	bl	_iwl_mvm_config_scan
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,8,3                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%hhx"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_ANT_ABC,4,2                    ; @ANT_ABC
	.comm	_IWL_UCODE_TLV_CAPA_UMAC_SCAN,4,2 ; @IWL_UCODE_TLV_CAPA_UMAC_SCAN
	.no_dead_strip	_iwl_dbgfs_scan_ant_rxchain_write
.subsections_via_symbols
