	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_writestub                   ## -- Begin function do_writestub
	.p2align	4, 0x90
_do_writestub:                          ## @do_writestub
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_start@GOTPCREL(%rip), %rax
	movq	_stubs@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movslq	%edi, %rbx
	movq	(%rcx,%rbx,8), %rcx
	movslq	12(%rcx), %rsi
	addq	%rsi, %rsi
	addq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_assem_debug
	movq	(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movl	4(%rax), %edi
	movq	_out@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_set_jump_target
	movq	(%r14), %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax,%rbx,8), %rax
	movl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	16(%rax), %r15d
	movslq	12(%rax), %r12
	movslq	20(%rax), %rcx
	movl	28(%rax), %r14d
	movq	(%rcx), %r13
	movq	_AGEN1@GOTPCREL(%rip), %rax
	movl	%r12d, %esi
	andl	$1, %esi
	addl	(%rax), %esi
	movq	%r13, %rdi
	callq	_get_reg
	movl	%eax, %ebx
	movq	_rs1@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r12,4), %esi
	movq	%r13, %rdi
	callq	_get_reg
	movl	%eax, %r12d
	movl	%r15d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	movl	%r12d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	testl	%ebx, %ebx
	jns	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_get_reg
	movl	%eax, %ebx
LBB0_2:
	notl	%ebx
	shrl	$31, %ebx
	movl	%ebx, %edi
	callq	_assert
	movl	%r14d, %edi
	callq	_save_regs
	movq	_EAX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	cmpl	%esi, %r15d
	je	LBB0_8
## %bb.3:
	cmpl	%esi, %r12d
	jne	LBB0_7
## %bb.4:
	movq	_EDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	cmpl	%esi, %r15d
	jne	LBB0_6
## %bb.5:
	movl	%r15d, %esi
	callq	_emit_xchg
	jmp	LBB0_11
LBB0_7:
	movl	%r15d, %edi
	callq	_emit_mov
LBB0_8:
	movq	_EDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %r12d
	je	LBB0_11
## %bb.9:
	movl	%r12d, %edi
	jmp	LBB0_10
LBB0_6:
	callq	_emit_mov
	movl	(%rbx), %esi
	movl	%r15d, %edi
LBB0_10:
	callq	_emit_mov
LBB0_11:
	movq	_STOREB_STUB@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	(%rax), %ebx
	jne	LBB0_13
## %bb.12:
	movq	_WriteInvalidateByteSwapped@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emit_call
LBB0_13:
	movq	_STOREW_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_15
## %bb.14:
	movq	_WriteInvalidateWord@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emit_call
LBB0_15:
	movq	_STOREL_STUB@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_17
## %bb.16:
	movq	_WriteInvalidateLong@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emit_call
LBB0_17:
	movl	%r14d, %edi
	callq	_restore_regs
	movq	_stubs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movl	8(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_emit_jmp                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"do_writestub %x\n"

	.comm	_start,8,3                      ## @start
	.comm	_stubs,8,3                      ## @stubs
	.comm	_out,8,3                        ## @out
	.comm	_AGEN1,4,2                      ## @AGEN1
	.comm	_rs1,8,3                        ## @rs1
	.comm	_EAX,4,2                        ## @EAX
	.comm	_EDX,4,2                        ## @EDX
	.comm	_STOREB_STUB,4,2                ## @STOREB_STUB
	.comm	_WriteInvalidateByteSwapped,8,3 ## @WriteInvalidateByteSwapped
	.comm	_STOREW_STUB,4,2                ## @STOREW_STUB
	.comm	_WriteInvalidateWord,8,3        ## @WriteInvalidateWord
	.comm	_STOREL_STUB,4,2                ## @STOREL_STUB
	.comm	_WriteInvalidateLong,8,3        ## @WriteInvalidateLong
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_do_writestub                   ; -- Begin function do_writestub
	.p2align	2
_do_writestub:                          ; @do_writestub
	.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	x19, x0
Lloh0:
	adrp	x8, _start@GOTPAGE
Lloh1:
	ldr	x8, [x8, _start@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x25, _stubs@GOTPAGE
Lloh4:
	ldr	x25, [x25, _stubs@GOTPAGEOFF]
	ldr	x9, [x25]
	sbfiz	x20, x19, #3, #32
	ldr	x9, [x9, x20]
	ldrsw	x9, [x9, #12]
	add	x1, x8, x9, lsl #1
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_assem_debug
	ldr	x8, [x25]
	ldr	x8, [x8, x20]
	ldr	w0, [x8, #4]
Lloh7:
	adrp	x8, _out@GOTPAGE
Lloh8:
	ldr	x8, [x8, _out@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_set_jump_target
	ldr	x8, [x25]
	ldr	x8, [x8, x20]
	ldr	w26, [x8]
	ldp	w22, w21, [x8, #12]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	ldrsw	x9, [x8, #20]
	ldr	w20, [x8, #28]
	ldr	x23, [x9]
Lloh10:
	adrp	x8, _AGEN1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AGEN1@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w9, w22, #0x1
	add	w1, w8, w9
	mov	x0, x23
	bl	_get_reg
	mov	x24, x0
Lloh13:
	adrp	x8, _rs1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _rs1@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x23
	bl	_get_reg
	mov	x22, x0
	mvn	w8, w21
	lsr	w0, w8, #31
	bl	_assert
	mvn	w8, w22
	lsr	w0, w8, #31
	bl	_assert
	tbz	w24, #31, LBB0_2
; %bb.1:
	mov	x0, x23
	mov	w1, #-1
	bl	_get_reg
	mov	x24, x0
LBB0_2:
	mvn	w8, w24
	lsr	w0, w8, #31
	bl	_assert
	mov	x0, x20
	bl	_save_regs
Lloh16:
	adrp	x23, _EAX@GOTPAGE
Lloh17:
	ldr	x23, [x23, _EAX@GOTPAGEOFF]
	ldr	w1, [x23]
	cmp	w21, w1
	b.eq	LBB0_7
; %bb.3:
	cmp	w22, w1
	b.ne	LBB0_6
; %bb.4:
Lloh18:
	adrp	x8, _EDX@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EDX@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x22
	cmp	w21, w1
	b.ne	LBB0_9
; %bb.5:
	mov	x1, x21
	bl	_emit_xchg
	b	LBB0_11
LBB0_6:
	mov	x0, x21
	bl	_emit_mov
LBB0_7:
Lloh21:
	adrp	x8, _EDX@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EDX@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	cmp	w22, w1
	b.eq	LBB0_11
; %bb.8:
	mov	x0, x22
	b	LBB0_10
LBB0_9:
	bl	_emit_mov
	ldr	w1, [x23]
	mov	x0, x21
LBB0_10:
	bl	_emit_mov
LBB0_11:
Lloh24:
	adrp	x8, _STOREB_STUB@GOTPAGE
Lloh25:
	ldr	x8, [x8, _STOREB_STUB@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_13
; %bb.12:
Lloh27:
	adrp	x8, _WriteInvalidateByteSwapped@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WriteInvalidateByteSwapped@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_emit_call
LBB0_13:
Lloh30:
	adrp	x8, _STOREW_STUB@GOTPAGE
Lloh31:
	ldr	x8, [x8, _STOREW_STUB@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_15
; %bb.14:
Lloh33:
	adrp	x8, _WriteInvalidateWord@GOTPAGE
Lloh34:
	ldr	x8, [x8, _WriteInvalidateWord@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_emit_call
LBB0_15:
	sxtw	x19, w19
Lloh36:
	adrp	x8, _STOREL_STUB@GOTPAGE
Lloh37:
	ldr	x8, [x8, _STOREL_STUB@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_17
; %bb.16:
Lloh39:
	adrp	x8, _WriteInvalidateLong@GOTPAGE
Lloh40:
	ldr	x8, [x8, _WriteInvalidateLong@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	bl	_emit_call
LBB0_17:
	mov	x0, x20
	bl	_restore_regs
	ldr	x8, [x25]
	ldr	x8, [x8, x19, lsl #3]
	ldr	w0, [x8, #8]
	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
	b	_emit_jmp
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"do_writestub %x\n"

	.comm	_start,8,3                      ; @start
	.comm	_stubs,8,3                      ; @stubs
	.comm	_out,8,3                        ; @out
	.comm	_AGEN1,4,2                      ; @AGEN1
	.comm	_rs1,8,3                        ; @rs1
	.comm	_EAX,4,2                        ; @EAX
	.comm	_EDX,4,2                        ; @EDX
	.comm	_STOREB_STUB,4,2                ; @STOREB_STUB
	.comm	_WriteInvalidateByteSwapped,8,3 ; @WriteInvalidateByteSwapped
	.comm	_STOREW_STUB,4,2                ; @STOREW_STUB
	.comm	_WriteInvalidateWord,8,3        ; @WriteInvalidateWord
	.comm	_STOREL_STUB,4,2                ; @STOREL_STUB
	.comm	_WriteInvalidateLong,8,3        ; @WriteInvalidateLong
.subsections_via_symbols
