	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_dma_alloc_chan_resources
_bcm2835_dma_alloc_chan_resources:      ## @bcm2835_dma_alloc_chan_resources
	.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
	callq	_to_bcm2835_dma_chan
	movq	%rax, %rbx
	movq	16(%rax), %rax
	movq	(%rax), %r14
	movl	12(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_dev_name
	xorl	%r15d, %r15d
	movl	%eax, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	movl	$32, %ecx
	xorl	%r8d, %r8d
	callq	_dma_pool_create
	movl	%eax, 8(%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	movl	4(%rbx), %edi
	movq	_bcm2835_dma_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %r8
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_request_irq                    ## TAILCALL
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Allocating DMA channel %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"unable to allocate descriptor pool\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_bcm2835_dma_callback,4,2       ## @bcm2835_dma_callback
L_.str.2:                               ## @.str.2
	.asciz	"DMA IRQ"

	.no_dead_strip	_bcm2835_dma_alloc_chan_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_dma_alloc_chan_resources
_bcm2835_dma_alloc_chan_resources:      ; @bcm2835_dma_alloc_chan_resources
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_to_bcm2835_dma_chan
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x20, [x8]
	ldr	w2, [x0, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x20
	bl	_dev_name
	mov	x1, x20
	mov	w2, #4
	mov	w3, #32
	mov	w4, #0
	bl	_dma_pool_create
	str	w0, [x19, #8]
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _bcm2835_dma_callback@GOTPAGE
Lloh3:
	ldr	x8, [x8, _bcm2835_dma_callback@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x3, l_.str.2@PAGE
Lloh6:
	add	x3, x3, l_.str.2@PAGEOFF
	ldp	w2, w0, [x19]
	mov	x4, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_request_irq
LBB0_2:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Allocating DMA channel %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"unable to allocate descriptor pool\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_bcm2835_dma_callback,4,2       ; @bcm2835_dma_callback
l_.str.2:                               ; @.str.2
	.asciz	"DMA IRQ"

	.no_dead_strip	_bcm2835_dma_alloc_chan_resources
.subsections_via_symbols
