	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_debug_gdb_attach
_r_debug_gdb_attach:                    ## @r_debug_gdb_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, (%rdi)
	movl	$1, %r14d
	testq	%rbx, %rbx
	je	LBB0_28
## %bb.1:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.2:
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.3:
	cmpq	$0, (%rbx)
	je	LBB0_28
## %bb.4:
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_5
## %bb.27:
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_eprintf
LBB0_28:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %r15
	movq	_origriogdb@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_support_sw_bp@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_support_hw_bp@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	4(%r12), %edi
	callq	_r_sys_arch_id
                                        ## kill: def $eax killed $eax def $rax
	movq	8(%r12), %rcx
	movl	(%rcx), %edx
	movq	_desc@GOTPCREL(%rip), %rcx
	movq	%r15, (%rcx)
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_28
## %bb.6:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	cmpl	$16, %edx
	je	LBB0_10
## %bb.8:
	cmpl	$64, %edx
	je	LBB0_12
## %bb.9:
	cmpl	$32, %edx
	jne	LBB0_24
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_21:
	cmpl	$64, %edx
	je	LBB0_23
## %bb.22:
	cmpl	$32, %edx
	jne	LBB0_24
LBB0_23:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_gdbr_set_architecture
	jmp	LBB0_28
LBB0_14:
	cmpl	$16, %edx
	je	LBB0_17
## %bb.15:
	cmpl	$64, %edx
	je	LBB0_18
## %bb.16:
	cmpl	$32, %edx
	jne	LBB0_24
LBB0_17:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_26:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_11
LBB0_19:
	cmpl	$32, %edx
	jne	LBB0_24
## %bb.20:
	leaq	L_.str.4(%rip), %rsi
LBB0_11:
	movq	%r15, %rdi
	movl	$32, %edx
	callq	_gdbr_set_architecture
	jmp	LBB0_28
LBB0_24:
	movl	4(%r12), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_eprintf
	jmp	LBB0_28
LBB0_25:
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	movl	$16, %edx
	callq	_gdbr_set_architecture
	jmp	LBB0_28
LBB0_12:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_18:
	leaq	L_.str.3(%rip), %rsi
LBB0_13:
	movq	%r15, %rdi
	movl	$64, %edx
	callq	_gdbr_set_architecture
	jmp	LBB0_28
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
.set L0_0_set_28, LBB0_28-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_26
	.long	L0_0_set_28
	.long	L0_0_set_21
	.long	L0_0_set_19
	.long	L0_0_set_25
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gdb"

	.comm	_origriogdb,8,3                 ## @origriogdb
	.comm	_UNKNOWN,8,3                    ## @UNKNOWN
	.comm	_support_sw_bp,8,3              ## @support_sw_bp
	.comm	_support_hw_bp,8,3              ## @support_hw_bp
	.comm	_desc,8,3                       ## @desc
L_.str.1:                               ## @.str.1
	.asciz	"x86"

L_.str.2:                               ## @.str.2
	.asciz	"Not supported register %s %d profile\n"

L_.str.3:                               ## @.str.3
	.asciz	"arm"

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

L_.str.5:                               ## @.str.5
	.asciz	"mips"

L_.str.6:                               ## @.str.6
	.asciz	"avr"

L_.str.7:                               ## @.str.7
	.asciz	"v850"

L_.str.8:                               ## @.str.8
	.asciz	"ERROR: Underlying IO descriptor is not a GDB one..\n"

	.no_dead_strip	_r_debug_gdb_attach
.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_attach
_r_debug_gdb_attach:                    ; @r_debug_gdb_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #16]
	ldr	x21, [x8]
	str	wzr, [x0]
	cbz	x21, LBB0_6
; %bb.1:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x1, [x8]
	cbz	x1, LBB0_6
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_8
; %bb.5:
Lloh2:
	adrp	x0, l_.str.8@PAGE
Lloh3:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_eprintf
LBB0_6:
	mov	w0, #1
LBB0_7:
	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
	add	sp, sp, #64
	ret
LBB0_8:
Lloh4:
	adrp	x8, _origriogdb@GOTPAGE
Lloh5:
	ldr	x8, [x8, _origriogdb@GOTPAGEOFF]
	ldr	x20, [x21]
Lloh6:
	str	x21, [x8]
Lloh7:
	adrp	x8, _UNKNOWN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _UNKNOWN@GOTPAGEOFF]
Lloh9:
	adrp	x9, _support_sw_bp@GOTPAGE
Lloh10:
	ldr	x9, [x9, _support_sw_bp@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	str	x8, [x9]
Lloh13:
	adrp	x9, _support_hw_bp@GOTPAGE
Lloh14:
	ldr	x9, [x9, _support_hw_bp@GOTPAGEOFF]
Lloh15:
	str	x8, [x9]
	ldr	w0, [x19, #4]
	bl	_r_sys_arch_id
	mov	x8, x0
	ldr	x9, [x19, #8]
	ldr	w2, [x9]
Lloh16:
	adrp	x9, _desc@GOTPAGE
Lloh17:
	ldr	x9, [x9, _desc@GOTPAGEOFF]
Lloh18:
	str	x20, [x9]
	mov	w0, #1
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_7
; %bb.9:
Lloh19:
	adrp	x9, lJTI0_0@PAGE
Lloh20:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:
	cmp	w2, #16
	b.eq	LBB0_13
; %bb.11:
	cmp	w2, #64
	b.eq	LBB0_28
; %bb.12:
	cmp	w2, #32
	b.ne	LBB0_26
LBB0_13:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_22
LBB0_14:
	cmp	w2, #64
	b.eq	LBB0_16
; %bb.15:
	cmp	w2, #32
	b.ne	LBB0_25
LBB0_16:
Lloh23:
	adrp	x1, l_.str.5@PAGE
Lloh24:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_gdbr_set_architecture
	b	LBB0_6
LBB0_17:
	cmp	w2, #16
	b.eq	LBB0_20
; %bb.18:
	cmp	w2, #64
	b.eq	LBB0_29
; %bb.19:
	cmp	w2, #32
	b.ne	LBB0_25
LBB0_20:
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_22
LBB0_21:
Lloh27:
	adrp	x1, l_.str.7@PAGE
Lloh28:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_22:
	mov	x0, x20
	mov	w2, #32
	bl	_gdbr_set_architecture
	b	LBB0_6
LBB0_23:
	cmp	w2, #32
	b.ne	LBB0_25
; %bb.24:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_30
LBB0_25:
                                        ; kill: def $w2 killed $w2 killed $x2 def $x2
LBB0_26:
	ldr	w8, [x19, #4]
	stp	x8, x2, [sp]
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_eprintf
	mov	w0, #0
	b	LBB0_7
LBB0_27:
Lloh33:
	adrp	x1, l_.str.6@PAGE
Lloh34:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	w2, #16
	bl	_gdbr_set_architecture
	b	LBB0_6
LBB0_28:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_30
LBB0_29:
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_30:
	mov	x0, x20
	bl	_gdbr_set_architecture
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_23-LBB0_7)>>2
	.byte	(LBB0_27-LBB0_7)>>2
	.byte	(LBB0_17-LBB0_7)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gdb"

	.comm	_origriogdb,8,3                 ; @origriogdb
	.comm	_UNKNOWN,8,3                    ; @UNKNOWN
	.comm	_support_sw_bp,8,3              ; @support_sw_bp
	.comm	_support_hw_bp,8,3              ; @support_hw_bp
	.comm	_desc,8,3                       ; @desc
l_.str.1:                               ; @.str.1
	.asciz	"x86"

l_.str.2:                               ; @.str.2
	.asciz	"Not supported register %s %d profile\n"

l_.str.3:                               ; @.str.3
	.asciz	"arm"

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

l_.str.5:                               ; @.str.5
	.asciz	"mips"

l_.str.6:                               ; @.str.6
	.asciz	"avr"

l_.str.7:                               ; @.str.7
	.asciz	"v850"

l_.str.8:                               ; @.str.8
	.asciz	"ERROR: Underlying IO descriptor is not a GDB one..\n"

	.no_dead_strip	_r_debug_gdb_attach
.subsections_via_symbols
