	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_set_pls
_stv090x_set_pls:                       ## @stv090x_set_pls
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_FE_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_PLROOT0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bl, %edx
	movq	%r14, %rdi
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_3
## %bb.1:
	movq	_PLROOT1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%bh, %edx
	movq	%r14, %rdi
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_3
## %bb.2:
	movq	_PLROOT2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	sarl	$16, %ebx
	orl	$4, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_STV090x_WRITE_DEMOD
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_4
LBB0_3:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	$-1, %eax
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FE_DEBUG,4,2                   ## @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Gold PLS code %d"

	.comm	_PLROOT0,4,2                    ## @PLROOT0
	.comm	_PLROOT1,4,2                    ## @PLROOT1
	.comm	_PLROOT2,4,2                    ## @PLROOT2
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_set_pls
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_set_pls
_stv090x_set_pls:                       ; @stv090x_set_pls
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _FE_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FE_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh5:
	adrp	x8, _PLROOT0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PLROOT0@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	and	w2, w20, #0xff
	mov	x0, x19
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_4
; %bb.1:
Lloh8:
	adrp	x8, _PLROOT1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PLROOT1@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ubfx	w2, w20, #8, #8
	mov	x0, x19
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _PLROOT2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PLROOT2@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	asr	w8, w20, #16
	orr	w2, w8, #0x4
	mov	x0, x19
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FE_DEBUG,4,2                   ; @FE_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Gold PLS code %d"

	.comm	_PLROOT0,4,2                    ; @PLROOT0
	.comm	_PLROOT1,4,2                    ; @PLROOT1
	.comm	_PLROOT2,4,2                    ; @PLROOT2
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_set_pls
.subsections_via_symbols
