	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_mbus_io_win_set
_mvneta_mbus_io_win_set:                ## @mvneta_mbus_io_win_set
	.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
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_MVNETA_BASE_ADDR_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mvreg_read
	movl	%eax, %r14d
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	js	LBB0_1
LBB0_6:
	movl	%ebx, %edi
	callq	_MVNETA_WIN_BASE
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mvreg_write
	movl	%ebx, %edi
	callq	_MVNETA_WIN_SIZE
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mvreg_write
	cmpl	$3, %ebx
	jg	LBB0_8
## %bb.7:
	movl	%ebx, %edi
	callq	_MVNETA_WIN_REMAP
	movq	%r15, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_mvreg_write
LBB0_8:
	movl	%ebx, %edi
	callq	_MVNETA_WIN_BASE
	andl	$-65536, %r13d                  ## imm = 0xFFFF0000
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	shll	$8, %ecx
	orl	-44(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ecx, %r13d
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r13d, %edx
	callq	_mvreg_write
	movl	%ebx, %edi
	callq	_MVNETA_WIN_SIZE
	decl	%r12d
	andl	$-65536, %r12d                  ## imm = 0xFFFF0000
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_mvreg_write
	movq	_MVNETA_ACCESS_PROTECT_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_mvreg_read
	leal	(%rbx,%rbx), %ecx
	movl	$3, %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_mvreg_write
	btrl	%ebx, %r14d
	movq	_MVNETA_BASE_ADDR_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_mvreg_write
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_1:
	movq	_MVNETA_MAX_DECODE_WIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jle	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	btl	%ebx, %r14d
	jb	LBB0_3
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%ebx, %eax
	jne	LBB0_2
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, (%r15)
	movl	(%rcx), %eax
LBB0_4:
	cmpl	%eax, %ebx
	jne	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVNETA_BASE_ADDR_ENABLE,4,2    ## @MVNETA_BASE_ADDR_ENABLE
	.comm	_MVNETA_MAX_DECODE_WIN,4,2      ## @MVNETA_MAX_DECODE_WIN
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MVNETA_ACCESS_PROTECT_ENABLE,4,2 ## @MVNETA_ACCESS_PROTECT_ENABLE
	.no_dead_strip	_mvneta_mbus_io_win_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_mbus_io_win_set
_mvneta_mbus_io_win_set:                ; @mvneta_mbus_io_win_set
	.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	x23, x4
	mov	x24, x3
	mov	x22, x2
	mov	x25, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _MVNETA_BASE_ADDR_ENABLE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MVNETA_BASE_ADDR_ENABLE@GOTPAGEOFF]
	ldr	w1, [x26]
	bl	_mvreg_read
	mov	x20, x0
	ldr	w21, [x19]
	tbnz	w21, #31, LBB0_4
LBB0_1:
	mov	x0, x21
	bl	_MVNETA_WIN_BASE
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_mvreg_write
	mov	x0, x21
	bl	_MVNETA_WIN_SIZE
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_mvreg_write
	cmp	w21, #3
	b.gt	LBB0_3
; %bb.2:
	mov	x0, x21
	bl	_MVNETA_WIN_REMAP
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_mvreg_write
LBB0_3:
	mov	x0, x21
	bl	_MVNETA_WIN_BASE
	mov	x1, x0
	and	w8, w25, #0xffff0000
	orr	w8, w8, w24
	orr	w2, w8, w23, lsl #8
	mov	x0, x19
	bl	_mvreg_write
	mov	x0, x21
	bl	_MVNETA_WIN_SIZE
	mov	x1, x0
	sub	w8, w22, #1
	and	w2, w8, #0xffff0000
	mov	x0, x19
	bl	_mvreg_write
Lloh2:
	adrp	x22, _MVNETA_ACCESS_PROTECT_ENABLE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MVNETA_ACCESS_PROTECT_ENABLE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mvreg_read
	lsl	w8, w21, #1
	mov	w9, #3
	lsl	w8, w9, w8
	orr	w2, w0, w8
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mvreg_write
	mov	w8, #1
	lsl	w8, w8, w21
	bic	w2, w20, w8
	ldr	w1, [x26]
	mov	x0, x19
	bl	_mvreg_write
	mov	w0, #0
	b	LBB0_11
LBB0_4:
Lloh4:
	adrp	x9, _MVNETA_MAX_DECODE_WIN@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MVNETA_MAX_DECODE_WIN@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:
	mov	w21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w10, w20, w21
	tbnz	w10, #0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w21, w21, #1
	cmp	w8, w21
	b.ne	LBB0_6
	b	LBB0_10
LBB0_8:
	mov	w21, #0
	cmp	w21, w8
	b.ne	LBB0_1
	b	LBB0_10
LBB0_9:
	str	w21, [x19]
	ldr	w8, [x9]
	cmp	w21, w8
	b.ne	LBB0_1
LBB0_10:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MVNETA_BASE_ADDR_ENABLE,4,2    ; @MVNETA_BASE_ADDR_ENABLE
	.comm	_MVNETA_MAX_DECODE_WIN,4,2      ; @MVNETA_MAX_DECODE_WIN
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MVNETA_ACCESS_PROTECT_ENABLE,4,2 ; @MVNETA_ACCESS_PROTECT_ENABLE
	.no_dead_strip	_mvneta_mbus_io_win_set
.subsections_via_symbols
