	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm2835_mbox_property          ## -- Begin function bcm2835_mbox_property
	.p2align	4, 0x90
_bcm2835_mbox_property:                 ## @bcm2835_mbox_property
	.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	%rsi, %r12
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	callq	_devclass_find
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_devclass_get_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_device_get_softc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_sx_xlock
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-64(%rbp), %r8
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_bcm2835_mbox_init_dma
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movl	-44(%rbp), %edi
	movl	-48(%rbp), %esi
	movq	_BUS_DMASYNC_PREWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_dmamap_sync
	movq	_BCM2835_MBOX_CHAN_PROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-64(%rbp), %edx
	movq	%rbx, %rdi
	callq	_MBOX_WRITE
	movq	_BCM2835_MBOX_CHAN_PROP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-52(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_MBOX_READ
	movl	-44(%rbp), %edi
	movl	-48(%rbp), %esi
	movq	_BUS_DMASYNC_PREREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_bus_dmamap_sync
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movq	-64(%rbp), %rsi
	movl	-52(%rbp), %edx
	movq	%rbx, %rdi
	movq	%r15, %rcx
	movq	%r12, %r8
	callq	_bcm2835_mbox_err
	movl	%eax, %ebx
	movl	-44(%rbp), %edi
	movl	-48(%rbp), %esi
	callq	_bus_dmamap_unload
	movl	-44(%rbp), %edi
	movl	-48(%rbp), %edx
	movq	%r13, %rsi
	callq	_bus_dmamem_free
	movl	-44(%rbp), %edi
	callq	_bus_dma_tag_destroy
	jmp	LBB0_5
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_sx_xunlock
LBB0_6:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mbox"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ## @BUS_DMASYNC_PREWRITE
	.comm	_BCM2835_MBOX_CHAN_PROP,4,2     ## @BCM2835_MBOX_CHAN_PROP
	.comm	_BUS_DMASYNC_PREREAD,4,2        ## @BUS_DMASYNC_PREREAD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm2835_mbox_property          ; -- Begin function bcm2835_mbox_property
	.p2align	2
_bcm2835_mbox_property:                 ; @bcm2835_mbox_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_devclass_find
	mov	w1, #0
	bl	_devclass_get_device
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	bl	_device_get_softc
	mov	x19, x0
	bl	_sx_xlock
	add	x2, sp, #28
	add	x3, sp, #24
	add	x4, sp, #16
	mov	x0, x22
	mov	x1, x20
	bl	_bcm2835_mbox_init_dma
	cbz	x0, LBB0_4
; %bb.2:
	mov	x23, x0
	mov	x1, x21
	mov	x2, x20
	bl	_memcpy
	ldp	w1, w0, [sp, #24]
Lloh2:
	adrp	x8, _BUS_DMASYNC_PREWRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUS_DMASYNC_PREWRITE@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_bus_dmamap_sync
Lloh5:
	adrp	x24, _BCM2835_MBOX_CHAN_PROP@GOTPAGE
Lloh6:
	ldr	x24, [x24, _BCM2835_MBOX_CHAN_PROP@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w2, [sp, #16]
	mov	x0, x22
	bl	_MBOX_WRITE
	ldr	w1, [x24]
	add	x2, sp, #12
	mov	x0, x22
	bl	_MBOX_READ
	ldp	w1, w0, [sp, #24]
Lloh7:
	adrp	x8, _BUS_DMASYNC_PREREAD@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BUS_DMASYNC_PREREAD@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_bus_dmamap_sync
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_memcpy
	ldr	x1, [sp, #16]
	ldr	w2, [sp, #12]
	mov	x0, x22
	mov	x3, x21
	mov	x4, x20
	bl	_bcm2835_mbox_err
	mov	x20, x0
	ldp	w1, w0, [sp, #24]
	bl	_bus_dmamap_unload
	ldp	w2, w0, [sp, #24]
	mov	x1, x23
	bl	_bus_dmamem_free
	ldr	w0, [sp, #28]
	bl	_bus_dma_tag_destroy
	b	LBB0_5
LBB0_3:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_4:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
LBB0_5:
	mov	x0, x19
	bl	_sx_xunlock
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mbox"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BUS_DMASYNC_PREWRITE,4,2       ; @BUS_DMASYNC_PREWRITE
	.comm	_BCM2835_MBOX_CHAN_PROP,4,2     ; @BCM2835_MBOX_CHAN_PROP
	.comm	_BUS_DMASYNC_PREREAD,4,2        ; @BUS_DMASYNC_PREREAD
.subsections_via_symbols
