	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_rdi_resume
_arm_rdi_resume:                        ## @arm_rdi_resume
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movq	_ARM_PC_REGNUM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_read_register
	movl	%eax, %edi
	callq	_arm_get_next_pc
	movl	%eax, %r14d
	leaq	-20(%rbp), %rsi
	movl	%eax, %edi
	callq	_arm_rdi_insert_breakpoint
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	leaq	-24(%rbp), %rdi
	callq	_angel_RDI_execute
	movq	_execute_status@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_RDIError_NoError@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.4:
	movq	_RDIError_BreakpointReached@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %edi
	callq	_rdi_error_message
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_filtered
LBB0_6:
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	leaq	-20(%rbp), %rsi
	movl	%r14d, %edi
	callq	_arm_rdi_remove_breakpoint
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARM_PC_REGNUM,4,2              ## @ARM_PC_REGNUM
	.comm	_execute_status,4,2             ## @execute_status
	.comm	_RDIError_NoError,4,2           ## @RDIError_NoError
	.comm	_RDIError_BreakpointReached,4,2 ## @RDIError_BreakpointReached
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RDI_execute: %s\n"

	.no_dead_strip	_arm_rdi_resume
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_rdi_resume
_arm_rdi_resume:                        ; @arm_rdi_resume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ARM_PC_REGNUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARM_PC_REGNUM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_read_register
	bl	_arm_get_next_pc
	mov	x20, x0
	add	x1, sp, #8
	bl	_arm_rdi_insert_breakpoint
	b	LBB0_3
LBB0_2:
	mov	w20, #0
LBB0_3:
	add	x0, sp, #12
	bl	_angel_RDI_execute
Lloh3:
	adrp	x8, _execute_status@GOTPAGE
Lloh4:
	ldr	x8, [x8, _execute_status@GOTPAGEOFF]
Lloh5:
	str	w0, [x8]
Lloh6:
	adrp	x8, _RDIError_NoError@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDIError_NoError@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _RDIError_BreakpointReached@GOTPAGE
Lloh10:
	ldr	x9, [x9, _RDIError_BreakpointReached@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.eq	LBB0_5
; %bb.4:
	bl	_rdi_error_message
	mov	x1, x0
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf_filtered
LBB0_5:
	cbz	w19, LBB0_7
; %bb.6:
	add	x1, sp, #8
	mov	x0, x20
	bl	_arm_rdi_remove_breakpoint
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ARM_PC_REGNUM,4,2              ; @ARM_PC_REGNUM
	.comm	_execute_status,4,2             ; @execute_status
	.comm	_RDIError_NoError,4,2           ; @RDIError_NoError
	.comm	_RDIError_BreakpointReached,4,2 ; @RDIError_BreakpointReached
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RDI_execute: %s\n"

	.no_dead_strip	_arm_rdi_resume
.subsections_via_symbols
