	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function icl_program_mg_dp_mode
_icl_program_mg_dp_mode:                ## @icl_program_mg_dp_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	%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	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_to_i915
	movl	(%rbx), %eax
	movq	_TC_PORT_TBT_ALT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	4(%rbx), %r12d
	xorl	%edi, %edi
	movl	%r12d, %esi
	callq	_MG_DP_MODE
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r14d
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_MG_DP_MODE
	movl	%eax, %edi
	callq	_I915_READ
	movl	%eax, %r15d
	movl	(%rbx), %edi
	cmpl	$128, %edi
	je	LBB0_10
## %bb.2:
	cmpl	$129, %edi
	jne	LBB0_11
## %bb.3:
	movq	_MG_DP_MODE_CFG_DP_X1_MODE@GOTPCREL(%rip), %r13
	movq	_MG_DP_MODE_CFG_DP_X2_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r13), %eax
	notl	%eax
	andl	%eax, %r14d
	andl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_intel_tc_port_get_lane_mask
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
	cmpl	$14, %ecx
	ja	LBB0_9
## %bb.4:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_12:
	orl	(%r13), %r14d
	jmp	LBB0_13
LBB0_10:
	movq	_MG_DP_MODE_CFG_DP_X1_MODE@GOTPCREL(%rip), %rax
	movq	_MG_DP_MODE_CFG_DP_X2_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	orl	%ecx, %r14d
	orl	%ecx, %r15d
LBB0_13:
	xorl	%edi, %edi
	movl	%r12d, %esi
	callq	_MG_DP_MODE
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	$1, %edi
	movl	%r12d, %esi
	callq	_MG_DP_MODE
	movl	%eax, %edi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_MISSING_CASE                   ## TAILCALL
LBB0_5:
	orl	(%r13), %r14d
	movq	_MG_DP_MODE_CFG_DP_X2_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %edi
	callq	_MISSING_CASE
	jmp	LBB0_13
LBB0_6:
	orl	(%r13), %r15d
	jmp	LBB0_13
LBB0_7:
	orl	(%r13), %r15d
	movq	_MG_DP_MODE_CFG_DP_X2_MODE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	jmp	LBB0_13
LBB0_8:
	movq	_MG_DP_MODE_CFG_DP_X2_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r13), %eax
	orl	%eax, %r14d
	orl	%eax, %r15d
	jmp	LBB0_13
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_13
	.long	L0_0_set_12
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_6
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_9
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_TC_PORT_TBT_ALT,4,2            ## @TC_PORT_TBT_ALT
	.comm	_MG_DP_MODE_CFG_DP_X1_MODE,4,2  ## @MG_DP_MODE_CFG_DP_X1_MODE
	.comm	_MG_DP_MODE_CFG_DP_X2_MODE,4,2  ## @MG_DP_MODE_CFG_DP_X2_MODE
	.no_dead_strip	_icl_program_mg_dp_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function icl_program_mg_dp_mode
_icl_program_mg_dp_mode:                ; @icl_program_mg_dp_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_to_i915
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _TC_PORT_TBT_ALT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TC_PORT_TBT_ALT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w19, [x22, #4]
	mov	w0, #0
	mov	x1, x19
	bl	_MG_DP_MODE
	bl	_I915_READ
	mov	x20, x0
	mov	w0, #1
	mov	x1, x19
	bl	_MG_DP_MODE
	bl	_I915_READ
	ldr	w8, [x22]
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.4:
Lloh3:
	adrp	x23, _MG_DP_MODE_CFG_DP_X1_MODE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MG_DP_MODE_CFG_DP_X1_MODE@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x24, _MG_DP_MODE_CFG_DP_X2_MODE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MG_DP_MODE_CFG_DP_X2_MODE@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
	bic	w21, w20, w8
	bic	w20, w0, w8
	mov	x0, x22
	bl	_intel_tc_port_get_lane_mask
	sub	w8, w0, #1
	cmp	w8, #14
	b.hi	LBB0_11
; %bb.5:
Lloh7:
	adrp	x9, lJTI0_0@PAGE
Lloh8:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_6
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_6:
	ldr	w8, [x23]
	orr	w21, w8, w21
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _MG_DP_MODE_CFG_DP_X1_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MG_DP_MODE_CFG_DP_X1_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MG_DP_MODE_CFG_DP_X2_MODE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MG_DP_MODE_CFG_DP_X2_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	orr	w21, w8, w20
	orr	w20, w8, w0
LBB0_8:
	mov	w0, #0
	mov	x1, x19
	bl	_MG_DP_MODE
	mov	x1, x21
	bl	_I915_WRITE
	mov	w0, #1
	mov	x1, x19
	bl	_MG_DP_MODE
	mov	x1, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_I915_WRITE
LBB0_9:
	mov	x0, x8
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_MISSING_CASE
LBB0_10:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w8, w21
	orr	w21, w8, w9
	b	LBB0_8
LBB0_11:
	bl	_MISSING_CASE
	b	LBB0_8
LBB0_12:
	ldr	w8, [x23]
	orr	w20, w8, w20
	b	LBB0_8
LBB0_13:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w8, w20
	orr	w20, w8, w9
	b	LBB0_8
LBB0_14:
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	orr	w21, w8, w21
	orr	w20, w8, w20
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_8-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_14-LBB0_6)>>2
                                        ; -- End function
	.comm	_TC_PORT_TBT_ALT,4,2            ; @TC_PORT_TBT_ALT
	.comm	_MG_DP_MODE_CFG_DP_X1_MODE,4,2  ; @MG_DP_MODE_CFG_DP_X1_MODE
	.comm	_MG_DP_MODE_CFG_DP_X2_MODE,4,2  ; @MG_DP_MODE_CFG_DP_X2_MODE
	.no_dead_strip	_icl_program_mg_dp_mode
.subsections_via_symbols
