	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crypt_alloc_buffer
_crypt_alloc_buffer:                    ## @crypt_alloc_buffer
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	leal	(%rsi,%rax), %ebx
	decl	%ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shrl	%cl, %ebx
	movq	%rdi, %r13
	movq	(%rdi), %r14
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movq	___GFP_HIGHMEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	leaq	8(%r14), %r15
	leaq	4(%r14), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	___GFP_DIRECT_RECLAIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	andl	%r12d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r14, %rdi
	callq	_mutex_lock
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_bio_alloc_bioset
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rax, %r15
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_clone_init
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %r13d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_mempool_alloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	%r12d, %r14d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cmpl	%r12d, %ebx
	cmovbl	%ebx, %r12d
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_bio_add_page
	subl	%r12d, %ebx
	movl	%r14d, %r12d
	decl	%r13d
	jne	LBB0_7
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_crypt_free_buffer_pages
	movq	%r15, %rdi
	callq	_bio_put
	movq	___GFP_DIRECT_RECLAIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	%edi, %r12d
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_1
LBB0_10:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_11:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_dm_crypt_integrity_io_alloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_crypt_free_buffer_pages
	movq	%r15, %rdi
	callq	_bio_put
LBB0_13:
	xorl	%r15d, %r15d
LBB0_14:
	movq	___GFP_DIRECT_RECLAIM@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movl	%r12d, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_16:
	movq	%r15, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	___GFP_HIGHMEM,4,2              ## @__GFP_HIGHMEM
	.comm	___GFP_DIRECT_RECLAIM,4,2       ## @__GFP_DIRECT_RECLAIM
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.no_dead_strip	_crypt_alloc_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crypt_alloc_buffer
_crypt_alloc_buffer:                    ; @crypt_alloc_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x1
	mov	x21, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x28, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	add	w8, w1, w8
Lloh2:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
	sub	w8, w8, #1
Lloh4:
	ldr	w9, [x9]
	lsr	w8, w8, w9
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, ___GFP_HIGHMEM@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___GFP_HIGHMEM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w20, w9, w8
	add	x19, x23, #8
	add	x26, x23, #4
Lloh11:
	adrp	x8, ___GFP_DIRECT_RECLAIM@GOTPAGE
Lloh12:
	ldr	x8, [x8, ___GFP_DIRECT_RECLAIM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x24, _GFP_NOIO@GOTPAGE
Lloh15:
	ldr	x24, [x24, _GFP_NOIO@GOTPAGEOFF]
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	str	w1, [sp, #24]                   ; 4-byte Folded Spill
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	and	w0, w8, w20
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x23
	bl	_mutex_lock
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x25, x24
	ldr	w0, [x24]
	ldr	w27, [sp, #28]                  ; 4-byte Folded Reload
	mov	x1, x27
	mov	x2, x19
	bl	_bio_alloc_bioset
	mov	x24, x0
	cbz	x0, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_clone_init
	cbz	w27, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x19, x23
	mov	x23, x27
LBB0_6:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x26
	mov	x1, x20
	bl	_mempool_alloc
	cbz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x1, x0
	ldr	w8, [x28]
	cmp	w22, w8
	csel	w27, w22, w8, lo
	mov	x0, x24
	mov	x2, x27
	mov	w3, #0
	bl	_bio_add_page
	sub	w22, w22, w27
	subs	w23, w23, #1
	b.ne	LBB0_6
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x19
	mov	x0, x19
	mov	x1, x24
	bl	_crypt_free_buffer_pages
	mov	x0, x24
	bl	_bio_put
Lloh16:
	adrp	x8, ___GFP_DIRECT_RECLAIM@GOTPAGE
Lloh17:
	ldr	x8, [x8, ___GFP_DIRECT_RECLAIM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	orr	w20, w8, w20
	ldr	w22, [sp, #24]                  ; 4-byte Folded Reload
	ldr	x19, [sp, #16]                  ; 8-byte Folded Reload
	mov	x24, x25
	b	LBB0_1
LBB0_9:
	mov	x23, x19
LBB0_10:
	mov	x0, x21
	mov	x1, x24
	bl	_dm_crypt_integrity_io_alloc
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x23
	mov	x1, x24
	bl	_crypt_free_buffer_pages
	mov	x0, x24
	bl	_bio_put
	mov	x24, #0
LBB0_12:
Lloh19:
	adrp	x8, ___GFP_DIRECT_RECLAIM@GOTPAGE
Lloh20:
	ldr	x8, [x8, ___GFP_DIRECT_RECLAIM@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w0, w8, w20
	bl	_unlikely
	cbz	x0, LBB0_14
; %bb.13:
	mov	x0, x23
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	___GFP_HIGHMEM,4,2              ; @__GFP_HIGHMEM
	.comm	___GFP_DIRECT_RECLAIM,4,2       ; @__GFP_DIRECT_RECLAIM
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.no_dead_strip	_crypt_alloc_buffer
.subsections_via_symbols
