	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function grab_drive
_grab_drive:                            ## @grab_drive
	.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
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rcx
	movq	_idle@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_9
## %bb.1:
	movl	12(%rbx), %eax
	incl	%eax
	movl	%eax, 12(%rbx)
	movq	_available@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rcx
	je	LBB0_8
## %bb.2:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	leaq	16(%rbx), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	callq	_interruptible_sleep_on
	movq	(%rbx), %rax
	cmpq	(%r15), %rax
	je	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	decl	12(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EINTR@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	movl	12(%rbx), %eax
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_8:
	decl	%eax
	movl	%eax, 12(%rbx)
LBB0_9:
	movl	%r13d, %eax
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_idle,8,3                       ## @idle
	.comm	_available,8,3                  ## @available
	.comm	_current,4,2                    ## @current
	.comm	_EINTR,4,2                      ## @EINTR
	.no_dead_strip	_grab_drive
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function grab_drive
_grab_drive:                            ; @grab_drive
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x9, [x20]
Lloh0:
	adrp	x8, _idle@GOTPAGE
Lloh1:
	ldr	x8, [x8, _idle@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	b.eq	LBB0_9
; %bb.1:
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x20, #12]
Lloh3:
	adrp	x24, _available@GOTPAGE
Lloh4:
	ldr	x24, [x24, _available@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x9, x10
	b.eq	LBB0_8
; %bb.2:
	add	x23, x20, #16
Lloh5:
	adrp	x25, _current@GOTPAGE
Lloh6:
	ldr	x25, [x25, _current@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_interruptible_sleep_on
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w22, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	bl	_signal_pending
	cbz	x0, LBB0_3
; %bb.6:
	ldr	w8, [x20, #12]
	sub	w8, w8, #1
	str	w8, [x20, #12]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh7:
	adrp	x8, _EINTR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_7:
	ldr	w8, [x20, #12]
LBB0_8:
	sub	w8, w8, #1
	str	w8, [x20, #12]
LBB0_9:
	mov	w8, w21
	str	x8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_idle,8,3                       ; @idle
	.comm	_available,8,3                  ; @available
	.comm	_current,4,2                    ; @current
	.comm	_EINTR,4,2                      ; @EINTR
	.no_dead_strip	_grab_drive
.subsections_via_symbols
