	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_write_bin_registers       ## -- Begin function gdbr_write_bin_registers
	.p2align	4, 0x90
_gdbr_write_bin_registers:              ## @gdbr_write_bin_registers
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	callq	_gdbr_lock_enter
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	movl	(%rbx), %eax
	leal	(%rax,%rax), %r12d
	addl	$8, %r12d
	movq	_reg_cache@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	%r12d, %edi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r15
	movq	_CMD_WRITEREGS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_snprintf
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	movq	%r15, %rdx
	incq	%rdx
	callq	_pack_hex
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_send_msg
	movl	$-1, %r14d
	testq	%rax, %rax
	js	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	testq	%rax, %rax
	js	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_handle_G
	xorl	%r14d, %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_gdbr_lock_leave
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_7
LBB0_8:
	movq	%rbx, %rdi
	callq	_gdbr_lock_leave
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_reg_cache,4,2                  ## @reg_cache
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_CMD_WRITEREGS,8,3              ## @CMD_WRITEREGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_write_bin_registers       ; -- Begin function gdbr_write_bin_registers
	.p2align	2
_gdbr_write_bin_registers:              ; @gdbr_write_bin_registers
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_gdbr_lock_enter
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w8, [x19]
	lsl	w8, w8, #1
	add	w21, w8, #8
Lloh0:
	adrp	x8, _reg_cache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_cache@GOTPAGEOFF]
Lloh2:
	str	wzr, [x8]
	mov	x0, x21
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
Lloh3:
	adrp	x8, _CMD_WRITEREGS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_WRITEREGS@GOTPAGEOFF]
Lloh5:
	ldr	x3, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x21
	bl	_snprintf
	ldp	w1, w0, [x19]
	add	x2, x20, #1
	bl	_pack_hex
	mov	x0, x19
	mov	x1, x20
	bl	_send_msg
	tbnz	x0, #63, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	tbnz	x0, #63, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_handle_G
	mov	w21, #0
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_gdbr_lock_leave
LBB0_7:
	mov	w21, #-1
	b	LBB0_10
LBB0_8:
	mov	w21, #-1
LBB0_9:
	mov	x0, x19
	bl	_gdbr_lock_leave
	mov	x0, x20
	bl	_free
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_reg_cache,4,2                  ; @reg_cache
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_CMD_WRITEREGS,8,3              ; @CMD_WRITEREGS
.subsections_via_symbols
