	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function process_events
_process_events:                        ## @process_events
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	addq	$20, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	movq	_MAX_EVENTS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_1
## %bb.2:
	movl	(%rbx), %r12d
	xorl	%ecx, %ecx
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %rax
	movq	_SEQ_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$1, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmovel	%eax, %ecx
	movq	_MAX_EVENTS@GOTPCREL(%rip), %r15
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	xorl	%edx, %edx
	divl	(%r15)
	movl	%edx, %r12d
	movl	%edx, (%rbx)
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	movl	(%r15), %eax
	addl	%eax, %eax
	cmpl	%eax, %r13d
	jge	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%r12d, 4(%rbx)
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 32(%rbx)
	je	LBB0_13
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_process_command_flags
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	xorl	%ecx, %ecx
	cmpl	%r12d, 4(%rbx)
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ecx, %ecx
	cmpl	$0, 32(%rbx)
	jne	LBB0_12
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rbx), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %r14
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movl	%r12d, %r15d
	leaq	(%r14,%r15,8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_SEQ_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_process_event
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	(%r14,%r15,8), %rdi
	callq	_kfree
	movq	$0, (%r14,%r15,8)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, -88(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_EVENTS@GOTPCREL(%rip), %r15
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_1:
	xorl	%r13d, %r13d
LBB0_13:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	movl	(%r15), %eax
	addl	%eax, %eax
	cmpl	%eax, %r13d
	jne	LBB0_14
## %bb.15:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_14:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_EVENTS,4,2                 ## @MAX_EVENTS
	.comm	_SEQ_NONE,8,3                   ## @SEQ_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"infinite loop in process_events; aborting.\n"

	.no_dead_strip	_process_events
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function process_events
_process_events:                        ; @process_events
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	add	x20, x0, #20
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x22, _MAX_EVENTS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_EVENTS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.1:
	mov	w26, #0
	mov	w23, #0
	ldr	w24, [x19]
Lloh2:
	adrp	x25, _SEQ_NONE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _SEQ_NONE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w24, #1
	ldr	w9, [x22]
	udiv	w10, w8, w9
	msub	w24, w10, w9, w8
	str	w24, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8, lsl #1
	b.ge	LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #4]
	cmp	w8, w24
	b.ne	LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w26, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_14
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_process_command_flags
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19, #4]
	cmp	w8, w24
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #24]
	add	x21, x8, w24, uxtw #3
	ldr	x27, [x19, #8]
	ldr	x28, [x25]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x21
	bl	_process_event
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x0, [x21]
	bl	_kfree
	str	xzr, [x21]
	cmp	x27, x28
	b.eq	LBB0_2
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	cmp	x8, x9
	csinc	w26, w26, wzr, ne
	b	LBB0_2
LBB0_13:
	mov	w23, #0
LBB0_14:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w8, [x22]
	cmp	w23, w8, lsl #1
	b.ne	LBB0_16
; %bb.15:
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_dev_err
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_EVENTS,4,2                 ; @MAX_EVENTS
	.comm	_SEQ_NONE,8,3                   ; @SEQ_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"infinite loop in process_events; aborting.\n"

	.no_dead_strip	_process_events
.subsections_via_symbols
