	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_mbox_init_dma
_bcm2835_mbox_init_dma:                 ## @bcm2835_mbox_init_dma
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r15
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movl	%edi, %r14d
	callq	_bus_get_dma_tag
	movq	_BUS_SPACE_MAXADDR_32BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_BUS_SPACE_MAXADDR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	movq	%r13, 56(%rsp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%rsp)
	movq	%rbx, 24(%rsp)
	movq	%rbx, 8(%rsp)
	movl	$0, 32(%rsp)
	movl	$1, 16(%rsp)
	movq	$0, (%rsp)
	movl	%eax, %edi
	movl	$16, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_bus_dma_tag_create
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movl	(%r13), %edi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_bus_dmamem_alloc
	movl	(%r13), %edi
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	callq	_bus_dma_tag_destroy
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movl	(%r15), %esi
	movq	-48(%rbp), %rdx
	movq	_bcm2835_mbox_dma_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$0, (%rsp)
	movq	%rbx, %rcx
	movq	%r12, %r9
	callq	_bus_dmamap_load
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	(%r13), %edi
	movq	-48(%rbp), %rsi
	movl	(%r15), %edx
	callq	_bus_dmamem_free
	movl	(%r13), %edi
	callq	_bus_dma_tag_destroy
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movl	%r14d, %edi
	callq	_device_printf
	xorl	%eax, %eax
LBB0_8:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-48(%rbp), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ## @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ## @BUS_SPACE_MAXADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't create DMA tag\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't allocate dmamem\n"

	.comm	_bcm2835_mbox_dma_cb,4,2        ## @bcm2835_mbox_dma_cb
L_.str.2:                               ## @.str.2
	.asciz	"can't load DMA map\n"

	.no_dead_strip	_bcm2835_mbox_init_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_mbox_init_dma
_bcm2835_mbox_init_dma:                 ; @bcm2835_mbox_init_dma
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x4
	mov	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	bl	_bus_get_dma_tag
Lloh0:
	adrp	x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR_32BIT@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _BUS_SPACE_MAXADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUS_SPACE_MAXADDR@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	stp	xzr, xzr, [sp, #24]
	str	x20, [sp, #40]
	str	wzr, [sp, #16]
	mov	w8, #1
	str	x23, [sp, #8]
	str	w8, [sp]
	mov	w1, #16
	mov	w2, #0
	mov	x5, #0
	mov	x6, #0
	mov	x7, x23
	bl	_bus_dma_tag_create
	cbz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	ldr	w0, [x20]
	add	x1, sp, #56
	mov	w2, #0
	mov	x3, x21
	bl	_bus_dmamem_alloc
	mov	x8, x0
	ldr	w0, [x20]
	cbz	w8, LBB0_4
; %bb.3:
	bl	_bus_dma_tag_destroy
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w1, [x21]
	ldr	x2, [sp, #56]
Lloh10:
	adrp	x8, _bcm2835_mbox_dma_cb@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bcm2835_mbox_dma_cb@GOTPAGEOFF]
Lloh12:
	ldr	w4, [x8]
	mov	x3, x23
	mov	x5, x22
	mov	w6, #0
	bl	_bus_dmamap_load
	cbz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x20]
	ldr	x1, [sp, #56]
	ldr	w2, [x21]
	bl	_bus_dmamem_free
	ldr	w0, [x20]
	bl	_bus_dma_tag_destroy
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_device_printf
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	ldr	x0, [sp, #56]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_BUS_SPACE_MAXADDR_32BIT,4,2    ; @BUS_SPACE_MAXADDR_32BIT
	.comm	_BUS_SPACE_MAXADDR,4,2          ; @BUS_SPACE_MAXADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't create DMA tag\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't allocate dmamem\n"

	.comm	_bcm2835_mbox_dma_cb,4,2        ; @bcm2835_mbox_dma_cb
l_.str.2:                               ; @.str.2
	.asciz	"can't load DMA map\n"

	.no_dead_strip	_bcm2835_mbox_init_dma
.subsections_via_symbols
