	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rbsp_write_bit
_rbsp_write_bit:                        ## @rbsp_write_bit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	leal	1(%rax), %edx
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	movl	%edx, (%rdi)
	movl	%ecx, %edx
	sarl	$3, %edx
	cmpl	4(%rdi), %edx
	jge	LBB0_1
## %bb.2:
	andl	$-8, %ecx
	subl	%ecx, %eax
	movb	$7, %cl
	subb	%al, %cl
	movq	8(%rdi), %rax
	movslq	%edx, %rdx
	movl	(%rax,%rdx,4), %edi
	shll	%cl, %esi
	btrl	%ecx, %edi
	orl	%edi, %esi
	movl	%esi, (%rax,%rdx,4)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_rbsp_write_bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rbsp_write_bit
_rbsp_write_bit:                        ; @rbsp_write_bit
	.cfi_startproc
; %bb.0:
	ldp	w9, w11, [x0]
	add	w10, w9, #1
	str	w10, [x0]
	add	w10, w9, #7
	cmp	w9, #0
	csel	w10, w10, w9, lt
	asr	w10, w10, #3
	cmp	w10, w11
	b.ge	LBB0_2
; %bb.1:
	mov	x8, x0
	mov	w0, #0
	lsl	w11, w10, #3
	sub	w9, w11, w9
	add	w9, w9, #7
	mov	w11, #1
	ldr	x8, [x8, #8]
	sbfiz	x10, x10, #2, #32
	ldr	w12, [x8, x10]
	lsl	w11, w11, w9
	bic	w11, w12, w11
	lsl	w9, w1, w9
	orr	w9, w11, w9
	str	w9, [x8, x10]
	ret
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_rbsp_write_bit
.subsections_via_symbols
