	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function replace_bit_field
_replace_bit_field:                     ## @replace_bit_field
	.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	%rbx
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
                                        ## kill: def $edx killed $edx def $rdx
	leal	(%rcx,%rdx), %r8d
	leal	7(%rdx), %r10d
	testl	%edx, %edx
	movl	%edx, %ebx
	cmovsl	%r10d, %ebx
	movl	%ebx, %eax
	sarl	$3, %eax
	leal	(%rcx,%rdx), %r15d
	addl	$7, %r15d
	testl	%r8d, %r8d
	cmovnsl	%r8d, %r15d
	movl	%r15d, %r14d
	sarl	$3, %r14d
	movslq	%eax, %r9
	movzbl	(%rdi,%r9), %r11d
	cmpl	%r14d, %eax
	jne	LBB0_2
## %bb.1:
	leal	7(%r8), %eax
	testl	%r8d, %r8d
	cmovnsl	%r8d, %eax
	andl	$-8, %eax
	subl	%eax, %r8d
	movl	%r11d, %ebx
	movl	%r8d, %ecx
	shrl	%cl, %ebx
	shll	%cl, %ebx
	testl	%edx, %edx
	cmovnsl	%edx, %r10d
	andl	$-8, %r10d
	subl	%r10d, %edx
	movb	$8, %cl
	subb	%dl, %cl
	shll	%cl, %r11d
	movzbl	%r11b, %r10d
	shrl	%cl, %r10d
	movb	$8, %al
	subl	%r8d, %edx
	addb	$8, %dl
	movl	%edx, %ecx
	shll	%cl, %esi
	movzbl	%sil, %edx
	subb	%r8b, %al
	movl	%eax, %ecx
	shrl	%cl, %edx
	orl	%ebx, %edx
	orl	%r10d, %edx
	movb	%dl, (%rdi,%r9)
	jmp	LBB0_12
LBB0_2:
	andl	$-8, %ebx
	subl	%ebx, %edx
	andl	$-8, %r15d
	movb	$8, %r10b
	subb	%dl, %r10b
	movl	%r10d, %ecx
	shlq	%cl, %r11
	movzbl	%r11b, %eax
	shrq	%cl, %rax
	subl	%r15d, %r8d
	movq	%rsi, %rbx
	movl	%edx, %ecx
	shlq	%cl, %rbx
	orl	%eax, %ebx
	movl	%r10d, %ecx
	sarq	%cl, %rsi
	movb	%bl, (%rdi,%r9)
	leal	1(%r9), %eax
	movslq	%r14d, %rdx
	cmpl	%r14d, %eax
	jge	LBB0_3
## %bb.4:
	leaq	1(%r9), %rcx
	movl	%r9d, %ebx
	notl	%ebx
	addl	%r14d, %ebx
	movq	%rdx, %r10
	subq	%r9, %r10
	addq	$-2, %r10
	andq	$3, %rbx
	je	LBB0_7
## %bb.5:
	movq	%rsi, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	sarq	$8, %rsi
	movb	%al, (%rdi,%rcx)
	incq	%rcx
	movq	%rsi, %rax
	decq	%rbx
	jne	LBB0_6
LBB0_7:
	movq	%rsi, %rax
	cmpq	$3, %r10
	jb	LBB0_10
## %bb.8:
	movq	%rsi, %rax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	sarq	$32, %rax
	movl	%esi, (%rdi,%rcx)
	addq	$4, %rcx
	movq	%rax, %rsi
	cmpq	%rcx, %rdx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_3:
	movq	%rsi, %rax
LBB0_10:
	testl	%r8d, %r8d
	je	LBB0_12
## %bb.11:
	movl	$-1, %esi
	movl	%r8d, %ecx
	shll	%cl, %esi
	movb	$8, %cl
	subb	%r8b, %cl
	shll	%cl, %eax
	movzbl	%al, %eax
	shrl	%cl, %eax
	andb	(%rdi,%rdx), %sil
	orb	%sil, %al
	movb	%al, (%rdi,%rdx)
LBB0_12:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_replace_bit_field
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function replace_bit_field
_replace_bit_field:                     ; @replace_bit_field
	.cfi_startproc
; %bb.0:
	add	w8, w3, w2
	add	w9, w2, #7
	cmp	w2, #0
	csel	w10, w9, w2, lt
	asr	w12, w10, #3
	add	w9, w8, #7
	cmp	w8, #0
	csel	w9, w9, w8, lt
	asr	w9, w9, #3
	sbfx	x10, x10, #3, #29
	ldrb	w11, [x0, x10]
	cmp	w12, w9
	b.ne	LBB0_2
; %bb.1:
	negs	w9, w8
	and	w9, w9, #0x7
	and	w8, w8, #0x7
	csneg	w8, w8, w9, mi
	mov	w9, #-1
	lsl	w9, w9, w8
	and	w9, w11, w9
	negs	w12, w2
	and	w12, w12, #0x7
	and	w13, w2, #0x7
	csneg	w12, w13, w12, mi
	mov	w13, #8
	sub	w14, w13, w12
	lsl	w11, w11, w14
	and	w11, w11, #0xff
	lsr	w11, w11, w14
	sub	w12, w12, w8
	add	w12, w12, #8
	lsl	w12, w1, w12
	and	w12, w12, #0xff
	sub	w8, w13, w8
	lsr	w8, w12, w8
	orr	w8, w8, w9
	orr	w8, w8, w11
	strb	w8, [x0, x10]
	ret
LBB0_2:
	sub	w12, w2, w10, lsl #3
	mov	w13, #8
	sub	w13, w13, w12
	lsl	x11, x11, x13
	and	x11, x11, #0xff
	lsr	x11, x11, x13
	lsl	x12, x1, x12
	orr	w11, w12, w11
	strb	w11, [x0, x10]
	asr	x11, x1, x13
	add	w12, w10, #1
	cmp	w12, w9
	b.ge	LBB0_8
; %bb.3:
	add	x12, x10, x0
	add	x12, x12, #1
	mvn	x10, x10
	add	x13, x10, w9, sxtw
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	asr	x10, x11, #8
	strb	w11, [x12], #1
	mov	x11, x10
	subs	x13, x13, #1
	b.ne	LBB0_4
; %bb.5:
	subs	w8, w8, w9, lsl #3
	b.eq	LBB0_7
LBB0_6:
	sxtw	x9, w9
	ldrb	w11, [x0, x9]
	mov	w12, #-1
	lsl	w12, w12, w8
	and	w11, w11, w12
	mov	w12, #8
	sub	w8, w12, w8
	lsl	w10, w10, w8
	and	w10, w10, #0xff
	lsr	w8, w10, w8
	orr	w8, w11, w8
	strb	w8, [x0, x9]
LBB0_7:
	ret
LBB0_8:
	mov	x10, x11
	subs	w8, w8, w9, lsl #3
	b.ne	LBB0_6
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_replace_bit_field
.subsections_via_symbols
