	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_attach                    ## -- Begin function gdbr_attach
	.p2align	4, 0x90
_gdbr_attach:                           ## @gdbr_attach
	.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	$-1, %r14d
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 8(%rdi)
	je	LBB0_16
## %bb.2:
	movl	%esi, %r15d
	movq	%rbx, %rdi
	callq	_gdbr_lock_enter
	movl	$-1, %r14d
	testl	%eax, %eax
	je	LBB0_15
## %bb.3:
	movl	$0, 4(%rbx)
	movq	_reg_cache@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	(%rbx), %eax
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	testl	%eax, %eax
	je	LBB0_6
LBB0_7:
	movq	_CMD_ATTACH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strlen
	movslq	%eax, %r13
	addq	$9, %r13
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, %r12
	movq	_CMD_ATTACH@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%r15d, %r8d
	callq	_snprintf
	testl	%eax, %eax
	js	LBB0_13
## %bb.9:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_send_msg
	testl	%eax, %eax
	js	LBB0_13
## %bb.10:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	callq	_handle_attach
LBB0_13:
	movl	%eax, %r14d
LBB0_14:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_15
LBB0_4:
	movq	%rbx, %rdi
	callq	_gdbr_check_extended_mode
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_7
LBB0_6:
	movl	$-2, %r14d
LBB0_15:
	movq	%rbx, %rdi
	callq	_gdbr_lock_leave
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	$-1, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_reg_cache,4,2                  ## @reg_cache
	.comm	_CMD_ATTACH,8,3                 ## @CMD_ATTACH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_attach                    ; -- Begin function gdbr_attach
	.p2align	2
_gdbr_attach:                           ; @gdbr_attach
	.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_12
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_12
; %bb.2:
	mov	x20, x1
	mov	x0, x19
	bl	_gdbr_lock_enter
	cbz	w0, LBB0_13
; %bb.3:
	str	wzr, [x19, #4]
Lloh0:
	adrp	x8, _reg_cache@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_cache@GOTPAGEOFF]
Lloh2:
	str	wzr, [x8]
	ldr	w8, [x19]
	cmn	w8, #1
	b.eq	LBB0_14
; %bb.4:
	cbz	w8, LBB0_15
LBB0_5:
Lloh3:
	adrp	x23, _CMD_ATTACH@GOTPAGE
Lloh4:
	ldr	x23, [x23, _CMD_ATTACH@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x22, x8, #9
	mov	x0, x22
	mov	w1, #1
	bl	_calloc
	cbz	x0, LBB0_13
; %bb.6:
	mov	x21, x0
	ldr	x3, [x23]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x22
	mov	x4, x20
	bl	_snprintf
	tbnz	w0, #31, LBB0_10
; %bb.7:
	mov	x0, x19
	mov	x1, x21
	bl	_send_msg
	tbnz	w0, #31, LBB0_10
; %bb.8:
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	tbnz	x0, #63, LBB0_18
; %bb.9:
	mov	x0, x19
	bl	_handle_attach
LBB0_10:
	mov	x20, x0
LBB0_11:
	mov	x0, x21
	bl	_free
	b	LBB0_16
LBB0_12:
	mov	w20, #-1
	b	LBB0_17
LBB0_13:
	mov	w20, #-1
	b	LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_gdbr_check_extended_mode
	ldr	w8, [x19]
	cbnz	w8, LBB0_5
LBB0_15:
	mov	w20, #-2
LBB0_16:
	mov	x0, x19
	bl	_gdbr_lock_leave
LBB0_17:
	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
LBB0_18:
	mov	w20, #-1
	b	LBB0_11
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_reg_cache,4,2                  ; @reg_cache
	.comm	_CMD_ATTACH,8,3                 ; @CMD_ATTACH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%x"

.subsections_via_symbols
