	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns_dsaf_sbm_cfg_mib_en
_hns_dsaf_sbm_cfg_mib_en:               ## @hns_dsaf_sbm_cfg_mib_en
	.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	%rdi, %r15
	callq	_HNS_DSAF_SBM_NUM
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%r13d, %r13d
	movq	_DSAF_SBM_CFG_REG_0_REG@GOTPCREL(%rip), %r14
	movq	_DSAF_SBM_CFG_MIB_EN_S@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	addl	%r13d, %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_dsaf_set_dev_bit
	incl	%ebx
	movq	%r15, %rdi
	callq	_HNS_DSAF_SBM_NUM
	subl	$-128, %r13d
	cmpl	%eax, %ebx
	jl	LBB0_2
LBB0_3:
	movq	%r15, %rdi
	callq	_HNS_DSAF_SBM_NUM
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	xorl	%r13d, %r13d
	movq	_DSAF_SBM_CFG_REG_0_REG@GOTPCREL(%rip), %r14
	movq	_DSAF_SBM_CFG_MIB_EN_S@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	addl	%r13d, %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	callq	_dsaf_set_dev_bit
	incl	%ebx
	movq	%r15, %rdi
	callq	_HNS_DSAF_SBM_NUM
	subl	$-128, %r13d
	cmpl	%eax, %ebx
	jl	LBB0_5
LBB0_6:
	movq	%r15, %rdi
	callq	_HNS_DSAF_SBM_NUM
	testl	%eax, %eax
	jle	LBB0_14
## %bb.7:
	xorl	%ebx, %ebx
	movq	_DSAF_SBM_CFG_MIB_EN_S@GOTPCREL(%rip), %r13
	movq	_DSAF_CFG_READ_CNT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	shll	$7, %ebx
	movq	_DSAF_SBM_CFG_REG_0_REG@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	$1, %edi
	callq	_udelay
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_dsaf_get_dev_bit
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	leal	1(%r14), %ecx
	cmpl	(%r12), %r14d
	movl	%ecx, %r14d
	jl	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	incl	%ebx
	movq	%r15, %rdi
	callq	_HNS_DSAF_SBM_NUM
	cmpl	%eax, %ebx
	jl	LBB0_8
LBB0_14:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_12:
	movl	(%r15), %edx
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSAF_SBM_CFG_REG_0_REG,4,2     ## @DSAF_SBM_CFG_REG_0_REG
	.comm	_DSAF_SBM_CFG_MIB_EN_S,4,2      ## @DSAF_SBM_CFG_MIB_EN_S
	.comm	_DSAF_CFG_READ_CNT,4,2          ## @DSAF_CFG_READ_CNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sbm_cfg_mib_en fail,%s,sbm_num=%d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_hns_dsaf_sbm_cfg_mib_en
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns_dsaf_sbm_cfg_mib_en
_hns_dsaf_sbm_cfg_mib_en:               ; @hns_dsaf_sbm_cfg_mib_en
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_HNS_DSAF_SBM_NUM
Lloh0:
	adrp	x22, _DSAF_SBM_CFG_REG_0_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DSAF_SBM_CFG_REG_0_REG@GOTPAGEOFF]
Lloh2:
	adrp	x23, _DSAF_SBM_CFG_MIB_EN_S@GOTPAGE
Lloh3:
	ldr	x23, [x23, _DSAF_SBM_CFG_MIB_EN_S@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w20, #0
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	add	w1, w20, w8
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #0
	bl	_dsaf_set_dev_bit
	add	w21, w21, #1
	mov	x0, x19
	bl	_HNS_DSAF_SBM_NUM
	add	w20, w20, #128
	cmp	w21, w0
	b.lt	LBB0_2
LBB0_3:
	mov	x0, x19
	bl	_HNS_DSAF_SBM_NUM
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w20, #0
	mov	w21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	add	w1, w20, w8
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #1
	bl	_dsaf_set_dev_bit
	add	w21, w21, #1
	mov	x0, x19
	bl	_HNS_DSAF_SBM_NUM
	add	w20, w20, #128
	cmp	w21, w0
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_HNS_DSAF_SBM_NUM
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.7:
	mov	w20, #0
Lloh4:
	adrp	x24, _DSAF_CFG_READ_CNT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _DSAF_CFG_READ_CNT@GOTPAGEOFF]
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w8, [x22]
	add	w21, w8, w20, lsl #7
	mov	w25, #1
LBB0_9:                                 ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	w0, #1
	bl	_udelay
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_dsaf_get_dev_bit
	ldr	w8, [x24]
	cmp	w0, #0
	ccmp	w25, w8, #0, eq
	add	w25, w25, #1
	b.lt	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	cbz	w0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w20, w20, #1
	mov	x0, x19
	bl	_HNS_DSAF_SBM_NUM
	cmp	w20, w0
	b.lt	LBB0_8
LBB0_12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
	ldp	w2, w0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	bl	_dev_err
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DSAF_SBM_CFG_REG_0_REG,4,2     ; @DSAF_SBM_CFG_REG_0_REG
	.comm	_DSAF_SBM_CFG_MIB_EN_S,4,2      ; @DSAF_SBM_CFG_MIB_EN_S
	.comm	_DSAF_CFG_READ_CNT,4,2          ; @DSAF_CFG_READ_CNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sbm_cfg_mib_en fail,%s,sbm_num=%d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_hns_dsaf_sbm_cfg_mib_en
.subsections_via_symbols
