	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_restore_exc_port          ## -- Begin function proc_restore_exc_port
	.p2align	4, 0x90
_proc_restore_exc_port:                 ## @proc_restore_exc_port
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	__proc_get_exc_port
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_proc_debug
	cmpq	%rbx, (%r15)
	jne	LBB0_2
## %bb.3:
	movq	8(%r15), %rsi
	movq	%r15, %rdi
	callq	_proc_set_exception_port
	movq	%rax, %r14
	cmpq	$0, 8(%r15)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_2:
	xorl	%r14d, %r14d
	cmpq	$0, 8(%r15)
	je	LBB0_6
LBB0_5:
	xorl	%eax, %eax
	callq	_mach_task_self
	movq	8(%r15), %rsi
	movl	%eax, %edi
	callq	_mach_port_deallocate
LBB0_6:
	movq	_MACH_PORT_NULL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	testq	%r14, %r14
	je	LBB0_7
## %bb.9:
	movq	%r15, %rdi
	callq	_proc_string
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_safe_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_warning                        ## TAILCALL
LBB0_7:
	movq	%rax, (%r15)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"restoring real exception port"

	.comm	_MACH_PORT_NULL,8,3             ## @MACH_PORT_NULL
L_.str.1:                               ## @.str.1
	.asciz	"Error setting exception port for %s: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proc_restore_exc_port          ; -- Begin function proc_restore_exc_port
	.p2align	2
_proc_restore_exc_port:                 ; @proc_restore_exc_port
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	__proc_get_exc_port
	cbz	x0, LBB0_8
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_proc_debug
	ldr	x8, [x19]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.2:
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_proc_set_exception_port
	mov	x20, x0
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_4
	b	LBB0_5
LBB0_3:
	mov	x20, #0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
LBB0_4:
	bl	_mach_task_self
	ldr	x1, [x19, #8]
	bl	_mach_port_deallocate
LBB0_5:
Lloh2:
	adrp	x8, _MACH_PORT_NULL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MACH_PORT_NULL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	cbz	x20, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_proc_string
	mov	x19, x0
	mov	x0, x20
	bl	_safe_strerror
	mov	x2, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_warning
LBB0_7:
	str	x8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"restoring real exception port"

	.comm	_MACH_PORT_NULL,8,3             ; @MACH_PORT_NULL
l_.str.1:                               ; @.str.1
	.asciz	"Error setting exception port for %s: %s"

.subsections_via_symbols
