	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function emit_csr_wr
_emit_csr_wr:                           ## @emit_csr_wr
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_swreg_type
	movq	%rax, %rbx
	movq	_NN_REG_IMM@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	xorl	%eax, %eax
	callq	_reg_none
	movl	%eax, %r12d
	cmpq	%r14, %rbx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_reg_none
	leaq	-56(%rbp), %rcx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_swreg_to_unrestricted
	movl	-48(%rbp), %ecx
	movl	%ecx, -52(%rbp)
	testl	%eax, %eax
	je	LBB0_5
LBB0_4:
	movl	%eax, (%r15)
	jmp	LBB0_6
LBB0_2:
	xorl	%edi, %edi
	callq	_reg_imm
	leaq	-56(%rbp), %rcx
	movl	%r12d, %edi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_swreg_to_unrestricted
	testl	%eax, %eax
	jne	LBB0_4
LBB0_5:
	movl	-48(%rbp), %esi
	movl	-56(%rbp), %eax
	movl	-52(%rbp), %edx
	movl	%eax, (%rsp)
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	xorl	%r9d, %r9d
	callq	___emit_lcsr
LBB0_6:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NN_REG_IMM,8,3                 ## @NN_REG_IMM
	.no_dead_strip	_emit_csr_wr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function emit_csr_wr
_emit_csr_wr:                           ; @emit_csr_wr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x1
	bl	_swreg_type
	mov	x23, x0
Lloh0:
	adrp	x8, _NN_REG_IMM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NN_REG_IMM@GOTPAGEOFF]
Lloh2:
	ldr	x24, [x8]
	bl	_reg_none
	mov	x22, x0
	cmp	x23, x24
	b.ne	LBB0_3
; %bb.1:
	bl	_reg_none
	mov	x2, x0
	mov	x3, sp
	mov	x0, x22
	mov	x1, x21
	bl	_swreg_to_unrestricted
	ldr	w8, [sp, #8]
	str	w8, [sp, #4]
	cbz	w0, LBB0_4
LBB0_2:
	str	w0, [x20]
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	bl	_reg_imm
	mov	x2, x0
	mov	x3, sp
	mov	x0, x22
	mov	x1, x21
	bl	_swreg_to_unrestricted
	cbnz	w0, LBB0_2
LBB0_4:
	ldp	w2, w1, [sp, #4]
	ldr	w6, [sp]
	mov	x0, x20
	mov	w3, #1
	mov	x4, x19
	mov	w5, #0
	bl	___emit_lcsr
LBB0_5:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NN_REG_IMM,8,3                 ; @NN_REG_IMM
	.no_dead_strip	_emit_csr_wr
.subsections_via_symbols
