	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stv090x_send_diseqc_msg
_stv090x_send_diseqc_msg:               ## @stv090x_send_diseqc_msg
	.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	%rsi, %r14
	movq	(%rdi), %r12
	movq	_DISTXCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r15d
	movq	_DISTX_MODE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	xorl	%ecx, %ecx
	cmpq	$0, (%rax)
	setne	%cl
	leal	(%rcx,%rcx), %edx
	addl	$2, %edx
	movl	%r15d, %edi
	callq	_STV090x_SETFIELD_Px
	movq	_DISEQC_RESET_FIELD@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	%r15d, %edi
	movl	$1, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	movl	(%r13), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_STV090x_SETFIELD_Px
	movq	_DISTXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_9
## %bb.2:
	movq	_DIS_PRECHARGE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movl	$1, %edx
	callq	_STV090x_SETFIELD_Px
	movq	_DISTXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_9
## %bb.3:
	cmpl	$0, (%r14)
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	movq	_DISTXSTATUS@GOTPCREL(%rip), %r13
	movq	_FIFO_FULL_FIELD@GOTPCREL(%rip), %r15
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testb	$1, %al
	jne	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	(%r15), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	testl	%eax, %eax
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_DISTXDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r12, %rdi
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	(%r14), %rcx
	movb	$1, %al
	cmpq	%rcx, %rbx
	jl	LBB0_6
LBB0_10:
	movq	_DISTXCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	%eax, %r14d
	movq	_DIS_PRECHARGE_FIELD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_STV090x_SETFIELD_Px
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_STV090x_WRITE_DEMOD
	testq	%rax, %rax
	js	LBB0_9
## %bb.11:
	movq	_DISTXSTATUS@GOTPCREL(%rip), %r14
	movq	_TX_IDLE_FIELD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r12, %rdi
	callq	_STV090x_READ_DEMOD
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_STV090x_GETFIELD_Px
	movl	%eax, %ebx
	movl	$10, %edi
	callq	_msleep
	xorl	%eax, %eax
	testl	%ebx, %ebx
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leal	1(%r15), %ecx
	cmpl	$9, %r15d
	movl	%ecx, %r15d
	jb	LBB0_12
	jmp	LBB0_14
LBB0_9:
	movq	_FE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	callq	_dprintk
	movl	$-1, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DISTXCTL,4,2                   ## @DISTXCTL
	.comm	_DISTX_MODE_FIELD,4,2           ## @DISTX_MODE_FIELD
	.comm	_DISEQC_RESET_FIELD,4,2         ## @DISEQC_RESET_FIELD
	.comm	_DIS_PRECHARGE_FIELD,4,2        ## @DIS_PRECHARGE_FIELD
	.comm	_DISTXSTATUS,4,2                ## @DISTXSTATUS
	.comm	_FIFO_FULL_FIELD,4,2            ## @FIFO_FULL_FIELD
	.comm	_DISTXDATA,4,2                  ## @DISTXDATA
	.comm	_TX_IDLE_FIELD,4,2              ## @TX_IDLE_FIELD
	.comm	_FE_ERROR,4,2                   ## @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_send_diseqc_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stv090x_send_diseqc_msg
_stv090x_send_diseqc_msg:               ; @stv090x_send_diseqc_msg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	ldr	x19, [x0]
Lloh0:
	adrp	x22, _DISTXCTL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DISTXCTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x21, x0
Lloh2:
	adrp	x8, _DISTX_MODE_FIELD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DISTX_MODE_FIELD@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #4
	mov	w9, #2
	csel	w2, w9, w8, eq
	bl	_STV090x_SETFIELD_Px
Lloh5:
	adrp	x23, _DISEQC_RESET_FIELD@GOTPAGE
Lloh6:
	ldr	x23, [x23, _DISEQC_RESET_FIELD@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #1
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_13
; %bb.1:
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #0
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_13
; %bb.2:
Lloh7:
	adrp	x23, _DIS_PRECHARGE_FIELD@GOTPAGE
Lloh8:
	ldr	x23, [x23, _DIS_PRECHARGE_FIELD@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #1
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x21
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_13
; %bb.3:
	ldr	w8, [x20]
Lloh9:
	adrp	x21, _DISTXSTATUS@GOTPAGE
Lloh10:
	ldr	x21, [x21, _DISTXSTATUS@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.4:
	mov	x24, #0
	mov	w8, #0
Lloh11:
	adrp	x25, _DISTXDATA@GOTPAGE
Lloh12:
	ldr	x25, [x25, _DISTXDATA@GOTPAGEOFF]
Lloh13:
	adrp	x26, _FIFO_FULL_FIELD@GOTPAGE
Lloh14:
	ldr	x26, [x26, _FIFO_FULL_FIELD@GOTPAGEOFF]
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	tbnz	w8, #0, LBB0_7
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x21]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	ldr	w1, [x26]
	bl	_STV090x_GETFIELD_Px
	cbnz	w0, LBB0_6
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x25]
	ldr	x8, [x20, #8]
	ldr	w2, [x8, x24, lsl #2]
	mov	x0, x19
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldrsw	x9, [x20]
	mov	w8, #1
	cmp	x24, x9
	b.lt	LBB0_5
LBB0_9:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	mov	x20, x0
	ldr	w1, [x23]
	mov	w2, #0
	bl	_STV090x_SETFIELD_Px
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_STV090x_WRITE_DEMOD
	tbnz	x0, #63, LBB0_13
; %bb.10:
	mov	w22, #0
Lloh15:
	adrp	x23, _TX_IDLE_FIELD@GOTPAGE
Lloh16:
	ldr	x23, [x23, _TX_IDLE_FIELD@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_STV090x_READ_DEMOD
	ldr	w1, [x23]
	bl	_STV090x_GETFIELD_Px
	mov	x20, x0
	mov	w0, #10
	bl	_msleep
	cmp	w20, #0
	ccmp	w22, #9, #2, eq
	add	w22, w22, #1
	b.lo	LBB0_11
; %bb.12:
	mov	w0, #0
	b	LBB0_14
LBB0_13:
Lloh17:
	adrp	x8, _FE_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _FE_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x2, l_.str@PAGE
Lloh21:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DISTXCTL,4,2                   ; @DISTXCTL
	.comm	_DISTX_MODE_FIELD,4,2           ; @DISTX_MODE_FIELD
	.comm	_DISEQC_RESET_FIELD,4,2         ; @DISEQC_RESET_FIELD
	.comm	_DIS_PRECHARGE_FIELD,4,2        ; @DIS_PRECHARGE_FIELD
	.comm	_DISTXSTATUS,4,2                ; @DISTXSTATUS
	.comm	_FIFO_FULL_FIELD,4,2            ; @FIFO_FULL_FIELD
	.comm	_DISTXDATA,4,2                  ; @DISTXDATA
	.comm	_TX_IDLE_FIELD,4,2              ; @TX_IDLE_FIELD
	.comm	_FE_ERROR,4,2                   ; @FE_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I/O error"

	.no_dead_strip	_stv090x_send_diseqc_msg
.subsections_via_symbols
