	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fore200e_chunk_alloc
_fore200e_chunk_alloc:                  ## @fore200e_chunk_alloc
	.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	%r8d, %r15d
	movl	%ecx, %ebx
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rsi, %r13
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	cmpl	$5, %ecx
	cmovbl	%r14d, %ebx
	leal	(%rbx,%rdx), %edi
	movl	%edi, (%rsi)
	movl	%edx, 4(%rsi)
	movl	%r8d, 8(%rsi)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, 32(%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	movl	%ebx, %esi
	callq	_FORE200E_ALIGN
	movq	%rax, %rcx
	movq	32(%r13), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_3:
	xorl	%ecx, %ecx
LBB0_5:
	leaq	(%rax,%rcx,4), %rsi
	movq	%rsi, 16(%r13)
	movq	(%r12), %rax
	movl	4(%r13), %edx
	movq	%r12, %rdi
	movl	%r15d, %ecx
	callq	*(%rax)
	movl	%eax, 24(%r13)
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_fore200e_chunk_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fore200e_chunk_alloc
_fore200e_chunk_alloc:                  ; @fore200e_chunk_alloc
	.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	x20, x4
	mov	x19, x1
	mov	x21, x0
	cmp	w3, #5
	csel	w22, wzr, w3, lo
	add	w0, w22, w2
	stp	w0, w2, [x1]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	str	w4, [x1, #8]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_kzalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_3
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x1, x22
	bl	_FORE200E_ALIGN
	mov	x8, x0
	ldr	x0, [x19, #32]
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	x8, #0
LBB0_5:
	add	x1, x0, x8, lsl #2
	str	x1, [x19, #16]
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x21
	mov	x3, x20
	blr	x8
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #24]
LBB0_6:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_fore200e_chunk_alloc
.subsections_via_symbols
