	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spdif_send_event_format_changed
_spdif_send_event_format_changed:       ## @spdif_send_event_format_changed
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r13
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movq	$0, -48(%rbp)
	movq	_MMAL_EVENT_FORMAT_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mmal_port_event_get
	movq	%rax, (%rbx)
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_1
## %bb.2:
	movq	-48(%rbp), %rdi
	callq	_mmal_event_format_changed_get
	movq	%rax, %r15
	movq	24(%r13), %rsi
	movq	(%rsi), %rax
	movq	_MMAL_ENCODING_PCM_SIGNED@GOTPCREL(%rip), %rcx
	movq	16(%r15), %rdi
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	%r14, %rsi
LBB0_4:
	callq	_mmal_format_copy
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movq	16(%r15), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	12(%r13), %xmm0                 ## xmm0 = mem[0],zero
	movd	8(%r13), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	pshufd	$64, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,0,1]
	pblendw	$3, %xmm1, %xmm0                ## xmm0 = xmm1[0,1],xmm0[2,3,4,5,6,7]
	movdqu	%xmm0, (%r15)
	movq	(%r13), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_mmal_port_event_send
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_LOG_ERROR
	movq	%rbx, %r12
LBB0_5:
	movq	(%r12), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EVENT_FORMAT_CHANGED,4,2  ## @MMAL_EVENT_FORMAT_CHANGED
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to get an event buffer"

	.comm	_MMAL_ENCODING_PCM_SIGNED,8,3   ## @MMAL_ENCODING_PCM_SIGNED
	.no_dead_strip	_spdif_send_event_format_changed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spdif_send_event_format_changed
_spdif_send_event_format_changed:       ; @spdif_send_event_format_changed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x2
	mov	x19, x1
	ldr	x8, [x0]
	ldr	x21, [x8]
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _MMAL_EVENT_FORMAT_CHANGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_EVENT_FORMAT_CHANGED@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mmal_port_event_get
	str	x0, [x21]
Lloh3:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_mmal_event_format_changed_get
	mov	x21, x0
	ldr	x1, [x19, #24]
	ldr	x8, [x1]
Lloh6:
	adrp	x9, _MMAL_ENCODING_PCM_SIGNED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMAL_ENCODING_PCM_SIGNED@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	x0, [x0, #16]
	cmp	x8, x9
	b.eq	LBB0_3
; %bb.2:
	mov	x1, x20
LBB0_3:
	bl	_mmal_format_copy
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	ldr	x9, [x21, #16]
	ldr	x9, [x9]
	str	w8, [x9]
	add	x8, x19, #16
	ldr	d0, [x19, #8]
	mov.s	v0[2], v0[1]
	ld1.s	{ v0 }[3], [x8]
	str	q0, [x21]
	ldr	x8, [x19]
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
	ldr	x1, [sp, #8]
	mov	x0, x19
	bl	_mmal_port_event_send
Lloh9:
	adrp	x21, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_ERROR
LBB0_5:
	ldr	x0, [x21]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EVENT_FORMAT_CHANGED,4,2  ; @MMAL_EVENT_FORMAT_CHANGED
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to get an event buffer"

	.comm	_MMAL_ENCODING_PCM_SIGNED,8,3   ; @MMAL_ENCODING_PCM_SIGNED
	.no_dead_strip	_spdif_send_event_format_changed
.subsections_via_symbols
