	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jmb38x_ms_write_reg_data
_jmb38x_ms_write_reg_data:              ## @jmb38x_ms_write_reg_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	%rbx
	.cfi_offset %rbx, -24
                                        ## kill: def $edx killed $edx def $rdx
	movl	(%rdi), %ecx
	cmpl	$3, %ecx
	jg	LBB0_7
## %bb.1:
	testl	%edx, %edx
	je	LBB0_7
## %bb.2:
	movq	8(%rdi), %r8
	movl	%edx, %edx
	leaq	-1(%rdx), %r9
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	shll	$3, %ecx
	movl	$255, %r11d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r11d
	notl	%r11d
	andl	(%r8), %r11d
	movq	%rax, %r10
	movl	%r11d, (%r8)
	movzbl	(%rsi,%rax), %ebx
	movzbl	(%rdi), %ecx
	shlb	$3, %cl
	shll	%cl, %ebx
	incq	%rax
	orl	%r11d, %ebx
	movl	%ebx, (%r8)
	movl	(%rdi), %ebx
	leal	1(%rbx), %ecx
	movl	%ecx, (%rdi)
	cmpl	$2, %ebx
	jg	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r10d, %r9d
	jne	LBB0_3
LBB0_5:
	cmpl	%r10d, %r9d
	je	LBB0_13
## %bb.6:
	subq	%rax, %rdx
	jmp	LBB0_8
LBB0_7:
	xorl	%eax, %eax
	testl	%edx, %edx
	je	LBB0_13
LBB0_8:
	cmpl	$7, %ecx
	jg	LBB0_13
## %bb.9:
	testl	%edx, %edx
	je	LBB0_13
## %bb.10:
	movq	8(%rdi), %r8
	decl	%edx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	shll	$3, %ecx
	movl	$255, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	notl	%ebx
	andl	4(%r8), %ebx
	movl	%ebx, 4(%r8)
	movl	%eax, %ecx
	incl	%eax
	movzbl	(%rsi,%rcx), %r9d
	movzbl	(%rdi), %ecx
	shlb	$3, %cl
	shll	%cl, %r9d
	orl	%ebx, %r9d
	movl	%r9d, 4(%r8)
	movl	(%rdi), %ebx
	leal	1(%rbx), %ecx
	movl	%ecx, (%rdi)
	addl	$-1, %edx
	setb	%r9b
	cmpl	$6, %ebx
	jg	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testb	%r9b, %r9b
	jne	LBB0_11
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_jmb38x_ms_write_reg_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_reg_data
_jmb38x_ms_write_reg_data:              ; @jmb38x_ms_write_reg_data
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
	ldr	w9, [x0]
	cmp	w9, #3
	ccmp	w2, #0, #4, le
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #0
	cbnz	w2, LBB0_6
	b	LBB0_10
LBB0_2:
	mov	x8, #0
	ldr	x11, [x0, #8]
	mov	w10, w2
	sub	x12, x10, #1
	mov	w13, #255
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x14, x8
	lsl	w8, w9, #3
	lsl	w8, w13, w8
	ldr	w9, [x11]
	bic	w9, w9, w8
	str	w9, [x11]
	add	x8, x14, #1
	ldrb	w15, [x1, x14]
	ldr	w16, [x0]
	lsl	w16, w16, #3
	lsl	w15, w15, w16
	orr	w9, w15, w9
	str	w9, [x11]
	ldr	w15, [x0]
	add	w9, w15, #1
	str	w9, [x0]
	cmp	w15, #2
	ccmp	w12, w14, #4, le
	b.ne	LBB0_3
; %bb.4:
	cmp	w12, w14
	b.eq	LBB0_10
; %bb.5:
	sub	x2, x10, x8
LBB0_6:
	cmp	w9, #7
	ccmp	w2, #0, #4, le
	b.eq	LBB0_10
; %bb.7:
	ldr	x10, [x0, #8]
	sub	w11, w2, #1
	mov	w12, #255
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
                                        ; kill: def $w8 killed $w8 killed $x8
	lsl	w9, w9, #3
	lsl	w9, w12, w9
	ldr	w13, [x10, #4]
	bic	w9, w13, w9
	str	w9, [x10, #4]
	ldrb	w13, [x1, w8, uxtw]
	add	w8, w8, #1
	ldr	w14, [x0]
	lsl	w14, w14, #3
	lsl	w13, w13, w14
	orr	w9, w13, w9
	str	w9, [x10, #4]
	ldr	w14, [x0]
	add	w9, w14, #1
	str	w9, [x0]
	subs	w11, w11, #1
	cset	w13, hs
	cmp	w14, #6
	b.gt	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	tbnz	w13, #0, LBB0_8
LBB0_10:
	mov	x0, x8
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_jmb38x_ms_write_reg_data
.subsections_via_symbols
