	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mddev_create_wb_pool           ## -- Begin function mddev_create_wb_pool
	.p2align	4, 0x90
_mddev_create_wb_pool:                  ## @mddev_create_wb_pool
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdi)
	je	LBB0_9
## %bb.1:
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_WriteMostly@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_test_bit
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movq	%rbx, %rdi
	callq	_rdev_init_wb
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	cmpq	$0, (%r15)
	jne	LBB0_9
## %bb.4:
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	callq	_mddev_suspend
LBB0_6:
	xorl	%eax, %eax
	callq	_memalloc_noio_save
	movl	%eax, %ebx
	movq	_NR_WB_INFOS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4, %esi
	callq	_mempool_create_kmalloc_pool
	movq	%rax, (%r15)
	movl	%ebx, %edi
	callq	_memalloc_noio_restore
	cmpq	$0, (%r15)
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_8:
	testl	%r14d, %r14d
	je	LBB0_10
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mddev_resume                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WriteMostly,4,2                ## @WriteMostly
	.comm	_NR_WB_INFOS,4,2                ## @NR_WB_INFOS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't alloc memory pool for writemostly\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mddev_create_wb_pool           ; -- Begin function mddev_create_wb_pool
	.p2align	2
_mddev_create_wb_pool:                  ; @mddev_create_wb_pool
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _WriteMostly@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WriteMostly@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_test_bit
	cbz	w0, LBB0_9
; %bb.2:
	mov	x0, x21
	bl	_rdev_init_wb
	cbz	w0, LBB0_9
; %bb.3:
	ldr	x8, [x19]
	cbnz	x8, LBB0_9
; %bb.4:
	cbnz	w20, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_mddev_suspend
LBB0_6:
	bl	_memalloc_noio_save
	mov	x21, x0
Lloh3:
	adrp	x8, _NR_WB_INFOS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NR_WB_INFOS@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #4
	bl	_mempool_create_kmalloc_pool
	str	x0, [x19]
	mov	x0, x21
	bl	_memalloc_noio_restore
	ldr	x8, [x19]
	cbnz	x8, LBB0_8
; %bb.7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_8:
	cbz	w20, LBB0_10
LBB0_9:
	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
LBB0_10:
	mov	x0, x19
	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
	b	_mddev_resume
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_WriteMostly,4,2                ; @WriteMostly
	.comm	_NR_WB_INFOS,4,2                ; @NR_WB_INFOS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't alloc memory pool for writemostly\n"

.subsections_via_symbols
