	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_professional_spdif
_set_professional_spdif:                ## @set_professional_spdif
	.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	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_le32_to_cpu
	movq	_GML_SPDIF_FORMAT_CLEAR_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_GML_SPDIF_TWO_CHANNEL@GOTPCREL(%rip), %rcx
	movq	_GML_SPDIF_24_BIT@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_GML_SPDIF_COPY_PERMIT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testb	%r14b, %r14b
	je	LBB0_6
## %bb.1:
	movq	_GML_SPDIF_PRO_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %ecx
	cmpl	$48000, %ecx                    ## imm = 0xBB80
	je	LBB0_7
## %bb.2:
	cmpl	$44100, %ecx                    ## imm = 0xAC44
	jne	LBB0_3
## %bb.5:
	movq	_GML_SPDIF_SAMPLE_RATE0@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
LBB0_6:
	movl	(%r15), %ecx
	cmpl	$48000, %ecx                    ## imm = 0xBB80
	je	LBB0_7
LBB0_3:
	cmpl	$32000, %ecx                    ## imm = 0x7D00
	jne	LBB0_9
## %bb.4:
	movq	_GML_SPDIF_SAMPLE_RATE0@GOTPCREL(%rip), %rcx
	movq	_GML_SPDIF_SAMPLE_RATE1@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	_GML_SPDIF_SAMPLE_RATE1@GOTPCREL(%rip), %rcx
LBB0_8:
	orl	(%rcx), %eax
LBB0_9:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_write_control_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:
	testb	%r14b, %r14b
	movb	%r14b, 4(%r15)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdi
	cmoveq	%rax, %rdi
	callq	_DE_ACT
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GML_SPDIF_FORMAT_CLEAR_MASK,4,2 ## @GML_SPDIF_FORMAT_CLEAR_MASK
	.comm	_GML_SPDIF_TWO_CHANNEL,4,2      ## @GML_SPDIF_TWO_CHANNEL
	.comm	_GML_SPDIF_24_BIT,4,2           ## @GML_SPDIF_24_BIT
	.comm	_GML_SPDIF_COPY_PERMIT,4,2      ## @GML_SPDIF_COPY_PERMIT
	.comm	_GML_SPDIF_PRO_MODE,4,2         ## @GML_SPDIF_PRO_MODE
	.comm	_GML_SPDIF_SAMPLE_RATE0,4,2     ## @GML_SPDIF_SAMPLE_RATE0
	.comm	_GML_SPDIF_SAMPLE_RATE1,4,2     ## @GML_SPDIF_SAMPLE_RATE1
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Professional"

L_.str.2:                               ## @.str.2
	.asciz	"Consumer"

	.no_dead_strip	_set_professional_spdif
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_professional_spdif
_set_professional_spdif:                ; @set_professional_spdif
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_le32_to_cpu
Lloh0:
	adrp	x8, _GML_SPDIF_FORMAT_CLEAR_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GML_SPDIF_FORMAT_CLEAR_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh3:
	adrp	x9, _GML_SPDIF_TWO_CHANNEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GML_SPDIF_TWO_CHANNEL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _GML_SPDIF_24_BIT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GML_SPDIF_24_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, _GML_SPDIF_COPY_PERMIT@GOTPAGE
Lloh10:
	ldr	x11, [x11, _GML_SPDIF_COPY_PERMIT@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w1, w8, w11
	cbz	w19, LBB0_4
; %bb.1:
Lloh12:
	adrp	x8, _GML_SPDIF_PRO_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GML_SPDIF_PRO_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w1, w8, w1
	ldr	w8, [x20]
	mov	w9, #48000
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.2:
	mov	w9, #44100
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.3:
Lloh15:
	adrp	x8, _GML_SPDIF_SAMPLE_RATE0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GML_SPDIF_SAMPLE_RATE0@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	ldr	w8, [x20]
	mov	w9, #48000
	cmp	w8, w9
	b.eq	LBB0_7
LBB0_5:
	mov	w9, #32000
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.6:
Lloh17:
	adrp	x8, _GML_SPDIF_SAMPLE_RATE0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _GML_SPDIF_SAMPLE_RATE0@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _GML_SPDIF_SAMPLE_RATE1@GOTPAGE
Lloh21:
	ldr	x9, [x9, _GML_SPDIF_SAMPLE_RATE1@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w8, w1
	orr	w1, w8, w9
	b	LBB0_9
LBB0_7:
Lloh23:
	adrp	x8, _GML_SPDIF_SAMPLE_RATE1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GML_SPDIF_SAMPLE_RATE1@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	orr	w1, w8, w1
LBB0_9:
Lloh25:
	adrp	x8, _FALSE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_write_control_reg
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.10:
	strb	w19, [x20, #4]
Lloh28:
	adrp	x8, l_.str.1@PAGE
Lloh29:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh30:
	adrp	x9, l_.str.2@PAGE
Lloh31:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x0, x9, x8, eq
	bl	_DE_ACT
LBB0_11:
	mov	x0, x21
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_GML_SPDIF_FORMAT_CLEAR_MASK,4,2 ; @GML_SPDIF_FORMAT_CLEAR_MASK
	.comm	_GML_SPDIF_TWO_CHANNEL,4,2      ; @GML_SPDIF_TWO_CHANNEL
	.comm	_GML_SPDIF_24_BIT,4,2           ; @GML_SPDIF_24_BIT
	.comm	_GML_SPDIF_COPY_PERMIT,4,2      ; @GML_SPDIF_COPY_PERMIT
	.comm	_GML_SPDIF_PRO_MODE,4,2         ; @GML_SPDIF_PRO_MODE
	.comm	_GML_SPDIF_SAMPLE_RATE0,4,2     ; @GML_SPDIF_SAMPLE_RATE0
	.comm	_GML_SPDIF_SAMPLE_RATE1,4,2     ; @GML_SPDIF_SAMPLE_RATE1
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Professional"

l_.str.2:                               ; @.str.2
	.asciz	"Consumer"

	.no_dead_strip	_set_professional_spdif
.subsections_via_symbols
