	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reshape_direction_store
_reshape_direction_store:               ## @reshape_direction_store
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cmd_match
	xorl	%r12d, %r12d
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cmd_match
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	cmpl	%r12d, (%r15)
	je	LBB0_14
## %bb.4:
	movq	%r15, %rdi
	callq	_mddev_lock
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movslq	%eax, %r14
	jmp	LBB0_14
LBB0_6:
	cmpq	$0, 24(%r15)
	je	LBB0_8
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_mddev_unlock
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.12:
	negl	%ebx
	movslq	%ebx, %r14
	jmp	LBB0_14
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_14
LBB0_8:
	cmpq	$0, 16(%r15)
	je	LBB0_13
## %bb.9:
	cmpq	$0, 8(%r15)
	je	LBB0_10
LBB0_13:
	movl	%r12d, (%r15)
	movq	%r15, %rdi
	callq	_mddev_unlock
LBB0_14:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"forwards"

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

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_reshape_direction_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reshape_direction_store
_reshape_direction_store:               ; @reshape_direction_store
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_cmd_match
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_cmd_match
	cbz	x0, LBB0_11
; %bb.3:
	mov	w21, #1
LBB0_4:
	ldr	w8, [x20]
	cmp	w8, w21
	b.eq	LBB0_15
; %bb.5:
	mov	x0, x20
	bl	_mddev_lock
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_7
; %bb.6:
	sxtw	x19, w0
	b	LBB0_15
LBB0_7:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_12
; %bb.8:
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_9:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_mddev_unlock
	cbz	w21, LBB0_15
; %bb.10:
	neg	w8, w21
	sxtw	x19, w8
	b	LBB0_15
LBB0_11:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_15
LBB0_12:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
LBB0_14:
	str	w21, [x20]
	mov	x0, x20
	bl	_mddev_unlock
LBB0_15:
	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
	ret
LBB0_16:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"forwards"

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

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_reshape_direction_store
.subsections_via_symbols
