	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_irq_stack                   ## -- Begin function to_irq_stack
	.p2align	4, 0x90
_to_irq_stack:                          ## @to_irq_stack
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rsi
	movq	_pending_mask@GOTPCREL(%rip), %rdi
	callq	_xchg
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%r15), %rbx
	movq	_pending_mask@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	orq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_xchg
	cmpq	%rbx, %rax
	jne	LBB0_2
## %bb.3:
	movl	$1, %r14d
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
	callq	_current_thread_info
	movq	8(%rax), %r13
	testq	%r13, %r13
	jne	LBB0_6
## %bb.5:
	movq	%rax, %r14
	movq	_cpu_tasks@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movq	(%rax,%rcx,8), %r12
	movq	%r12, %rdi
	callq	_task_thread_info
	movq	(%rax), %rcx
	movq	%rcx, (%r14)
	movq	%rax, 8(%r14)
	movq	%r14, (%r12)
LBB0_6:
	xorl	%ebx, %ebx
	testq	%r13, %r13
	setne	%bl
	movq	_pending_mask@GOTPCREL(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_xchg
	orq	%rax, %rbx
	orq	%rbx, (%r15)
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pending_mask,4,2               ## @pending_mask
	.comm	_cpu_tasks,8,3                  ## @cpu_tasks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_to_irq_stack                   ; -- Begin function to_irq_stack
	.p2align	2
_to_irq_stack:                          ; @to_irq_stack
	.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
	mov	x19, x0
	ldr	x1, [x0]
Lloh0:
	adrp	x0, _pending_mask@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pending_mask@GOTPAGEOFF]
	bl	_xchg
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x19, [x19]
Lloh2:
	adrp	x21, _pending_mask@GOTPAGE
Lloh3:
	ldr	x21, [x21, _pending_mask@GOTPAGEOFF]
	mov	w20, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	orr	x19, x0, x19
	mov	x0, x21
	mov	x1, x19
	bl	_xchg
	cmp	x0, x19
	b.ne	LBB0_2
	b	LBB0_6
LBB0_3:
	bl	_current_thread_info
	ldr	x22, [x0, #8]
	cbnz	x22, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh4:
	adrp	x8, _cpu_tasks@GOTPAGE
Lloh5:
	ldr	x8, [x8, _cpu_tasks@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	x21, [x8, x9, lsl #3]
	mov	x0, x21
	bl	_task_thread_info
	ldr	x8, [x0]
	stp	x8, x0, [x20]
	str	x20, [x21]
LBB0_5:
	cmp	x22, #0
	cset	w21, ne
Lloh7:
	adrp	x0, _pending_mask@GOTPAGE
Lloh8:
	ldr	x0, [x0, _pending_mask@GOTPAGEOFF]
	mov	x1, #0
	bl	_xchg
	mov	x20, #0
	orr	x8, x0, x21
	ldr	x9, [x19]
	orr	x8, x8, x9
	str	x8, [x19]
LBB0_6:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_pending_mask,4,2               ; @pending_mask
	.comm	_cpu_tasks,8,3                  ; @cpu_tasks
.subsections_via_symbols
