	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_write_reg                 ## -- Begin function gdbr_write_reg
	.p2align	4, 0x90
_gdbr_write_reg:                        ## @gdbr_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	%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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r15d
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	callq	_gdbr_lock_enter
	movl	$-1, %r12d
	testl	%eax, %eax
	je	LBB0_16
## %bb.3:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_reg_cache@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	8(%rbx), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_4
## %bb.5:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%rax,%r15), %edi
	movq	%r13, %rsi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movq	8(%rbx), %rax
	cmpq	$0, 24(%rax,%r15)
	leaq	24(%r15), %r15
	jg	LBB0_6
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %r12d
	jmp	LBB0_17
LBB0_4:
	xorl	%r14d, %r14d
	testq	%rcx, %rcx
	jne	LBB0_12
LBB0_11:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_eprintf
	jmp	LBB0_16
LBB0_7:
	movq	8(%rbx), %rax
LBB0_9:
	movl	%r14d, %ecx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rcx
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testq	%rcx, %rcx
	je	LBB0_11
LBB0_12:
	movl	%r14d, %r13d
	cmpb	$0, _gdbr_write_reg.P(%rip)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	callq	_gdbr_write_register
	movq	(%rbx), %rax
	movq	_MSG_OK@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.14:
	movb	$1, _gdbr_write_reg.P(%rip)
LBB0_15:
	movq	%rbx, %rdi
	callq	_gdbr_read_registers
	movq	8(%rbx), %rax
	leaq	(,%r13,2), %rcx
	addq	%r13, %rcx
	movq	8(%rax,%rcx,8), %rdi
	addq	16(%rbx), %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_gdbr_write_bin_registers
	xorl	%r12d, %r12d
LBB0_16:
	movq	%rbx, %rdi
	callq	_gdbr_lock_leave
LBB0_17:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_gdbr_write_reg.P,1,2 ## @gdbr_write_reg.P
	.comm	_reg_cache,4,2                  ## @reg_cache
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error registername <%s> not found in profile\n"

	.comm	_MSG_OK,8,3                     ## @MSG_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_write_reg                 ; -- Begin function gdbr_write_reg
	.p2align	2
_gdbr_write_reg:                        ; @gdbr_write_reg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	bl	_gdbr_lock_enter
	cbz	w0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _reg_cache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_cache@GOTPAGEOFF]
Lloh2:
	str	wzr, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	cmp	x9, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x24, #0
	mov	x23, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x24
	ldr	w0, [x8, #16]
	mov	x1, x22
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldr	x8, [x19, #8]
	add	x9, x8, x24
	ldr	x9, [x9, #24]
	add	x24, x24, #24
	cmp	x9, #0
	b.gt	LBB0_4
	b	LBB0_11
LBB0_6:
	mov	w20, #-1
	b	LBB0_18
LBB0_7:
	mov	w20, #-1
	b	LBB0_17
LBB0_8:
	mov	w23, #0
	cbnz	x9, LBB0_12
LBB0_9:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	bl	_eprintf
	mov	w20, #-1
	b	LBB0_17
LBB0_10:
	ldr	x8, [x19, #8]
LBB0_11:
	and	x9, x23, #0xffffffff
	mov	w10, #24
	mul	x9, x9, x10
	ldr	x9, [x8, x9]
	cbz	x9, LBB0_9
LBB0_12:
	mov	w22, w23
	adrp	x23, _gdbr_write_reg.P@PAGE
	ldrb	w8, [x23, _gdbr_write_reg.P@PAGEOFF]
	tbnz	w8, #0, LBB0_16
; %bb.13:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_gdbr_write_register
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _MSG_OK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MSG_OK@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.14:
	mov	w20, #0
	b	LBB0_18
LBB0_15:
	mov	w8, #1
	strb	w8, [x23, _gdbr_write_reg.P@PAGEOFF]
LBB0_16:
	mov	x0, x19
	bl	_gdbr_read_registers
	ldp	x9, x8, [x19, #8]
	mov	w10, #24
	madd	x9, x22, x10, x9
	ldr	x9, [x9, #8]
	add	x0, x9, x8
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	mov	x0, x19
	bl	_gdbr_write_bin_registers
	mov	w20, #0
LBB0_17:
	mov	x0, x19
	bl	_gdbr_lock_leave
LBB0_18:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_gdbr_write_reg.P,1,2 ; @gdbr_write_reg.P
	.comm	_reg_cache,4,2                  ; @reg_cache
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error registername <%s> not found in profile\n"

	.comm	_MSG_OK,8,3                     ; @MSG_OK
.subsections_via_symbols
