	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv6110x_set_mode
_stv6110x_set_mode:                     ## @stv6110x_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	(%rdi), %rbx
	cmpl	$129, %esi
	je	LBB0_1
## %bb.2:
	cmpl	$128, %esi
	jne	LBB0_5
## %bb.3:
	movl	$1, %r14d
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
LBB0_4:
	movq	(%rbx), %rax
	movq	_STV6110x_CTRL1@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_CTRL1_SYN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_STV6110x_SETFIELD
	movq	(%rbx), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_CTRL1_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_STV6110x_SETFIELD
	movq	(%rbx), %rax
	movq	(%r15), %rcx
	movl	(%rax,%rcx,4), %edi
	movq	_CTRL1_LPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_STV6110x_SETFIELD
LBB0_5:
	movq	_STV6110x_CTRL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	(%rbx), %rax
	movl	(%rax,%rsi,4), %edx
	movq	%rbx, %rdi
	callq	_stv6110x_write_reg
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_7
## %bb.6:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STV6110x_CTRL1,8,3             ## @STV6110x_CTRL1
	.comm	_CTRL1_SYN,4,2                  ## @CTRL1_SYN
	.comm	_CTRL1_RX,4,2                   ## @CTRL1_RX
	.comm	_CTRL1_LPT,4,2                  ## @CTRL1_LPT
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O Error"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_stv6110x_set_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv6110x_set_mode
_stv6110x_set_mode:                     ; @stv6110x_set_mode
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _STV6110x_CTRL1@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STV6110x_CTRL1@GOTPAGEOFF]
	cmp	w1, #129
	b.eq	LBB0_3
; %bb.1:
	cmp	w1, #128
	b.ne	LBB0_5
; %bb.2:
	mov	w20, #1
	b	LBB0_4
LBB0_3:
	mov	w20, #0
LBB0_4:
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
Lloh2:
	adrp	x8, _CTRL1_SYN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CTRL1_SYN@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_STV6110x_SETFIELD
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
Lloh5:
	adrp	x8, _CTRL1_RX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTRL1_RX@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_STV6110x_SETFIELD
	ldr	x8, [x19]
	ldr	x9, [x21]
	ldr	w0, [x8, x9, lsl #2]
Lloh8:
	adrp	x8, _CTRL1_LPT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CTRL1_LPT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_STV6110x_SETFIELD
LBB0_5:
	ldr	x1, [x21]
	ldr	x8, [x19]
	ldr	w2, [x8, x1, lsl #2]
	mov	x0, x19
	bl	_stv6110x_write_reg
	tbnz	w0, #31, LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_STV6110x_CTRL1,8,3             ; @STV6110x_CTRL1
	.comm	_CTRL1_SYN,4,2                  ; @CTRL1_SYN
	.comm	_CTRL1_RX,4,2                   ; @CTRL1_RX
	.comm	_CTRL1_LPT,4,2                  ; @CTRL1_LPT
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O Error"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_stv6110x_set_mode
.subsections_via_symbols
