	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_audio_attach
_bcm2835_audio_attach:                  ## @bcm2835_audio_attach
	.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
	movl	%edi, %r14d
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$40, %edi
	callq	_malloc
	movq	%rax, %rbx
	movl	%r14d, 32(%rax)
	movq	_VCHIQ_AUDIO_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	leaq	24(%rbx), %r15
	movl	%r14d, %edi
	callq	_device_get_nameunit
	movq	_MTX_DEF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_mtx_init
	leaq	20(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_cv_init
	movq	_VCHIQ_SERVICE_HANDLE_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_bcm2835_audio_delayed_init@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, (%rbx)
	movq	%rbx, %rdi
	callq	_config_intrhook_establish
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_VCHIQ_AUDIO_BUFFER_SIZE,4,2    ## @VCHIQ_AUDIO_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bcm_audio_lock"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
L_.str.1:                               ## @.str.1
	.asciz	"worker_cv"

	.comm	_VCHIQ_SERVICE_HANDLE_INVALID,4,2 ## @VCHIQ_SERVICE_HANDLE_INVALID
	.comm	_bcm2835_audio_delayed_init,4,2 ## @bcm2835_audio_delayed_init
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_bcm2835_audio_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm2835_audio_attach
_bcm2835_audio_attach:                  ; @bcm2835_audio_attach
	.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
Lloh0:
	adrp	x8, _M_DEVBUF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_DEVBUF@GOTPAGEOFF]
Lloh2:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
Lloh6:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #40
	bl	_malloc
	mov	x20, x0
Lloh9:
	adrp	x8, _VCHIQ_AUDIO_BUFFER_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VCHIQ_AUDIO_BUFFER_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w8, w19, [x0, #28]
	add	x21, x0, #24
	mov	x0, x19
	bl	_device_get_nameunit
	mov	x1, x0
Lloh12:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_mtx_init
	add	x0, x20, #20
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_cv_init
Lloh19:
	adrp	x8, _VCHIQ_SERVICE_HANDLE_INVALID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VCHIQ_SERVICE_HANDLE_INVALID@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x20, #16]
Lloh22:
	adrp	x8, _bcm2835_audio_delayed_init@GOTPAGE
Lloh23:
	ldr	x8, [x8, _bcm2835_audio_delayed_init@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	x20, [x20]
	mov	x0, x20
	bl	_config_intrhook_establish
Lloh25:
	adrp	x8, _ENXIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, wzr, w8, eq
	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 AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_VCHIQ_AUDIO_BUFFER_SIZE,4,2    ; @VCHIQ_AUDIO_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bcm_audio_lock"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
l_.str.1:                               ; @.str.1
	.asciz	"worker_cv"

	.comm	_VCHIQ_SERVICE_HANDLE_INVALID,4,2 ; @VCHIQ_SERVICE_HANDLE_INVALID
	.comm	_bcm2835_audio_delayed_init,4,2 ; @bcm2835_audio_delayed_init
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_bcm2835_audio_attach
.subsections_via_symbols
