	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_debug_gdb_reg_write
_r_debug_gdb_reg_write:                 ## @r_debug_gdb_reg_write
	.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
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	callq	_check_connection
	movq	_desc@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_9
## %bb.1:
	movq	_reg_buf@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_23
## %bb.2:
	movl	$0, -44(%rbp)
	movq	24(%r13), %rax
	movl	(%rax), %r15d
	movl	4(%rax), %edi
	movq	_R_REG_NAME_PC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_r_reg_get_name
	movq	24(%r13), %rcx
	movl	4(%rcx), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_r_reg_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	24(%r13), %rcx
	movl	(%rax), %eax
	cmpl	%eax, (%rcx)
	cmovnel	%eax, %r15d
LBB0_4:
	movl	(%r13), %edi
	leaq	-44(%rbp), %rdx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_r_reg_get_bytes
	movl	%eax, %edi
	callq	_free
	movq	_buf_size@GOTPCREL(%rip), %rbx
	movl	-44(%rbp), %esi
	cmpl	%esi, (%rbx)
	jge	LBB0_7
## %bb.5:
	movq	(%r12), %rdi
	shll	$2, %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.6:
	movq	%rax, (%r12)
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	movl	-44(%rbp), %edx
	subl	%ecx, %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_7:
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.8:
	leaq	L_.str(%rip), %rsi
	callq	*16(%r13)
	testq	%rax, %rax
	setne	%r14b
	jmp	LBB0_12
LBB0_9:
	movq	_R_DEBUG_REASON_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_23:
	movl	$-1, %eax
	jmp	LBB0_24
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movl	(%r13), %edi
	movq	(%r12), %rdx
	movl	-44(%rbp), %ecx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_r_reg_next_diff
	movq	%rax, %rbx
	movl	$1, %eax
	testq	%rbx, %rbx
	je	LBB0_24
## %bb.13:
	leal	7(%r15), %r12d
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r12d
	sarl	$3, %r12d
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_17 Depth=1
	callq	_r_swap_ut64
LBB0_15:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, -48(%rbp)
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	leaq	-48(%rbp), %rdx
	movl	%r12d, %ecx
	callq	_gdbr_write_reg
	movl	(%r13), %edi
	movq	_reg_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %r8
	movl	%r15d, %r9d
	callq	_r_reg_next_diff
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_22
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_r_reg_get_value
	movl	%eax, -48(%rbp)
	testb	%r14b, %r14b
	je	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, %edi
	cmpl	$4, %r12d
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$2, %r12d
	jne	LBB0_14
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	callq	_r_swap_ut16
	jmp	LBB0_15
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	callq	_r_swap_ut32
	jmp	LBB0_15
LBB0_22:
	movl	$1, %eax
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_desc,4,2                       ## @desc
	.comm	_R_DEBUG_REASON_UNKNOWN,4,2     ## @R_DEBUG_REASON_UNKNOWN
	.comm	_reg_buf,8,3                    ## @reg_buf
	.comm	_R_REG_NAME_PC,4,2              ## @R_REG_NAME_PC
	.comm	_buf_size,4,2                   ## @buf_size
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cfg.bigendian"

	.no_dead_strip	_r_debug_gdb_reg_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r_debug_gdb_reg_write
_r_debug_gdb_reg_write:                 ; @r_debug_gdb_reg_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	bl	_check_connection
Lloh0:
	adrp	x24, _desc@GOTPAGE
Lloh1:
	ldr	x24, [x24, _desc@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_9
; %bb.1:
Lloh2:
	adrp	x25, _reg_buf@GOTPAGE
Lloh3:
	ldr	x25, [x25, _reg_buf@GOTPAGEOFF]
	ldr	x8, [x25]
	cbz	x8, LBB0_10
; %bb.2:
	str	wzr, [sp, #12]
	ldr	x8, [x20, #24]
	ldp	w21, w0, [x8]
Lloh4:
	adrp	x8, _R_REG_NAME_PC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _R_REG_NAME_PC@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_r_reg_get_name
	mov	x1, x0
	ldr	x8, [x20, #24]
	ldr	w0, [x8, #4]
	mov	w2, #0
	bl	_r_reg_get
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	ldr	w9, [x0]
	cmp	w8, w9
	csel	w21, w21, w9, eq
LBB0_4:
	ldr	w0, [x20]
	add	x2, sp, #12
	mov	x1, x19
	bl	_r_reg_get_bytes
	bl	_free
Lloh7:
	adrp	x22, _buf_size@GOTPAGE
Lloh8:
	ldr	x22, [x22, _buf_size@GOTPAGEOFF]
	ldr	w9, [x22]
	ldr	w8, [sp, #12]
	cmp	w9, w8
	b.ge	LBB0_7
; %bb.5:
	ldr	x0, [x25]
	lsl	w1, w8, #2
	bl	_realloc
	cbz	x0, LBB0_10
; %bb.6:
	str	x0, [x25]
	ldrsw	x8, [x22]
	add	x0, x0, x8, lsl #2
	ldr	w9, [sp, #12]
	sub	w2, w9, w8
	mov	w1, #0
	bl	_memset
LBB0_7:
	ldr	x0, [x20, #8]
	cbz	x0, LBB0_11
; %bb.8:
	ldr	x8, [x20, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	blr	x8
	cmp	x0, #0
	cset	w26, ne
	b	LBB0_12
LBB0_9:
Lloh11:
	adrp	x8, _R_DEBUG_REASON_UNKNOWN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R_DEBUG_REASON_UNKNOWN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_10:
	mov	w0, #-1
	b	LBB0_23
LBB0_11:
	mov	w26, #0
LBB0_12:
	ldr	w0, [x20]
	ldr	x2, [x25]
	ldr	w3, [sp, #12]
	mov	x1, x19
	mov	x4, #0
	mov	x5, x21
	bl	_r_reg_next_diff
	cbz	x0, LBB0_22
; %bb.13:
	mov	x22, x0
	add	w8, w21, #7
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w23, w8, #3
	b	LBB0_17
LBB0_14:                                ;   in Loop: Header=BB0_17 Depth=1
	bl	_r_swap_ut64
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	str	w0, [sp, #8]
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	w0, [x24]
	ldr	w1, [x22, #4]
	add	x2, sp, #8
	mov	x3, x23
	bl	_gdbr_write_reg
	ldr	w0, [x20]
	ldr	x2, [x25]
	ldr	w3, [sp, #12]
	mov	x1, x19
	mov	x4, x22
	mov	x5, x21
	bl	_r_reg_next_diff
	mov	x22, x0
	cbz	x0, LBB0_22
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x22
	bl	_r_reg_get_value
	str	w0, [sp, #8]
	cbz	w26, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	w23, #4
	b.eq	LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	cmp	w23, #2
	b.ne	LBB0_14
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	bl	_r_swap_ut16
	b	LBB0_15
LBB0_21:                                ;   in Loop: Header=BB0_17 Depth=1
	bl	_r_swap_ut32
	b	LBB0_15
LBB0_22:
	mov	w0, #1
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_desc,4,2                       ; @desc
	.comm	_R_DEBUG_REASON_UNKNOWN,4,2     ; @R_DEBUG_REASON_UNKNOWN
	.comm	_reg_buf,8,3                    ; @reg_buf
	.comm	_R_REG_NAME_PC,4,2              ; @R_REG_NAME_PC
	.comm	_buf_size,4,2                   ; @buf_size
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cfg.bigendian"

	.no_dead_strip	_r_debug_gdb_reg_write
.subsections_via_symbols
