	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jmb38x_ms_write_data
_jmb38x_ms_write_data:                  ## @jmb38x_ms_write_data
	.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	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	cmpl	$3, %ecx
	jg	LBB0_8
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.4:
	movl	%r12d, %eax
	decq	%rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%rdx), %rbx
	movzbl	(%r14,%rdx), %esi
	shll	$3, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %esi
	movq	8(%r15), %rcx
	orb	%sil, (%rcx)
	movl	(%r15), %esi
	leal	1(%rsi), %ecx
	movl	%ecx, (%r15)
	cmpl	$2, %esi
	jg	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%edx, %eax
	movq	%rbx, %rdx
	jne	LBB0_5
LBB0_7:
	subl	%ebx, %r12d
LBB0_8:
	cmpl	$4, %ecx
	jne	LBB0_11
## %bb.9:
	movq	_STATUS_FIFO_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	testl	%r13d, %eax
	je	LBB0_12
## %bb.10:
	movl	(%r15), %ecx
	jmp	LBB0_11
LBB0_1:
	xorl	%ecx, %ecx
	xorl	%ebx, %ebx
LBB0_11:
	testl	%ecx, %ecx
	jne	LBB0_27
## %bb.13:
	testl	%r12d, %r12d
	je	LBB0_27
LBB0_14:
	movq	_STATUS_FIFO_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	testl	%r13d, %eax
	jne	LBB0_18
## %bb.15:
	cmpl	$4, %r12d
	jb	LBB0_18
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	movl	(%r14,%rax), %edi
	movq	_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	___raw_writel
	addl	$-4, %r12d
	addl	$4, %ebx
	movq	_STATUS_FIFO_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%r15), %rdi
	callq	_readl
	testl	%r13d, %eax
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$3, %r12d
	ja	LBB0_16
LBB0_18:
	cmpl	$1, %r12d
	je	LBB0_25
## %bb.19:
	cmpl	$2, %r12d
	je	LBB0_22
## %bb.20:
	cmpl	$3, %r12d
	jne	LBB0_21
## %bb.23:
	movl	(%r15), %eax
	incl	%eax
	jmp	LBB0_24
LBB0_12:
	movq	8(%r15), %rax
	movzbl	(%rax), %edi
	movq	_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	movl	$0, (%r15)
	movq	8(%r15), %rax
	movb	$0, (%rax)
	testl	%r12d, %r12d
	jne	LBB0_14
	jmp	LBB0_27
LBB0_22:
	movl	(%r15), %eax
LBB0_24:
	incl	%eax
	movl	%eax, (%r15)
LBB0_25:
	movl	%ebx, %eax
	movb	(%r14,%rax), %al
	movq	8(%r15), %rcx
	orb	%al, (%rcx)
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%r15)
	jmp	LBB0_26
LBB0_21:
	movl	(%r15), %eax
LBB0_26:
	addl	%ebx, %eax
	movl	%eax, %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_FIFO_FULL,4,2           ## @STATUS_FIFO_FULL
	.comm	_STATUS,8,3                     ## @STATUS
	.comm	_DATA,8,3                       ## @DATA
	.no_dead_strip	_jmb38x_ms_write_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jmb38x_ms_write_data
_jmb38x_ms_write_data:                  ; @jmb38x_ms_write_data
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	cmp	w8, #3
	ccmp	w22, #0, #4, le
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #0
	cmp	w8, #4
	b.eq	LBB0_7
	b	LBB0_9
LBB0_3:
	mov	w21, #0
	b	LBB0_9
LBB0_4:
	mov	x21, #0
	mov	w9, w22
	sub	x9, x9, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x20, x21]
	lsl	w8, w8, #3
	lsl	w8, w10, w8
	ldr	x10, [x19, #8]
	ldrb	w11, [x10]
	orr	w8, w11, w8
	strb	w8, [x10]
	ldr	w8, [x19]
	cmp	w8, #2
	ccmp	w9, w21, #4, le
	add	x21, x21, #1
	add	w8, w8, #1
	str	w8, [x19]
	b.ne	LBB0_5
; %bb.6:
	sub	w22, w22, w21
	cmp	w8, #4
	b.ne	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _STATUS_FIFO_FULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STATUS_FIFO_FULL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	x8, [x19, #16]
Lloh3:
	adrp	x9, _STATUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATUS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	tst	w0, w23
	b.eq	LBB0_18
; %bb.8:
	ldr	w8, [x19]
LBB0_9:
	cbnz	w8, LBB0_24
; %bb.10:
	cbz	w22, LBB0_24
LBB0_11:
Lloh6:
	adrp	x23, _STATUS_FIFO_FULL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _STATUS_FIFO_FULL@GOTPAGEOFF]
	ldr	w25, [x23]
	ldr	x8, [x19, #16]
Lloh8:
	adrp	x24, _STATUS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _STATUS@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, w25
	cmp	w8, #0
	ccmp	w22, #4, #0, eq
	b.lo	LBB0_14
; %bb.12:
Lloh10:
	adrp	x25, _DATA@GOTPAGE
Lloh11:
	ldr	x25, [x25, _DATA@GOTPAGEOFF]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, w21, uxtw]
	ldr	x8, [x19, #16]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	___raw_writel
	sub	w22, w22, #4
	add	w21, w21, #4
	ldr	w26, [x23]
	ldr	x8, [x19, #16]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	and	w8, w0, w26
	cmp	w8, #0
	ccmp	w22, #3, #0, eq
	b.hi	LBB0_13
LBB0_14:
	cmp	w22, #1
	b.eq	LBB0_21
; %bb.15:
	cmp	w22, #2
	b.eq	LBB0_19
; %bb.16:
	cmp	w22, #3
	b.ne	LBB0_22
; %bb.17:
	ldr	w8, [x19]
	add	w8, w8, #1
	b	LBB0_20
LBB0_18:
	ldp	x8, x9, [x19, #8]
	ldrb	w0, [x8]
Lloh12:
	adrp	x8, _DATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DATA@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	add	x1, x8, x9
	bl	_writel
	str	wzr, [x19]
	ldr	x8, [x19, #8]
	strb	wzr, [x8]
	cbnz	w22, LBB0_11
	b	LBB0_24
LBB0_19:
	ldr	w8, [x19]
LBB0_20:
	add	w8, w8, #1
	str	w8, [x19]
LBB0_21:
	ldrb	w8, [x20, w21, uxtw]
	ldr	x9, [x19, #8]
	ldrb	w10, [x9]
	orr	w8, w10, w8
	strb	w8, [x9]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_23
LBB0_22:
	ldr	w8, [x19]
LBB0_23:
	add	w21, w8, w21
LBB0_24:
	mov	x0, x21
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_FIFO_FULL,4,2           ; @STATUS_FIFO_FULL
	.comm	_STATUS,8,3                     ; @STATUS
	.comm	_DATA,8,3                       ; @DATA
	.no_dead_strip	_jmb38x_ms_write_data
.subsections_via_symbols
