	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sti_hda_set_mode
_sti_hda_set_mode:                      ## @sti_hda_set_mode
	.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
	movq	%rsi, %r14
	movq	(%rdi), %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	leaq	8(%rbx), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	8(%rbx), %edi
	leaq	-32(%rbp), %rsi
	callq	_hda_get_mode_idx
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_hda_supported_modes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-32(%rbp), %rcx
	movl	(%rax,%rcx,4), %eax
	cmpl	$128, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_1
## %bb.5:
	movl	$4000, %r15d                    ## imm = 0xFA0
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_3:
	movl	$2000, %r15d                    ## imm = 0x7D0
LBB0_6:
	imull	(%r14), %r15d
	movl	4(%rbx), %edi
	movl	%r15d, %esi
	callq	_clk_set_rate
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_8:
	movl	(%rbx), %edi
	imull	$1000, (%r14), %esi             ## imm = 0x3E8
	callq	_clk_set_rate
	testl	%eax, %eax
	jns	LBB0_10
## %bb.9:
	imull	$1000, (%r14), %esi             ## imm = 0x3E8
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"Undefined mode\n"

	.comm	_hda_supported_modes,8,3        ## @hda_supported_modes
L_.str.2:                               ## @.str.2
	.asciz	"Cannot set rate (%dHz) for hda_hddac clk\n"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot set rate (%dHz) for hda_pix clk\n"

	.no_dead_strip	_sti_hda_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sti_hda_set_mode
_sti_hda_set_mode:                      ; @sti_hda_set_mode
	.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	x19, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	add	x0, x21, #8
	mov	x1, x19
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [x21, #8]
	add	x1, sp, #8
	bl	_hda_get_mode_idx
	cbz	w0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _hda_supported_modes@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hda_supported_modes@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.3:
	mov	w8, #4000
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_5:
	mov	w8, #2000
LBB0_6:
	ldr	w9, [x19]
	mul	w20, w9, w8
	ldr	w0, [x21, #4]
	mov	x1, x20
	bl	_clk_set_rate
	tbz	w0, #31, LBB0_8
; %bb.7:
	str	x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
LBB0_8:
	ldr	w0, [x21]
	ldr	w8, [x19]
	mov	w20, #1000
	mul	w1, w8, w20
	bl	_clk_set_rate
	tbz	w0, #31, LBB0_11
; %bb.9:
	ldr	w8, [x19]
	mul	w8, w8, w20
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_10:
	bl	_DRM_ERROR
LBB0_11:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"Undefined mode\n"

	.comm	_hda_supported_modes,8,3        ; @hda_supported_modes
l_.str.2:                               ; @.str.2
	.asciz	"Cannot set rate (%dHz) for hda_hddac clk\n"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot set rate (%dHz) for hda_pix clk\n"

	.no_dead_strip	_sti_hda_set_mode
.subsections_via_symbols
