	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ia64_write_reg
_ia64_write_reg:                        ## @ia64_write_reg
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_current_regcache@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_IA64_BSPSTORE_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	callq	_regcache_cooked_read_unsigned
	cmpq	%rbx, -40(%rbp)
	jg	LBB0_3
## %bb.1:
	movl	(%r12), %edi
	movq	_IA64_BSP_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_regcache_cooked_read_unsigned
	cmpq	%rbx, -48(%rbp)
	jle	LBB0_3
## %bb.2:
	movq	_TARGET_OBJECT_DIRTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	-40(%rbp), %rbx
	movq	_current_target@GOTPCREL(%rip), %rdi
	leaq	-40(%rbp), %rdx
	movq	%r15, %rcx
	movq	%rbx, %r8
	movl	%r14d, %r9d
	callq	_target_write_partial
	jmp	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_write_memory
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current_regcache,4,2           ## @current_regcache
	.comm	_IA64_BSPSTORE_REGNUM,4,2       ## @IA64_BSPSTORE_REGNUM
	.comm	_IA64_BSP_REGNUM,4,2            ## @IA64_BSP_REGNUM
	.comm	_current_target,4,2             ## @current_target
	.comm	_TARGET_OBJECT_DIRTY,4,2        ## @TARGET_OBJECT_DIRTY
	.no_dead_strip	_ia64_write_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ia64_write_reg
_ia64_write_reg:                        ; @ia64_write_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _current_regcache@GOTPAGE
Lloh1:
	ldr	x22, [x22, _current_regcache@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x8, _IA64_BSPSTORE_REGNUM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IA64_BSPSTORE_REGNUM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_regcache_cooked_read_unsigned
	ldr	x8, [sp, #8]
	cmp	x8, x21
	b.gt	LBB0_3
; %bb.1:
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _IA64_BSP_REGNUM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IA64_BSP_REGNUM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_regcache_cooked_read_unsigned
	ldr	x8, [sp]
	cmp	x8, x21
	b.le	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _TARGET_OBJECT_DIRTY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TARGET_OBJECT_DIRTY@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x8, [sp, #8]
	sub	x4, x21, x8
Lloh11:
	adrp	x0, _current_target@GOTPAGE
Lloh12:
	ldr	x0, [x0, _current_target@GOTPAGEOFF]
	add	x2, sp, #8
	mov	x3, x20
	mov	x5, x19
	bl	_target_write_partial
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_write_memory
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_current_regcache,4,2           ; @current_regcache
	.comm	_IA64_BSPSTORE_REGNUM,4,2       ; @IA64_BSPSTORE_REGNUM
	.comm	_IA64_BSP_REGNUM,4,2            ; @IA64_BSP_REGNUM
	.comm	_current_target,4,2             ; @current_target
	.comm	_TARGET_OBJECT_DIRTY,4,2        ; @TARGET_OBJECT_DIRTY
	.no_dead_strip	_ia64_write_reg
.subsections_via_symbols
