	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encoder_control_digx_v1_5
_encoder_control_digx_v1_5:             ## @encoder_control_digx_v1_5
	.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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_BP_RESULT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	40(%rsi), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movl	36(%rsi), %edi
	callq	*8(%rax)
	movl	%eax, -56(%rbp)
	movslq	(%rbx), %rax
	imulq	$1717986919, %rax, %r12         ## imm = 0x66666667
	movq	%r12, %rax
	shrq	$63, %rax
	sarq	$34, %r12
	addl	%eax, %r12d
	movl	%r12d, -80(%rbp)
	movq	(%r15), %rax
	movq	8(%rbx), %rdi
	movl	32(%rbx), %esi
	callq	*(%rax)
	movq	%rax, -64(%rbp)
	movq	24(%rbx), %rax
	movq	%rax, -72(%rbp)
	movl	16(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	ja	LBB0_2
## %bb.1:
	movslq	%ecx, %rcx
	leaq	l_switch.table.encoder_control_digx_v1_5(%rip), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -76(%rbp)
LBB0_2:
	movq	8(%rbx), %rcx
	movq	_SIGNAL_TYPE_HDMI_TYPE_A@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_10
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_9
## %bb.4:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.5:
	cmpl	$131, %eax
	jne	LBB0_10
## %bb.6:
	movl	%r12d, %eax
	shll	$5, %eax
	subl	%r12d, %eax
	subl	%r12d, %eax
	jmp	LBB0_8
LBB0_9:
	addl	%r12d, %r12d
	movl	%r12d, -80(%rbp)
	jmp	LBB0_10
LBB0_7:
	shll	$2, %r12d
	leal	(%r12,%r12,8), %eax
LBB0_8:
	cltq
	imulq	$715827883, %rax, %rax          ## imm = 0x2AAAAAAB
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movl	%eax, -80(%rbp)
LBB0_10:
	movq	_digxencodercontrol@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movaps	-80(%rbp), %xmm0
	movaps	-64(%rbp), %xmm1
	movaps	-48(%rbp), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_EXEC_BIOS_CMD_TABLE
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_BP_RESULT_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ## @BP_RESULT_FAILURE
	.comm	_PANEL_8BIT_PER_COLOR,4,2       ## @PANEL_8BIT_PER_COLOR
	.comm	_PANEL_10BIT_PER_COLOR,4,2      ## @PANEL_10BIT_PER_COLOR
	.comm	_PANEL_12BIT_PER_COLOR,4,2      ## @PANEL_12BIT_PER_COLOR
	.comm	_PANEL_16BIT_PER_COLOR,4,2      ## @PANEL_16BIT_PER_COLOR
	.comm	_SIGNAL_TYPE_HDMI_TYPE_A,8,3    ## @SIGNAL_TYPE_HDMI_TYPE_A
	.comm	_digxencodercontrol,4,2         ## @digxencodercontrol
	.comm	_BP_RESULT_OK,4,2               ## @BP_RESULT_OK
	.no_dead_strip	_encoder_control_digx_v1_5
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.encoder_control_digx_v1_5
l_switch.table.encoder_control_digx_v1_5:
	.quad	_PANEL_8BIT_PER_COLOR
	.quad	_PANEL_16BIT_PER_COLOR
	.quad	_PANEL_12BIT_PER_COLOR
	.quad	_PANEL_10BIT_PER_COLOR

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encoder_control_digx_v1_5
_encoder_control_digx_v1_5:             ; @encoder_control_digx_v1_5
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _BP_RESULT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BP_RESULT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x23, [x1, #40]
	ldr	x8, [x0]
	ldr	x8, [x8, #8]
	ldr	w0, [x1, #36]
	blr	x8
	mov	x19, x0
	ldrsw	x8, [x20]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w24, w8, w9, asr #2
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x0, [x20, #8]
	ldr	w1, [x20, #32]
	blr	x8
	ldr	x9, [x20, #24]
	ldr	w8, [x20, #16]
	sub	w10, w8, #128
	cmp	w10, #3
	b.hi	LBB0_3
; %bb.1:
Lloh3:
	adrp	x11, lJTI0_0@PAGE
Lloh4:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x12, LBB0_2
	ldrb	w13, [x11, x10]
	add	x12, x12, x13, lsl #2
	br	x12
LBB0_2:
Lloh5:
	adrp	x10, _PANEL_8BIT_PER_COLOR@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PANEL_8BIT_PER_COLOR@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
	mov	w10, #0
	b	LBB0_8
LBB0_4:
Lloh7:
	adrp	x10, _PANEL_16BIT_PER_COLOR@GOTPAGE
Lloh8:
	ldr	x10, [x10, _PANEL_16BIT_PER_COLOR@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x10, _PANEL_12BIT_PER_COLOR@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PANEL_12BIT_PER_COLOR@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x10, _PANEL_10BIT_PER_COLOR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _PANEL_10BIT_PER_COLOR@GOTPAGEOFF]
LBB0_7:
	ldr	w10, [x10]
LBB0_8:
	ldr	x11, [x20, #8]
Lloh13:
	adrp	x12, _SIGNAL_TYPE_HDMI_TYPE_A@GOTPAGE
Lloh14:
	ldr	x12, [x12, _SIGNAL_TYPE_HDMI_TYPE_A@GOTPAGEOFF]
Lloh15:
	ldr	x12, [x12]
	cmp	x11, x12
	b.ne	LBB0_16
; %bb.9:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.10:
	cmp	w8, #130
	b.eq	LBB0_14
; %bb.11:
	cmp	w8, #131
	b.ne	LBB0_16
; %bb.12:
	mov	w8, #30
	mul	w8, w24, w8
	b	LBB0_15
LBB0_13:
	lsl	w24, w24, #1
	b	LBB0_16
LBB0_14:
	add	w8, w24, w24, lsl #3
	lsl	w8, w8, #2
LBB0_15:
	mov	w11, #43691
	movk	w11, #10922, lsl #16
	smull	x8, w8, w11
	lsr	x11, x8, #63
	asr	x8, x8, #34
	add	w24, w8, w11
LBB0_16:
Lloh16:
	adrp	x8, _digxencodercontrol@GOTPAGE
Lloh17:
	ldr	x8, [x8, _digxencodercontrol@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	stp	w24, w10, [sp]
	stp	x9, x0, [sp, #8]
	stp	w19, wzr, [sp, #24]
	stp	x23, xzr, [sp, #32]
	mov	x1, sp
	mov	x0, x8
	bl	_EXEC_BIOS_CMD_TABLE
Lloh19:
	adrp	x8, _BP_RESULT_OK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BP_RESULT_OK@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w22, w8, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ; @BP_RESULT_FAILURE
	.comm	_PANEL_8BIT_PER_COLOR,4,2       ; @PANEL_8BIT_PER_COLOR
	.comm	_PANEL_10BIT_PER_COLOR,4,2      ; @PANEL_10BIT_PER_COLOR
	.comm	_PANEL_12BIT_PER_COLOR,4,2      ; @PANEL_12BIT_PER_COLOR
	.comm	_PANEL_16BIT_PER_COLOR,4,2      ; @PANEL_16BIT_PER_COLOR
	.comm	_SIGNAL_TYPE_HDMI_TYPE_A,8,3    ; @SIGNAL_TYPE_HDMI_TYPE_A
	.comm	_digxencodercontrol,4,2         ; @digxencodercontrol
	.comm	_BP_RESULT_OK,4,2               ; @BP_RESULT_OK
	.no_dead_strip	_encoder_control_digx_v1_5
.subsections_via_symbols
