	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opalflash_task
_opalflash_task:                        ## @opalflash_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	4(%rdi), %r14
	movq	_PRIBIO@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%r12, %rdi
	callq	_opalflash_write
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_biodone
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
	movq	%r12, %rdi
	callq	_OPALFLASH_LOCK
	movq	%r12, %rdi
	callq	_bioq_first
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	callq	_msleep
	movq	%r12, %rdi
	callq	_bioq_first
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %rbx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_bioq_remove
	movq	%r12, %rdi
	callq	_OPALFLASH_UNLOCK
	movl	(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$129, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$130, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	8(%rbx), %edx
	movl	16(%rbx), %esi
	movq	%r12, %rdi
	callq	_opalflash_erase
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	16(%rbx), %esi
	movl	8(%rbx), %ecx
	movl	12(%rbx), %edx
	movq	%r12, %rdi
	callq	_opalflash_read
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIBIO,4,2                     ## @PRIBIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"opalflash"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opalflash_task
_opalflash_task:                        ; @opalflash_task
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x20, x0, #4
Lloh0:
	adrp	x23, _PRIBIO@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PRIBIO@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
Lloh4:
	adrp	x24, _EINVAL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x22, #12]
	ldr	w3, [x22, #8]
	mov	x0, x19
	bl	_opalflash_write
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	str	w0, [x22, #4]
	mov	x0, x22
	bl	_biodone
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x0, x19
	bl	_OPALFLASH_LOCK
	mov	x0, x19
	bl	_bioq_first
	mov	x22, x0
	cbnz	x0, LBB0_6
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x20
	mov	x3, x21
	mov	w4, #0
	bl	_msleep
	mov	x0, x19
	bl	_bioq_first
	cbz	x0, LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_bioq_remove
	mov	x0, x19
	bl	_OPALFLASH_UNLOCK
	ldr	w8, [x22]
	cmp	w8, #128
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x22, #16]
	ldr	w2, [x22, #8]
	mov	x0, x19
	bl	_opalflash_erase
	b	LBB0_2
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	w2, w1, [x22, #12]
	ldr	w3, [x22, #8]
	mov	x0, x19
	bl	_opalflash_read
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x24]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIBIO,4,2                     ; @PRIBIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"opalflash"

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