	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_alloc                       ## -- Begin function hw_alloc
	.p2align	4, 0x90
_hw_alloc:                              ## @hw_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	_DMA_ATTR_WRITE_COMBINE@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movl	(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-44(%rbp), %rdx
	movq	%r13, %r8
	callq	_dma_alloc_attrs
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, 32(%rbx)
	movl	-44(%rbp), %ecx
	leaq	16(%rbx), %r9
	movl	%ecx, 16(%rbx)
	movq	%rax, 24(%rbx)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rbx)
	movq	%r13, 8(%rbx)
	movl	(%r14), %edi
	movl	(%r12), %edx
	movq	%rcx, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %ecx
	movq	%rax, %r8
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_3
LBB0_1:
	movl	(%r14), %edi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, %r8d
	callq	_dev_err
	incl	4(%r12)
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,8,3     ## @DMA_ATTR_WRITE_COMBINE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s hw_alloc:dma_alloc_coherent failed for %s (size=%d)\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%s allocate %d bytes of HW memory @(virt=0x%p, phy=0x%pad): %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hw_alloc                       ; -- Begin function hw_alloc
	.p2align	2
_hw_alloc:                              ; @hw_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_ATTR_WRITE_COMBINE@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w0, [x24]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x2, sp, #12
	mov	x4, x23
	bl	_dma_alloc_attrs
	cbz	x0, LBB0_2
; %bb.1:
	mov	x4, x0
	ldr	w8, [sp, #12]
	mov	x5, x22
	str	w8, [x5, #16]!
	str	w20, [x22, #32]
	str	x0, [x22, #24]
	stp	x19, x23, [x22]
	ldr	w0, [x24]
	ldr	w2, [x21]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x20
	mov	x6, x19
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	w0, [x24]
	ldr	w2, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x19
	mov	x4, x20
	bl	_dev_err
	ldr	w8, [x21, #4]
	add	w8, w8, #1
	str	w8, [x21, #4]
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_ATTR_WRITE_COMBINE,8,3     ; @DMA_ATTR_WRITE_COMBINE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s hw_alloc:dma_alloc_coherent failed for %s (size=%d)\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%s allocate %d bytes of HW memory @(virt=0x%p, phy=0x%pad): %s\n"

.subsections_via_symbols
