	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_hmc_sd_grp
_i40iw_hmc_sd_grp:                      ## @i40iw_hmc_sd_grp
	.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
	movl	%r8d, %r15d
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	8(%r14), %eax
	movl	%eax, -56(%rbp)
	leaq	(%rbx,%r13), %rax
	cmpq	%rbx, %rax
	jbe	LBB0_12
## %bb.1:
	leaq	(%rbx,%rbx,2), %rax
	leaq	8(,%rax,8), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	addq	$24, %r12
	decq	%r13
	je	LBB0_12
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r15d, %r15d
	setne	%cl
	cmpq	$0, 8(%rax,%r12)
	sete	%dl
	cmpb	%dl, %cl
	je	LBB0_11
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-8(%rax,%r12), %rdx
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rax,%r12), %rcx
	movq	_I40IW_SD_TYPE_PAGED@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	leaq	4(%rax,%r12), %rax
	cmovneq	%rcx, %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rcx
	shlq	$2, %rcx
	addq	-64(%rbp), %rcx
	movq	%rbx, %rsi
	callq	_i40iw_set_sd_entry
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax
	shlq	$2, %rax
	addq	-64(%rbp), %rax
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movq	%rax, %rdx
	callq	_i40iw_clr_sd_entry
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax
	incq	%rax
	movq	%rax, -72(%rbp)
	movq	_I40IW_MAX_SD_ENTRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	leaq	-72(%rbp), %rsi
	callq	*(%rax)
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, -72(%rbp)
	jmp	LBB0_11
LBB0_12:
	cmpq	$0, -72(%rbp)
	movl	$0, %eax
	je	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	leaq	-72(%rbp), %rsi
	callq	*(%rax)
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_I40IW_DEBUG_HMC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %ebx
	movl	%eax, %ecx
	callq	_i40iw_debug
	movl	%ebx, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_SD_TYPE_PAGED,8,3        ## @I40IW_SD_TYPE_PAGED
	.comm	_I40IW_MAX_SD_ENTRIES,8,3       ## @I40IW_MAX_SD_ENTRIES
	.comm	_I40IW_DEBUG_HMC,4,2            ## @I40IW_DEBUG_HMC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i40iw_hmc_sd_grp: sd_programming failed err=%d\n"

	.no_dead_strip	_i40iw_hmc_sd_grp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_hmc_sd_grp
_i40iw_hmc_sd_grp:                      ; @i40iw_hmc_sd_grp
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x23, #8]
	str	w8, [sp, #24]
	add	x8, x21, x22
	cmp	x8, x22
	b.ls	LBB0_11
; %bb.1:
	add	x8, x22, x22, lsl #1
	lsl	x25, x8, #3
Lloh0:
	adrp	x26, _I40IW_SD_TYPE_PAGED@GOTPAGE
Lloh1:
	ldr	x26, [x26, _I40IW_SD_TYPE_PAGED@GOTPAGEOFF]
Lloh2:
	adrp	x27, _I40IW_MAX_SD_ENTRIES@GOTPAGE
Lloh3:
	ldr	x27, [x27, _I40IW_MAX_SD_ENTRIES@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	add	x25, x25, #24
	subs	x21, x21, #1
	b.eq	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w20, #0
	cset	w9, ne
	add	x10, x8, x25
	ldr	x10, [x10, #16]
	cmp	x10, #0
	cset	w10, eq
	cmp	w9, w10
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x2, [x8, x25]
	cbz	w20, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x26]
	add	x8, x8, x25
	add	x10, x8, #12
	add	x8, x8, #8
	cmp	x2, x9
	csel	x8, x10, x8, eq
	ldr	w0, [x8]
	ldp	x9, x8, [sp, #8]
	add	x3, x8, x9, lsl #2
	mov	x1, x22
	bl	_i40iw_set_sd_entry
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	x9, x8, [sp, #8]
	add	x8, x8, x9, lsl #2
	mov	x0, x22
	mov	x1, x2
	mov	x2, x8
	bl	_i40iw_clr_sd_entry
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	add	x8, x8, #1
	str	x8, [sp, #8]
	ldr	x9, [x27]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	cbnz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [sp, #8]
	b	LBB0_2
LBB0_11:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_13
; %bb.12:
	ldr	x8, [x19]
	ldr	x8, [x8]
	add	x1, sp, #8
	mov	x0, x19
	blr	x8
	mov	x24, x0
	b	LBB0_14
LBB0_13:
	mov	w24, #0
LBB0_14:
	mov	x0, x24
	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
LBB0_15:
	mov	x24, x0
Lloh4:
	adrp	x8, _I40IW_DEBUG_HMC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _I40IW_DEBUG_HMC@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x3, x24
	bl	_i40iw_debug
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_SD_TYPE_PAGED,8,3        ; @I40IW_SD_TYPE_PAGED
	.comm	_I40IW_MAX_SD_ENTRIES,8,3       ; @I40IW_MAX_SD_ENTRIES
	.comm	_I40IW_DEBUG_HMC,4,2            ; @I40IW_DEBUG_HMC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i40iw_hmc_sd_grp: sd_programming failed err=%d\n"

	.no_dead_strip	_i40iw_hmc_sd_grp
.subsections_via_symbols
