	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_connect                   ## -- Begin function gdbr_connect
	.p2align	4, 0x90
_gdbr_connect:                          ## @gdbr_connect
	.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	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.1:
	movq	%rsi, %r12
	testq	%rsi, %rsi
	je	LBB0_25
## %bb.2:
	movl	%edx, %r13d
	movq	%rdi, %r14
	callq	_gdbr_lock_enter
	movl	$-1, %ebx
	testl	%eax, %eax
	je	LBB0_24
## %bb.3:
	movl	$64, 16(%r14)
	leaq	L_.str.1(%rip), %rdi
	callq	_r_sys_getenv
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_strtoul
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%rax, %r15
	movq	_GDB_MAX_PKTSZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_R_MAX
	movl	%eax, 16(%r14)
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_7:
	cmpb	$47, (%r12)
	movl	64(%r14), %r15d
	jne	LBB0_9
## %bb.8:
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_r_socket_connect_serial
	testl	%eax, %eax
	jne	LBB0_10
	jmp	LBB0_24
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	callq	_sdb_fmt
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	$400, %ecx                      ## imm = 0x190
	callq	_r_socket_connect_tcp
	testl	%eax, %eax
	je	LBB0_24
LBB0_10:
	movq	%r14, %rdi
	callq	_send_ack
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_24
## %bb.11:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_read_packet
	movl	$1, (%r14)
	xorl	%eax, %eax
	callq	_r_cons_sleep_begin
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_QSUPPORTED_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	__isbreaked@GOTPCREL(%rip), %rax
	jle	LBB0_21
## %bb.12:
	movq	%rax, %r12
	cmpl	$0, (%rax)
	jne	LBB0_22
## %bb.13:
	movl	$1, %r15d
	leaq	L_.str(%rip), %r13
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_send_msg
	testl	%eax, %eax
	js	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	testl	%eax, %eax
	js	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	%r14, %rdi
	callq	_handle_qSupported
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_19
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	movl	%eax, %ebx
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=1
	movq	_QSUPPORTED_MAX_RETRIES@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jge	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=1
	incl	%r15d
	cmpl	$0, (%r12)
	je	LBB0_14
	jmp	LBB0_22
LBB0_21:
	movq	%rax, %r12
LBB0_22:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_r_cons_sleep_end
	cmpl	$0, (%r12)
	je	LBB0_26
## %bb.23:
	movl	$0, (%r12)
	movl	$-1, %ebx
LBB0_24:
	movq	%r14, %rdi
	callq	_gdbr_lock_leave
LBB0_25:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	testl	%ebx, %ebx
	js	LBB0_24
## %bb.27:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	jle	LBB0_29
## %bb.28:
	movl	16(%r14), %esi
	callq	_R_MIN
	movq	_GDB_MAX_PKTSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_R_MAX
	movl	%eax, 16(%r14)
LBB0_29:
	cmpq	$0, 32(%r14)
	je	LBB0_33
## %bb.30:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_send_msg
	testl	%eax, %eax
	js	LBB0_43
## %bb.31:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	movl	40(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	$2, %edx
	callq	_strncmp
	testl	%eax, %eax
	jne	LBB0_33
## %bb.32:
	movq	%r14, %rdi
	callq	_send_ack
	movl	$1, 4(%r14)
LBB0_33:
	movq	8(%r14), %rax
	movq	_GDB_REMOTE_TYPE_LLDB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_35
## %bb.34:
	movq	%r14, %rdi
	callq	_gdbr_connect_lldb
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_35:
	movl	$1, 20(%r14)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r14)
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_send_msg
	testl	%eax, %eax
	js	LBB0_43
## %bb.36:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	movq	%r14, %rdi
	callq	_handle_qC
	testl	%eax, %eax
	jns	LBB0_38
## %bb.37:
	movl	$0, 20(%r14)
LBB0_38:
	movq	%r14, %rdi
	callq	_gdbr_check_vcont
	movq	48(%r14), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_gdbr_select
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	callq	_send_msg
	testl	%eax, %eax
	js	LBB0_43
## %bb.39:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_read_packet
	movq	%r14, %rdi
	callq	_send_ack
	testl	%eax, %eax
	js	LBB0_43
## %bb.40:
	movl	40(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	cmpq	$0, 24(%r14)
	je	LBB0_42
## %bb.41:
	movq	%r14, %rdi
	callq	_gdbr_read_target_xml
LBB0_42:
	movq	%r14, %rdi
	callq	_reg_cache_init
	xorl	%ebx, %ebx
	jmp	LBB0_24
LBB0_43:
	movl	%eax, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qSupported:multiprocess+;qRelocInsn+;xmlRegisters=i386"

L_.str.1:                               ## @.str.1
	.asciz	"R2_GDB_PKTSZ"

	.comm	_GDB_MAX_PKTSZ,4,2              ## @GDB_MAX_PKTSZ
L_.str.2:                               ## @.str.2
	.asciz	"%d"

	.comm	_QSUPPORTED_MAX_RETRIES,4,2     ## @QSUPPORTED_MAX_RETRIES
	.comm	__isbreaked,4,2                 ## @_isbreaked
L_.str.3:                               ## @.str.3
	.asciz	"QStartNoAckMode"

L_.str.4:                               ## @.str.4
	.asciz	"OK"

	.comm	_GDB_REMOTE_TYPE_LLDB,8,3       ## @GDB_REMOTE_TYPE_LLDB
L_.str.5:                               ## @.str.5
	.asciz	"qC"

L_.str.6:                               ## @.str.6
	.asciz	"Hc-1"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdbr_connect                   ; -- Begin function gdbr_connect
	.p2align	2
_gdbr_connect:                          ; @gdbr_connect
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	w21, #-1
	cbz	x0, LBB0_23
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_23
; %bb.2:
	mov	x23, x2
	mov	x19, x0
	bl	_gdbr_lock_enter
	cbz	w0, LBB0_21
; %bb.3:
	mov	w8, #64
	str	w8, [x19, #16]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_r_sys_getenv
	cbz	x0, LBB0_6
; %bb.4:
	mov	x1, #0
	mov	w2, #10
	bl	_strtoul
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.5:
Lloh2:
	adrp	x8, _GDB_MAX_PKTSZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GDB_MAX_PKTSZ@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_R_MAX
	str	w0, [x19, #16]
	b	LBB0_7
LBB0_6:
	mov	x20, #0
LBB0_7:
	ldrb	w8, [x22]
	ldr	w21, [x19, #64]
	cmp	w8, #47
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	mov	w3, #1
	bl	_r_socket_connect_serial
	cbnz	w0, LBB0_10
	b	LBB0_21
LBB0_9:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_sdb_fmt
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	mov	w3, #400
	bl	_r_socket_connect_tcp
	cbz	w0, LBB0_21
LBB0_10:
	mov	x0, x19
	bl	_send_ack
	mov	x21, x0
	tbnz	w0, #31, LBB0_22
; %bb.11:
	mov	w22, #1
	mov	x0, x19
	mov	w1, #1
	bl	_read_packet
	str	w22, [x19]
	bl	_r_cons_sleep_begin
	mov	x22, x0
Lloh7:
	adrp	x25, _QSUPPORTED_MAX_RETRIES@GOTPAGE
Lloh8:
	ldr	x25, [x25, _QSUPPORTED_MAX_RETRIES@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh9:
	adrp	x24, __isbreaked@GOTPAGE
Lloh10:
	ldr	x24, [x24, __isbreaked@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.12:
	ldr	w8, [x24]
	cbnz	w8, LBB0_19
; %bb.13:
	mov	w26, #1
Lloh11:
	adrp	x23, l_.str@PAGE
Lloh12:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x21, x0
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x25]
	ldr	w9, [x24]
	cmp	w26, w8
	add	w26, w26, #1
	ccmp	w9, #0, #0, lt
	b.ne	LBB0_19
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_send_msg
	tbnz	w0, #31, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	tbnz	w0, #31, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x19
	bl	_handle_qSupported
	mov	x21, x0
	tbnz	w0, #31, LBB0_15
LBB0_19:
	mov	x0, x22
	bl	_r_cons_sleep_end
	ldr	w8, [x24]
	cbz	w8, LBB0_24
; %bb.20:
	str	wzr, [x24]
LBB0_21:
	mov	w21, #-1
LBB0_22:
	mov	x0, x19
	bl	_gdbr_lock_leave
LBB0_23:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_24:
	tbnz	w21, #31, LBB0_22
; %bb.25:
	cmp	x20, #1
	b.lt	LBB0_27
; %bb.26:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_R_MIN
Lloh13:
	adrp	x8, _GDB_MAX_PKTSZ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GDB_MAX_PKTSZ@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_R_MAX
	str	w0, [x19, #16]
LBB0_27:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_31
; %bb.28:
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_send_msg
	tbnz	w0, #31, LBB0_41
; %bb.29:
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	ldr	w0, [x19, #40]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #2
	bl	_strncmp
	cbnz	w0, LBB0_31
; %bb.30:
	mov	x0, x19
	bl	_send_ack
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_31:
	ldr	x8, [x19, #8]
Lloh20:
	adrp	x9, _GDB_REMOTE_TYPE_LLDB@GOTPAGE
Lloh21:
	ldr	x9, [x9, _GDB_REMOTE_TYPE_LLDB@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_33
; %bb.32:
	mov	x0, x19
	bl	_gdbr_connect_lldb
	mov	x21, x0
	b	LBB0_22
LBB0_33:
	mov	w8, #1
	str	w8, [x19, #20]
	stp	xzr, xzr, [x19, #48]
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_send_msg
	tbnz	w0, #31, LBB0_41
; %bb.34:
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	mov	x0, x19
	bl	_handle_qC
	tbz	w0, #31, LBB0_36
; %bb.35:
	str	wzr, [x19, #20]
LBB0_36:
	mov	x0, x19
	bl	_gdbr_check_vcont
	ldr	x1, [x19, #48]
	mov	x0, x19
	mov	w2, #0
	bl	_gdbr_select
Lloh25:
	adrp	x1, l_.str.6@PAGE
Lloh26:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_send_msg
	tbnz	w0, #31, LBB0_41
; %bb.37:
	mov	x0, x19
	mov	w1, #0
	bl	_read_packet
	mov	x0, x19
	bl	_send_ack
	tbnz	w0, #31, LBB0_41
; %bb.38:
	ldr	w0, [x19, #40]
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_40
; %bb.39:
	mov	x0, x19
	bl	_gdbr_read_target_xml
LBB0_40:
	mov	x0, x19
	bl	_reg_cache_init
	mov	w21, #0
	b	LBB0_22
LBB0_41:
	mov	x21, x0
	b	LBB0_22
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qSupported:multiprocess+;qRelocInsn+;xmlRegisters=i386"

l_.str.1:                               ; @.str.1
	.asciz	"R2_GDB_PKTSZ"

	.comm	_GDB_MAX_PKTSZ,4,2              ; @GDB_MAX_PKTSZ
l_.str.2:                               ; @.str.2
	.asciz	"%d"

	.comm	_QSUPPORTED_MAX_RETRIES,4,2     ; @QSUPPORTED_MAX_RETRIES
	.comm	__isbreaked,4,2                 ; @_isbreaked
l_.str.3:                               ; @.str.3
	.asciz	"QStartNoAckMode"

l_.str.4:                               ; @.str.4
	.asciz	"OK"

	.comm	_GDB_REMOTE_TYPE_LLDB,8,3       ; @GDB_REMOTE_TYPE_LLDB
l_.str.5:                               ; @.str.5
	.asciz	"qC"

l_.str.6:                               ; @.str.6
	.asciz	"Hc-1"

.subsections_via_symbols
