	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wsm_buf_reserve
_wsm_buf_reserve:                       ## @wsm_buf_reserve
	.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
	movq	%rdi, %r15
	movq	16(%rdi), %rbx
	subq	(%rdi), %rbx
	sarq	$2, %rbx
	leaq	(%rsi,%rbx), %rdi
	movq	_FWLOAD_BLOCK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_round_up
	movq	%rax, %r14
	movq	(%r15), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r14, %rsi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, (%r15)
	leaq	(%rax,%rbx,4), %rcx
	movq	%rcx, 16(%r15)
	leaq	(%rax,%r14,4), %rax
	movq	%rax, 8(%r15)
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	callq	_wsm_buf_deinit
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FWLOAD_BLOCK_SIZE,4,2          ## @FWLOAD_BLOCK_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_wsm_buf_reserve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wsm_buf_reserve
_wsm_buf_reserve:                       ; @wsm_buf_reserve
	.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, x0
	ldr	x8, [x0, #16]
	ldr	x9, [x0]
	sub	x8, x8, x9
	asr	x21, x8, #2
	add	x0, x21, x1
Lloh0:
	adrp	x8, _FWLOAD_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FWLOAD_BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_round_up
	mov	x20, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x1, x20
	bl	_krealloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x8, x0
	mov	w0, #0
	add	x10, x8, x21, lsl #2
	add	x9, x8, x20, lsl #2
	str	x8, [x19]
	stp	x9, x10, [x19, #8]
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_wsm_buf_deinit
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_FWLOAD_BLOCK_SIZE,4,2          ; @FWLOAD_BLOCK_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wsm_buf_reserve
.subsections_via_symbols
