	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fw_realloc_buffer
_fw_realloc_buffer:                     ## @fw_realloc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %eax
	movq	%rdi, %rbx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_ALIGN
	movl	%eax, %r14d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %r14d
	movl	(%rbx), %esi
	cmpl	%r14d, %esi
	jge	LBB0_3
## %bb.1:
	addl	%esi, %esi
	movl	%r14d, %edi
	callq	_max
	movl	%eax, %r15d
	leal	(,%r15,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r12
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	shll	$3, %edx
	movq	%rax, %rdi
	callq	_memcpy
	movslq	(%rbx), %rax
	leaq	(%r12,%rax,8), %rdi
	movl	%r15d, %edx
	subl	%eax, %edx
	shll	$3, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	8(%rbx), %rdi
	callq	_kfree
	movq	%r12, 8(%rbx)
	movl	%r15d, (%rbx)
LBB0_3:
	xorl	%r15d, %r15d
	cmpl	%r14d, 4(%rbx)
	jge	LBB0_8
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movq	___GFP_HIGHMEM@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	orl	(%r12), %edi
	callq	_alloc_page
	movq	8(%rbx), %rdx
	movslq	4(%rbx), %rcx
	movq	%rax, (%rdx,%rcx,8)
	movq	8(%rbx), %rax
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%ecx
	movl	%ecx, 4(%rbx)
	cmpl	%r14d, %ecx
	jl	LBB0_5
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	callq	_fw_load_abort
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	___GFP_HIGHMEM,4,2              ## @__GFP_HIGHMEM
	.no_dead_strip	_fw_realloc_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fw_realloc_buffer
_fw_realloc_buffer:                     ; @fw_realloc_buffer
	.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	x8, x1
	mov	x19, x0
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_ALIGN
Lloh3:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	asr	w20, w0, w8
	ldr	w8, [x19]
	cmp	w8, w20
	b.ge	LBB0_3
; %bb.1:
	lsl	w1, w8, #1
	mov	x0, x20
	bl	_max
	mov	x21, x0
	lsl	w0, w0, #3
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	ldr	x1, [x19, #8]
	ldr	w8, [x19]
	lsl	w2, w8, #3
	bl	_memcpy
	ldrsw	x8, [x19]
	add	x0, x22, x8, lsl #3
	sub	w8, w21, w8
	lsl	w2, w8, #3
	mov	w1, #0
	bl	_memset
	ldr	x0, [x19, #8]
	bl	_kfree
	str	x22, [x19, #8]
	str	w21, [x19]
LBB0_3:
	ldr	w8, [x19, #4]
	cmp	w8, w20
	b.ge	LBB0_7
; %bb.4:
Lloh9:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh10:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
Lloh11:
	adrp	x22, ___GFP_HIGHMEM@GOTPAGE
Lloh12:
	ldr	x22, [x22, ___GFP_HIGHMEM@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w0, w9, w8
	bl	_alloc_page
	ldr	x9, [x19, #8]
	ldrsw	x8, [x19, #4]
	lsl	x10, x8, #3
	str	x0, [x9, x10]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x10]
	cbz	x9, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w8, #1
	str	w8, [x19, #4]
	cmp	w8, w20
	b.lt	LBB0_5
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_fw_load_abort
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	___GFP_HIGHMEM,4,2              ; @__GFP_HIGHMEM
	.no_dead_strip	_fw_realloc_buffer
.subsections_via_symbols
