	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function debug_qnx_write_at
_debug_qnx_write_at:                    ## @debug_qnx_write_at
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %eax
	testl	%esi, %esi
	jle	LBB0_14
## %bb.1:
	movq	%rdx, %r8
	movq	_UT64_MAX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rdx, %rcx
	jle	LBB0_14
## %bb.2:
	movl	%esi, %r13d
	movq	%rdi, %r15
	movslq	%esi, %rax
	imulq	$274877907, %rax, %rbx          ## imm = 0x10624DD3
	movq	%rbx, %rax
	shrq	$63, %rax
	sarq	$37, %rbx
	addl	%eax, %ebx
	imull	$500, %ebx, %esi                ## imm = 0x1F4
	movq	_c_addr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%rcx, %rax
	je	LBB0_6
## %bb.3:
	cmpq	%r8, %rax
	jg	LBB0_6
## %bb.4:
	movl	%r13d, %eax
	movq	_c_size@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jle	LBB0_6
## %bb.5:
	movq	_c_buff@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r8, %r12
	movq	%r15, %r14
	movq	%rsi, %r15
	callq	_R_FREE
	movq	%r15, %rsi
	movq	%r14, %r15
	movq	%r12, %r8
	movq	_UT64_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_c_addr@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_6:
	movl	%r13d, %ecx
	subl	%esi, %ecx
	cmpl	$500, %r13d                     ## imm = 0x1F4
	jb	LBB0_7
## %bb.8:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r12d
	movq	_desc@GOTPCREL(%rip), %r14
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, %rbx
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movl	$500, %ecx                      ## imm = 0x1F4
	callq	_qnxr_write_memory
	addq	$2000, %r15                     ## imm = 0x7D0
	addq	$500, %rbx                      ## imm = 0x1F4
	decq	%r12
	jne	LBB0_9
## %bb.10:
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, %ecx
	jne	LBB0_12
	jmp	LBB0_13
LBB0_7:
	xorl	%esi, %esi
	testl	%ecx, %ecx
	je	LBB0_13
LBB0_12:
	movq	_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	%rsi, %r8
	leaq	(%r15,%rsi,4), %rdx
	movq	%r8, %rsi
	callq	_qnxr_write_memory
LBB0_13:
	movl	%r13d, %eax
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UT64_MAX,8,3                   ## @UT64_MAX
	.comm	_c_addr,8,3                     ## @c_addr
	.comm	_c_size,8,3                     ## @c_size
	.comm	_c_buff,4,2                     ## @c_buff
	.comm	_desc,4,2                       ## @desc
	.no_dead_strip	_debug_qnx_write_at
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function debug_qnx_write_at
_debug_qnx_write_at:                    ; @debug_qnx_write_at
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w1, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, x2
Lloh0:
	adrp	x22, _UT64_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _UT64_MAX@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x8, x2
	b.le	LBB0_8
; %bb.2:
	mov	x19, x1
	mov	x21, x0
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x9, w1, w9
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w25, w9, w10
	mov	w23, #500
Lloh2:
	adrp	x24, _c_addr@GOTPAGE
Lloh3:
	ldr	x24, [x24, _c_addr@GOTPAGEOFF]
	ldr	x9, [x24]
	mov	w10, w1
Lloh4:
	adrp	x11, _c_size@GOTPAGE
Lloh5:
	ldr	x11, [x11, _c_size@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	cmp	x9, x8
	ccmp	x9, x20, #0, ne
	ccmp	x11, x10, #4, le
	b.le	LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _c_buff@GOTPAGE
Lloh8:
	ldr	x8, [x8, _c_buff@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_R_FREE
	ldr	x8, [x22]
	str	x8, [x24]
LBB0_4:
	msub	w22, w25, w23, w19
Lloh10:
	adrp	x26, _desc@GOTPAGE
Lloh11:
	ldr	x26, [x26, _desc@GOTPAGEOFF]
	cmp	w19, #500
	b.lo	LBB0_9
; %bb.5:
	mov	x27, x25
	mov	x23, x20
	mov	x24, x21
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	mov	x1, x23
	mov	x2, x24
	mov	w3, #500
	bl	_qnxr_write_memory
	add	x24, x24, #2000
	add	x23, x23, #500
	subs	x27, x27, #1
	b.ne	LBB0_6
; %bb.7:
	mov	w8, #500
	mul	w8, w25, w8
	cbnz	w22, LBB0_10
	b	LBB0_11
LBB0_8:
	mov	w19, #-1
	b	LBB0_11
LBB0_9:
	mov	x8, #0
	cbz	w22, LBB0_11
LBB0_10:
	ldr	w0, [x26]
	add	x1, x8, x20
	add	x2, x21, x8, lsl #2
	mov	x3, x22
	bl	_qnxr_write_memory
LBB0_11:
	mov	x0, x19
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_UT64_MAX,8,3                   ; @UT64_MAX
	.comm	_c_addr,8,3                     ; @c_addr
	.comm	_c_size,8,3                     ; @c_size
	.comm	_c_buff,4,2                     ; @c_buff
	.comm	_desc,4,2                       ; @desc
	.no_dead_strip	_debug_qnx_write_at
.subsections_via_symbols
