	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function run_queue
_run_queue:                             ## @run_queue
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	24(%rax), %r13
	movq	%r13, %rdi
	callq	_TAILQ_FIRST
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rax, %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_periph_links@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movq	%rbx, %rdi
	callq	_free_ccb
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_send_ccb
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_TAILQ_FIRST
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %r14
	movq	_CAM_REQ_ABORTED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rbx), %r12
	movl	(%r12), %r15d
	movq	_AIO_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	addq	(%rdx), %rcx
	cmpq	%rcx, 8(%r12)
	je	LBB0_9
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_CTIO_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rcx
	addq	(%rdx), %rcx
	cmpq	%rcx, 8(%r12)
	jne	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_CAM_SEND_STATUS@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	_periph_links@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_REMOVE
	movl	(%r12), %edx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_tcmd_handle
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_CTIO_DONE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_11
	jmp	LBB0_12
LBB0_13:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_15:
	cmpl	%eax, %r15d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_warnx
	movl	$1, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAM_REQ_ABORTED,8,3            ## @CAM_REQ_ABORTED
	.comm	_periph_links,4,2               ## @periph_links
	.comm	_AIO_DONE,4,2                   ## @AIO_DONE
	.comm	_CTIO_DONE,4,2                  ## @CTIO_DONE
	.comm	_CAM_SEND_STATUS,4,2            ## @CAM_SEND_STATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IO %p:%p out of order %s"

L_.str.1:                               ## @.str.1
	.asciz	"aio"

L_.str.2:                               ## @.str.2
	.asciz	"ctio"

	.no_dead_strip	_run_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function run_queue
_run_queue:                             ; @run_queue
	.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
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
	ldr	x19, [x0]
	add	x21, x19, #24
	mov	x0, x21
	bl	_TAILQ_FIRST
	cbz	x0, LBB0_13
; %bb.2:
	mov	x22, x0
Lloh0:
	adrp	x23, _CAM_REQ_ABORTED@GOTPAGE
Lloh1:
	ldr	x23, [x23, _CAM_REQ_ABORTED@GOTPAGEOFF]
Lloh2:
	adrp	x24, _periph_links@GOTPAGE
Lloh3:
	ldr	x24, [x24, _periph_links@GOTPAGEOFF]
Lloh4:
	adrp	x27, _CTIO_DONE@GOTPAGE
Lloh5:
	ldr	x27, [x27, _CTIO_DONE@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x22
	bl	_TAILQ_REMOVE
	mov	x0, x22
	bl	_free_ccb
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_send_ccb
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_TAILQ_FIRST
	mov	x22, x0
	cbz	x0, LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x26, [x22, #8]
	ldr	w28, [x26]
Lloh6:
	adrp	x9, _AIO_DONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AIO_DONE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w28, w9
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x26, #8]
	ldp	x11, x12, [x19]
	add	x11, x12, x11
	cmp	x10, x11
	b.eq	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w10, [x27]
	cmp	w28, w10
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x26, #8]
	ldr	x11, [x19]
	ldr	x12, [x19, #16]
	add	x11, x12, x11
	cmp	x10, x11
	b.ne	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
Lloh9:
	adrp	x9, _CAM_SEND_STATUS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CAM_SEND_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w25, w9, w8
	ldr	w2, [x24]
	mov	x0, x21
	mov	x1, x22
	bl	_TAILQ_REMOVE
	ldr	w2, [x26]
	mov	x0, x20
	mov	x1, x22
	bl	_tcmd_handle
	ldr	w8, [x27]
	cmp	w25, #0
	ccmp	w28, w8, #0, ne
	b.eq	LBB0_4
	b	LBB0_5
LBB0_12:
Lloh12:
	adrp	x8, l_.str.2@PAGE
Lloh13:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh14:
	adrp	x10, l_.str.1@PAGE
Lloh15:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w28, w9
	csel	x3, x10, x8, eq
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x19
	bl	_warnx
	mov	w0, #1
LBB0_13:
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_CAM_REQ_ABORTED,8,3            ; @CAM_REQ_ABORTED
	.comm	_periph_links,4,2               ; @periph_links
	.comm	_AIO_DONE,4,2                   ; @AIO_DONE
	.comm	_CTIO_DONE,4,2                  ; @CTIO_DONE
	.comm	_CAM_SEND_STATUS,4,2            ; @CAM_SEND_STATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IO %p:%p out of order %s"

l_.str.1:                               ; @.str.1
	.asciz	"aio"

l_.str.2:                               ; @.str.2
	.asciz	"ctio"

	.no_dead_strip	_run_queue
.subsections_via_symbols
