	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iwl_dbgfs_sram_write
_iwl_dbgfs_sram_write:                  ## @iwl_dbgfs_sram_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_iwl_mvm_firmware_running
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_IWL_UCODE_SECTION_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,8), %r12d
	movl	4(%rax,%rcx,8), %r13d
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	movq	%r15, %rdi
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.3:
	movl	-48(%rbp), %eax
	testb	$3, %al
	jne	LBB0_1
## %bb.4:
	movl	-44(%rbp), %ecx
	testb	$3, %cl
	jne	LBB0_1
## %bb.5:
	leal	(%rcx,%rax), %edx
	addl	%r12d, %r13d
	cmpl	%r13d, %edx
	jle	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_8
LBB0_7:
	movq	$0, (%rbx)
LBB0_8:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	%eax, (%rbx)
	movl	%ecx, 4(%rbx)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_IWL_UCODE_SECTION_DATA,8,3     ## @IWL_UCODE_SECTION_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%x,%x"

	.no_dead_strip	_iwl_dbgfs_sram_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_sram_write
_iwl_dbgfs_sram_write:                  ; @iwl_dbgfs_sram_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_iwl_mvm_firmware_running
	cbz	w0, LBB0_5
; %bb.1:
	ldp	x9, x8, [x20, #8]
	ldr	x8, [x8]
	ldr	x8, [x8, x9, lsl #3]
Lloh0:
	adrp	x9, _IWL_UCODE_SECTION_DATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IWL_UCODE_SECTION_DATA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #3
	ldp	w22, w23, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x21
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [sp, #12]
	tst	w8, #0x3
	b.ne	LBB0_5
; %bb.3:
	ldr	w9, [sp, #8]
	tst	w9, #0x3
	b.ne	LBB0_5
; %bb.4:
	add	w10, w9, w8
	add	w11, w23, w22
	cmp	w10, w11
	b.le	LBB0_8
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_7
LBB0_6:
	str	xzr, [x20]
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	stp	w8, w9, [x20]
	b	LBB0_7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_IWL_UCODE_SECTION_DATA,8,3     ; @IWL_UCODE_SECTION_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%x,%x"

	.no_dead_strip	_iwl_dbgfs_sram_write
.subsections_via_symbols
