	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_alloc_buffers
_sky2_alloc_buffers:                    ## @sky2_alloc_buffers
	.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, %rbx
	movq	56(%rdi), %r14
	movl	(%r14), %edi
	movl	(%rbx), %esi
	shll	$2, %esi
	leaq	48(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%r14), %edi
	movq	_RX_LE_BYTES@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	24(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movl	4(%rbx), %edi
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_5
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RX_LE_BYTES,4,2                ## @RX_LE_BYTES
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sky2_alloc_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sky2_alloc_buffers
_sky2_alloc_buffers:                    ; @sky2_alloc_buffers
	.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	x21, [x0, #56]
	ldr	w0, [x21]
	ldr	w8, [x19]
	lsl	w1, w8, #2
	add	x2, x19, #48
	bl	_pci_alloc_consistent
	str	x0, [x19, #40]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
Lloh2:
	adrp	x21, _RX_LE_BYTES@GOTPAGE
Lloh3:
	ldr	x21, [x21, _RX_LE_BYTES@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, x19, #24
	bl	_pci_alloc_consistent
	str	x0, [x19, #16]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x21]
	mov	w1, #0
	bl	_memset
	ldr	w0, [x19, #4]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #8]
	cbnz	x8, LBB0_5
LBB0_4:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RX_LE_BYTES,4,2                ; @RX_LE_BYTES
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sky2_alloc_buffers
.subsections_via_symbols
