	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_debug_qnx_reg_write
_r_debug_qnx_reg_write:                 ## @r_debug_qnx_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	$0, -44(%rbp)
	movq	8(%rdi), %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	8(%r13), %rcx
	movl	4(%rcx), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_r_reg_get
	movq	_reg_buf@GOTPCREL(%rip), %r12
	movl	$-1, %ecx
	cmpq	$0, (%r12)
	je	LBB0_10
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	8(%r13), %rcx
	movl	(%rax), %eax
	cmpl	%eax, (%rcx)
	cmovnel	%eax, %r15d
LBB0_3:
	movl	(%r13), %edi
	leaq	-44(%rbp), %rdx
	movl	%r14d, %esi
	callq	_r_reg_get_bytes
	movl	%eax, %edi
	callq	_free
	movq	_buf_size@GOTPCREL(%rip), %rbx
	movl	-44(%rbp), %ecx
	cmpl	%ecx, (%rbx)
	jge	LBB0_6
## %bb.4:
	movq	(%r12), %rdi
	shll	$2, %ecx
	movl	%ecx, %esi
	callq	_realloc
	testq	%rax, %rax
	movl	$-1, %ecx
	je	LBB0_10
## %bb.5:
	movq	%rax, (%r12)
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,4), %rdi
	movl	-44(%rbp), %edx
	subl	%ecx, %edx
	xorl	%esi, %esi
	callq	_memset
	movl	-44(%rbp), %ecx
LBB0_6:
	movl	(%r13), %edi
	movq	(%r12), %rdx
	movl	%r14d, %esi
	xorl	%r8d, %r8d
	movl	%r15d, %r9d
	callq	_r_reg_next_diff
	movl	$1, %ecx
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %rbx
	leal	7(%r15), %r12d
	testl	%r15d, %r15d
	cmovnsl	%r15d, %r12d
	sarl	$3, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_r_reg_get_value
	movl	%eax, -48(%rbp)
	movq	_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%rbx), %esi
	leaq	-48(%rbp), %rdx
	movl	%r12d, %ecx
	callq	_qnxr_write_reg
	movl	(%r13), %edi
	movq	_reg_buf@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movl	-44(%rbp), %ecx
	movl	%r14d, %esi
	movq	%rbx, %r8
	movl	%r15d, %r9d
	callq	_r_reg_next_diff
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	movl	$1, %ecx
LBB0_10:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R_REG_NAME_PC,4,2              ## @R_REG_NAME_PC
	.comm	_reg_buf,8,3                    ## @reg_buf
	.comm	_buf_size,4,2                   ## @buf_size
	.comm	_desc,4,2                       ## @desc
	.no_dead_strip	_r_debug_qnx_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_qnx_reg_write
_r_debug_qnx_reg_write:                 ; @r_debug_qnx_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
	str	wzr, [sp, #12]
	ldr	x8, [x0, #8]
	ldp	w21, w0, [x8]
Lloh0:
	adrp	x8, _R_REG_NAME_PC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R_REG_NAME_PC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_r_reg_get_name
	mov	x1, x0
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #4]
	mov	w2, #0
	bl	_r_reg_get
Lloh3:
	adrp	x24, _reg_buf@GOTPAGE
Lloh4:
	ldr	x24, [x24, _reg_buf@GOTPAGEOFF]
	ldr	x8, [x24]
	cbz	x8, LBB0_10
; %bb.1:
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	w9, [x0]
	cmp	w8, w9
	csel	w21, w21, w9, eq
LBB0_3:
	ldr	w0, [x20]
	add	x2, sp, #12
	mov	x1, x19
	bl	_r_reg_get_bytes
	bl	_free
Lloh5:
	adrp	x22, _buf_size@GOTPAGE
Lloh6:
	ldr	x22, [x22, _buf_size@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w3, [sp, #12]
	cmp	w8, w3
	b.ge	LBB0_6
; %bb.4:
	ldr	x0, [x24]
	lsl	w1, w3, #2
	bl	_realloc
	cbz	x0, LBB0_10
; %bb.5:
	str	x0, [x24]
	ldrsw	x8, [x22]
	add	x0, x0, x8, lsl #2
	ldr	w9, [sp, #12]
	sub	w2, w9, w8
	mov	w1, #0
	bl	_memset
	ldr	w3, [sp, #12]
LBB0_6:
	ldr	w0, [x20]
	ldr	x2, [x24]
	mov	x1, x19
	mov	x4, #0
	mov	x5, x21
	bl	_r_reg_next_diff
	cbz	x0, LBB0_9
; %bb.7:
	mov	x22, x0
	add	w8, w21, #7
	cmp	w21, #0
	csel	w8, w8, w21, lt
	asr	w23, w8, #3
Lloh7:
	adrp	x25, _desc@GOTPAGE
Lloh8:
	ldr	x25, [x25, _desc@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	mov	x1, x22
	bl	_r_reg_get_value
	str	w0, [sp, #8]
	ldr	w0, [x25]
	ldr	w1, [x22, #4]
	add	x2, sp, #8
	mov	x3, x23
	bl	_qnxr_write_reg
	ldr	w0, [x20]
	ldr	x2, [x24]
	ldr	w3, [sp, #12]
	mov	x1, x19
	mov	x4, x22
	mov	x5, x21
	bl	_r_reg_next_diff
	mov	x22, x0
	cbnz	x0, LBB0_8
LBB0_9:
	mov	w0, #1
	b	LBB0_11
LBB0_10:
	mov	w0, #-1
LBB0_11:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_R_REG_NAME_PC,4,2              ; @R_REG_NAME_PC
	.comm	_reg_buf,8,3                    ; @reg_buf
	.comm	_buf_size,4,2                   ; @buf_size
	.comm	_desc,4,2                       ; @desc
	.no_dead_strip	_r_debug_qnx_reg_write
.subsections_via_symbols
