	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_trap
_set_trap:                              ## @set_trap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_RES_NOTRAP@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_1
## %bb.7:
	movq	_CERR_PERMISSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbp
	jmp	_ctl_error                      ## TAILCALL
LBB0_1:
	movq	_RES_LPTRAP@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	jne	LBB0_2
## %bb.3:
	movq	_TRAP_TYPE_PRIO@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_TRAP_TYPE_NONPRIO@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	movl	(%rdi), %esi
	addq	$4, %rdi
	movq	_res_version@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_ctlsettrap
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	_CERR_NORESOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ctl_error
LBB0_6:
	xorl	%edi, %edi
	popq	%rbp
	jmp	_ctl_flushpkt                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RES_NOTRAP,4,2                 ## @RES_NOTRAP
	.comm	_CERR_PERMISSION,4,2            ## @CERR_PERMISSION
	.comm	_TRAP_TYPE_PRIO,4,2             ## @TRAP_TYPE_PRIO
	.comm	_RES_LPTRAP,4,2                 ## @RES_LPTRAP
	.comm	_TRAP_TYPE_NONPRIO,4,2          ## @TRAP_TYPE_NONPRIO
	.comm	_res_version,8,3                ## @res_version
	.comm	_CERR_NORESOURCE,4,2            ## @CERR_NORESOURCE
	.no_dead_strip	_set_trap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_trap
_set_trap:                              ; @set_trap
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _RES_NOTRAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RES_NOTRAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CERR_PERMISSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CERR_PERMISSION@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_ctl_error
LBB0_2:
Lloh6:
	adrp	x8, _RES_LPTRAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RES_LPTRAP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _TRAP_TYPE_PRIO@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TRAP_TYPE_PRIO@GOTPAGEOFF]
Lloh11:
	adrp	x10, _TRAP_TYPE_NONPRIO@GOTPAGE
Lloh12:
	ldr	x10, [x10, _TRAP_TYPE_NONPRIO@GOTPAGEOFF]
	tst	w8, w1
	csel	x8, x9, x10, eq
	ldr	w2, [x8]
	ldr	w1, [x0], #4
Lloh13:
	adrp	x8, _res_version@GOTPAGE
Lloh14:
	ldr	x8, [x8, _res_version@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	bl	_ctlsettrap
	cbnz	w0, LBB0_4
; %bb.3:
Lloh16:
	adrp	x8, _CERR_NORESOURCE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CERR_NORESOURCE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_ctl_error
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_ctl_flushpkt
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RES_NOTRAP,4,2                 ; @RES_NOTRAP
	.comm	_CERR_PERMISSION,4,2            ; @CERR_PERMISSION
	.comm	_TRAP_TYPE_PRIO,4,2             ; @TRAP_TYPE_PRIO
	.comm	_RES_LPTRAP,4,2                 ; @RES_LPTRAP
	.comm	_TRAP_TYPE_NONPRIO,4,2          ; @TRAP_TYPE_NONPRIO
	.comm	_res_version,8,3                ; @res_version
	.comm	_CERR_NORESOURCE,4,2            ; @CERR_NORESOURCE
	.no_dead_strip	_set_trap
.subsections_via_symbols
