	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mambodisk_task
_mambodisk_task:                        ## @mambodisk_task
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	24(%rdi), %edi
	callq	_device_get_unit
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r14)
	je	LBB0_17
## %bb.1:
	leaq	16(%r14), %r15
	leaq	20(%r14), %r12
	movq	_PRIBIO@GOTPCREL(%rip), %rbx
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	imulq	%rdi, %r12
	movq	%r12, 40(%r13)
	movq	_BIO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 32(%r13)
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_biodone
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpl	$0, (%r14)
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	_PRIBIO@GOTPCREL(%rip), %rbx
	je	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	%r14, %rdi
	callq	_MBODISK_LOCK
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	callq	_bioq_first
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movq	%r12, %rsi
	leaq	L_.str(%rip), %rcx
	xorl	%r8d, %r8d
	callq	_msleep
	cmpl	$0, (%r14)
	jne	LBB0_3
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_bioq_remove
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_MBODISK_UNLOCK
	cmpl	$0, (%r14)
	je	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rax
	movq	(%rax), %rdi
	movq	(%r13), %r14
	movq	8(%r13), %rax
	movq	%rax, %rcx
	orq	%rdi, %rcx
	shrq	$32, %rcx
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	divq	%rdi
	movq	%rax, %rbx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %ebx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	%r14, %rbx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=2
	movl	(%rax), %edi
	movl	%r15d, %ecx
	shll	$16, %ecx
	orl	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%r14d, %edx
	callq	_mambocall
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movslq	%r15d, %rcx
	addq	%rcx, %r14
	testl	%eax, %eax
	jne	LBB0_15
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %r12
	subq	%r14, %r12
	jle	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	%r14, %rsi
	subq	(%r13), %rsi
	imulq	%rdi, %rsi
	addq	16(%r13), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %r15d
	cmpl	%r12d, %r15d
	cmovgel	%r12d, %r15d
	movq	24(%r13), %rcx
	movq	_MAMBO_DISK_READ@GOTPCREL(%rip), %rax
	movq	_BIO_READ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	_MAMBO_DISK_WRITE@GOTPCREL(%rip), %rax
	movq	_BIO_WRITE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_14
	jmp	LBB0_15
LBB0_17:
	movq	%r14, %rdi
	callq	_MBODISK_LOCK
	movl	$-1, (%r14)
	movq	%r14, %rdi
	callq	_wakeup
	movq	%r14, %rdi
	callq	_MBODISK_UNLOCK
	xorl	%edi, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kproc_exit                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIBIO,4,2                     ## @PRIBIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"jobqueue"

	.comm	_BIO_READ,8,3                   ## @BIO_READ
	.comm	_MAMBO_DISK_READ,4,2            ## @MAMBO_DISK_READ
	.comm	_BIO_WRITE,8,3                  ## @BIO_WRITE
	.comm	_MAMBO_DISK_WRITE,4,2           ## @MAMBO_DISK_WRITE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_BIO_ERROR,4,2                  ## @BIO_ERROR
	.no_dead_strip	_mambodisk_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mambodisk_task
_mambodisk_task:                        ; @mambodisk_task
	.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
	ldr	w0, [x0, #24]
	bl	_device_get_unit
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.1:
	mov	x20, x0
	add	x21, x19, #16
	add	x22, x19, #20
Lloh0:
	adrp	x23, _PRIBIO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PRIBIO@GOTPAGEOFF]
Lloh2:
	adrp	x25, l_.str@PAGE
Lloh3:
	add	x25, x25, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x24, #48]
	mul	x8, x26, x27
	str	x8, [x24, #40]
Lloh7:
	adrp	x8, _BIO_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BIO_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x24, #32]
	orr	w8, w9, w8
	str	w8, [x24, #32]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x24
	bl	_biodone
	ldr	w8, [x19]
Lloh10:
	adrp	x23, _PRIBIO@GOTPAGE
Lloh11:
	ldr	x23, [x23, _PRIBIO@GOTPAGEOFF]
Lloh12:
	adrp	x25, l_.str@PAGE
Lloh13:
	add	x25, x25, l_.str@PAGEOFF
	cbz	w8, LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	mov	x0, x19
	bl	_MBODISK_LOCK
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x21
	bl	_bioq_first
	mov	x24, x0
	cbnz	x0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x22
	mov	x3, x25
	mov	w4, #0
	bl	_msleep
	ldr	w8, [x19]
	cbnz	w8, LBB0_5
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_bioq_remove
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_MBODISK_UNLOCK
	ldr	w8, [x19]
	cbz	w8, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x27, [x8]
	ldp	x25, x8, [x24]
	udiv	x8, x8, x27
	add	x28, x8, x25
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	sub	x8, x25, x8
	madd	x1, x8, x27, x9
	ldr	w0, [x11]
	orr	w3, w20, w23, lsl #16
	mov	x2, x25
	bl	_mambocall
	add	x25, x25, w23, sxtw
	cbnz	w0, LBB0_2
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	subs	x26, x28, x25
	b.le	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x8, [x24]
	ldr	w9, [x19, #4]
	cmp	w9, w26
	csel	w23, w9, w26, lt
	ldp	x9, x10, [x24, #16]
Lloh14:
	adrp	x11, _BIO_READ@GOTPAGE
Lloh15:
	ldr	x11, [x11, _BIO_READ@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x11]
Lloh17:
	adrp	x11, _MAMBO_DISK_READ@GOTPAGE
Lloh18:
	ldr	x11, [x11, _MAMBO_DISK_READ@GOTPAGEOFF]
	cmp	x10, x12
	b.eq	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
Lloh19:
	adrp	x11, _BIO_WRITE@GOTPAGE
Lloh20:
	ldr	x11, [x11, _BIO_WRITE@GOTPAGEOFF]
Lloh21:
	ldr	x12, [x11]
Lloh22:
	adrp	x11, _MAMBO_DISK_WRITE@GOTPAGE
Lloh23:
	ldr	x11, [x11, _MAMBO_DISK_WRITE@GOTPAGEOFF]
	cmp	x10, x12
	b.eq	LBB0_10
	b	LBB0_2
LBB0_14:
	mov	x0, x19
	bl	_MBODISK_LOCK
	mov	w8, #-1
	str	w8, [x19]
	mov	x0, x19
	bl	_wakeup
	mov	x0, x19
	bl	_MBODISK_UNLOCK
	mov	w0, #0
	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	_kproc_exit
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIBIO,4,2                     ; @PRIBIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"jobqueue"

	.comm	_BIO_READ,8,3                   ; @BIO_READ
	.comm	_MAMBO_DISK_READ,4,2            ; @MAMBO_DISK_READ
	.comm	_BIO_WRITE,8,3                  ; @BIO_WRITE
	.comm	_MAMBO_DISK_WRITE,4,2           ; @MAMBO_DISK_WRITE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_BIO_ERROR,4,2                  ; @BIO_ERROR
	.no_dead_strip	_mambodisk_task
.subsections_via_symbols
