	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_debug_windbg_attach
_r_debug_windbg_attach:                 ## @r_debug_windbg_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	24(%rdi), %rax
	movq	(%rax), %rbx
	xorl	%r14d, %r14d
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.1:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rdi, %r15
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_12
## %bb.3:
	cmpq	$0, (%rbx)
	je	LBB0_12
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movl	$6, %edx
	callq	_strncmp
	testq	%rax, %rax
	je	LBB0_5
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_12
LBB0_7:
	movq	(%rbx), %rdi
	movq	_wctx@GOTPCREL(%rip), %r12
	movq	%rdi, (%r12)
	callq	_windbg_sync
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	(%r12), %rdi
	callq	_windbg_read_ver
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	(%r12), %rdi
	callq	_windbg_get_bits
	movl	%eax, 8(%r15)
	movq	$0, (%r15)
	movl	$1, %r14d
	jmp	LBB0_12
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	callq	_eprintf
LBB0_10:
	movq	%rbx, %rdi
	callq	_windbg_ctx_free
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"windbg"

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

	.comm	_wctx,8,3                       ## @wctx
L_.str.2:                               ## @.str.2
	.asciz	"Could not connect to windbg\n"

	.no_dead_strip	_r_debug_windbg_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_windbg_attach
_r_debug_windbg_attach:                 ; @r_debug_windbg_attach
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, #24]
	ldr	x20, [x8]
	cbz	x20, LBB0_5
; %bb.1:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	w0, [x8]
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x8, [x20]
	cbz	x8, LBB0_5
; %bb.4:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #6
	bl	_strncmp
	cbz	x0, LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.8:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_5
LBB0_9:
	ldr	x0, [x20]
Lloh4:
	adrp	x21, _wctx@GOTPAGE
Lloh5:
	ldr	x21, [x21, _wctx@GOTPAGEOFF]
	str	x0, [x21]
	bl	_windbg_sync
	cbz	w0, LBB0_12
; %bb.10:
	ldr	x0, [x21]
	bl	_windbg_read_ver
	cbz	w0, LBB0_13
; %bb.11:
	ldr	x0, [x21]
	bl	_windbg_get_bits
	str	w0, [x19, #8]
	str	xzr, [x19]
	mov	w0, #1
	b	LBB0_6
LBB0_12:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_eprintf
LBB0_13:
	mov	x0, x20
	bl	_windbg_ctx_free
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"windbg"

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

	.comm	_wctx,8,3                       ; @wctx
l_.str.2:                               ; @.str.2
	.asciz	"Could not connect to windbg\n"

	.no_dead_strip	_r_debug_windbg_attach
.subsections_via_symbols
