	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kcryptd_crypt_write_convert
_kcryptd_crypt_write_convert:           ## @kcryptd_crypt_write_convert
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	48(%rdi), %rax
	movq	(%rax), %rbx
	movl	$0, -44(%rbp)
	movq	40(%rdi), %rax
	movl	(%rax), %r15d
	movl	56(%rdi), %r12d
	callq	_crypt_inc_pending
	leaq	8(%r13), %rsi
	movq	40(%r13), %rcx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%edx, %edx
	movl	%r12d, %r8d
	callq	_crypt_convert_init
	testl	%r15d, %r15d
	jne	LBB0_4
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rbx
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %r13
	testl	%r15d, %r15d
	je	LBB0_16
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r15d, %esi
	leaq	-44(%rbp), %rdx
	callq	_crypt_alloc_buffer
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	8(%r13), %r14
	movq	%rbx, 32(%r13)
	movq	$0, 24(%r13)
	subl	(%rbx), %r15d
	movq	%rbx, %rdi
	callq	_bio_sectors
	addl	%eax, %r12d
	movq	%r13, %rdi
	callq	_crypt_inc_pending
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_crypt_convert
	movl	%eax, %r14d
	leaq	16(%r13), %rdi
	callq	_atomic_dec_and_test
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_kcryptd_crypt_write_io_submit
	shrl	$31, %r14d
	movl	%r14d, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, 56(%r13)
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_BLK_RW_ASYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$37, %rsi
	addl	%eax, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_congestion_wait
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%ebx, %ebx
	sete	%al
	testl	%r15d, %r15d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	40(%r13), %rsi
	movq	48(%r13), %rdi
	movl	%r12d, %edx
	callq	_crypt_io_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_crypt_inc_pending
	leaq	8(%rbx), %rsi
	movq	40(%r13), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%edx, %edx
	movl	%r12d, %r8d
	callq	_crypt_convert_init
	movl	12(%r13), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r13), %eax
	movl	%eax, 8(%rbx)
	movq	(%r13), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, (%rbx)
	movq	(%r13), %rdi
	callq	_crypt_inc_pending
	movq	%r13, %rdi
	callq	_crypt_dec_pending
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, (%rbx)
	jmp	LBB0_3
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%ecx, 60(%r13)
LBB0_15:
	movq	%r13, %rbx
LBB0_16:
	movq	%rbx, %rdi
	callq	_crypt_dec_pending
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BLK_RW_ASYNC,4,2               ## @BLK_RW_ASYNC
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_kcryptd_crypt_write_convert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kcryptd_crypt_write_convert
_kcryptd_crypt_write_convert:           ; @kcryptd_crypt_write_convert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	x9, x8, [x0, #40]
	ldr	x20, [x8]
	str	wzr, [sp, #12]
	ldr	w21, [x9]
	ldr	w22, [x0, #56]
	bl	_crypt_inc_pending
	add	x1, x19, #8
	ldr	x3, [x19, #40]
	mov	x0, x20
	mov	x2, #0
	mov	x4, x22
	bl	_crypt_convert_init
	cbz	w21, LBB0_15
; %bb.1:
Lloh0:
	adrp	x25, _BLK_RW_ASYNC@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BLK_RW_ASYNC@GOTPAGEOFF]
Lloh2:
	adrp	x26, _HZ@GOTPAGE
Lloh3:
	ldr	x26, [x26, _HZ@GOTPAGEOFF]
	mov	w27, #34079
	movk	w27, #20971, lsl #16
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x19
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x19, x23
	cbz	w21, LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x21
	bl	_crypt_alloc_buffer
	mov	x23, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x19, #8
	stp	xzr, x23, [x19, #24]
	ldr	w28, [x23]
	mov	x0, x23
	bl	_bio_sectors
	add	w22, w22, w0
	mov	x0, x19
	bl	_crypt_inc_pending
	mov	x0, x20
	mov	x1, x24
	bl	_crypt_convert
	mov	x24, x0
	add	x0, x19, #16
	bl	_atomic_dec_and_test
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	w2, #0
	bl	_kcryptd_crypt_write_io_submit
	lsr	w0, w24, #31
	bl	_unlikely
	cbnz	x0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w22, [x19, #56]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w21, w21, w28
	ldr	w0, [sp, #12]
	bl	_unlikely
	cbz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	ldrsw	x8, [x26]
	mul	x8, x8, x27
	lsr	x9, x8, #63
	asr	x8, x8, #37
	add	w1, w8, w9
	bl	_congestion_wait
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #0
	ccmp	w21, #0, #4, eq
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldp	x1, x0, [x19, #40]
	mov	x2, x22
	bl	_crypt_io_alloc
	mov	x23, x0
	bl	_crypt_inc_pending
	add	x1, x23, #8
	ldr	x3, [x19, #40]
	mov	x0, x20
	mov	x2, #0
	mov	x4, x22
	bl	_crypt_convert_init
	ldr	d0, [x19, #8]
	str	d0, [x23, #8]
	ldr	x8, [x19]
	cbz	x8, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [x23]
	ldr	x0, [x19]
	bl	_crypt_inc_pending
	mov	x0, x19
	bl	_crypt_dec_pending
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x19, [x23]
	b	LBB0_3
LBB0_14:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19, #60]
LBB0_15:
	mov	x23, x19
LBB0_16:
	mov	x0, x23
	bl	_crypt_dec_pending
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BLK_RW_ASYNC,4,2               ; @BLK_RW_ASYNC
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_kcryptd_crypt_write_convert
.subsections_via_symbols
