	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_flash_dev_create           ## -- Begin function bch_flash_dev_create
	.p2align	4, 0x90
_bch_flash_dev_create:                  ## @bch_flash_dev_create
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_CACHE_SET_STOPPING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINTR@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_CACHE_SET_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_uuid_find_empty
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r15
	movl	16(%rax), %edi
	movl	$16, %esi
	callq	_get_random_bytes
	movl	12(%r15), %edi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	xorl	%eax, %eax
	callq	_ktime_get_real_seconds
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r15)
	movl	%eax, 8(%r15)
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_SET_UUID_FLASH_ONLY
	sarl	$9, %r14d
	movl	%r14d, (%r15)
	movq	%rbx, %rdi
	callq	_bch_uuid_write
	movq	%rbx, %rdi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_flash_dev_run                  ## TAILCALL
LBB0_4:
	movq	_EPERM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_CACHE_SET_STOPPING,4,2         ## @CACHE_SET_STOPPING
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_CACHE_SET_RUNNING,4,2          ## @CACHE_SET_RUNNING
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't create volume, no room for UUID"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bch_flash_dev_create           ; -- Begin function bch_flash_dev_create
	.p2align	2
_bch_flash_dev_create:                  ; @bch_flash_dev_create
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _CACHE_SET_STOPPING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CACHE_SET_STOPPING@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EINTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	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_3:
Lloh5:
	adrp	x8, _CACHE_SET_RUNNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CACHE_SET_RUNNING@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_uuid_find_empty
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	w0, [x0, #16]
	mov	w1, #16
	bl	_get_random_bytes
	ldr	w0, [x21, #12]
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	bl	_ktime_get_real_seconds
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_cpu_to_le32
	stp	w0, w0, [x21, #4]
	mov	x0, x21
	mov	w1, #1
	bl	_SET_UUID_FLASH_ONLY
	asr	w8, w20, #9
	str	w8, [x21]
	mov	x0, x19
	bl	_bch_uuid_write
	mov	x0, x19
	mov	x1, x21
	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	_flash_dev_run
LBB0_6:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CACHE_SET_STOPPING,4,2         ; @CACHE_SET_STOPPING
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_CACHE_SET_RUNNING,4,2          ; @CACHE_SET_RUNNING
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't create volume, no room for UUID"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
