	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transmitter_control_v2
_transmitter_control_v2:                ## @transmitter_control_v2
	.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	$144, %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
	movq	48(%rsi), %rdi
	callq	_dal_graphics_object_id_get_connector_id
	movl	%eax, %r12d
	leaq	-104(%rbp), %rdi
	xorl	%esi, %esi
	movl	$72, %edx
	callq	_memset
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$7, %eax
	jae	LBB0_1
## %bb.2:
	movl	4(%rbx), %eax
	cmpl	$135, %eax
	je	LBB0_8
## %bb.3:
	cmpl	$136, %eax
	jne	LBB0_9
## %bb.4:
	movq	_CONNECTOR_ID_DUAL_LINK_DVII@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_6
## %bb.5:
	movq	_CONNECTOR_ID_DUAL_LINK_DVID@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_7
LBB0_6:
	movl	$1, -96(%rbp)
LBB0_7:
	movq	48(%rbx), %rdi
	callq	_cpu_to_le16
	movq	%rax, -40(%rbp)
	jmp	LBB0_13
LBB0_1:
	movq	_BP_RESULT_BADINPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_8:
	movups	32(%rbx), %xmm0
	movups	%xmm0, -56(%rbp)
	jmp	LBB0_13
LBB0_9:
	movq	_LANE_COUNT_FOUR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	28(%rbx), %eax
	jge	LBB0_11
## %bb.10:
	movl	$1, -96(%rbp)
	movslq	8(%rbx), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$35, %rax
	jmp	LBB0_12
LBB0_11:
	movslq	8(%rbx), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
LBB0_12:
	addl	%ecx, %eax
	movslq	%eax, %rdi
	callq	_cpu_to_le16
	movq	%rax, -64(%rbp)
LBB0_13:
	movl	24(%rbx), %eax
	movl	%eax, -72(%rbp)
	movl	(%rbx), %edi
	leal	-128(%rdi), %eax
	cmpl	$4, %eax
	ja	LBB0_16
## %bb.14:
	movl	$21, %ecx
	btl	%eax, %ecx
	jae	LBB0_16
## %bb.15:
	movl	$1, -92(%rbp)
LBB0_16:
	movq	_ENGINE_ID_DIGB@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	16(%rbx), %rax
	jne	LBB0_18
## %bb.17:
	movl	$1, -88(%rbp)
LBB0_18:
	movq	_CONNECTOR_ID_DISPLAY_PORT@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_20
## %bb.19:
	movl	$1, -84(%rbp)
LBB0_20:
	movq	(%r15), %rax
                                        ## kill: def $edi killed $edi killed $rdi
	callq	*(%rax)
	movq	%rax, -80(%rbp)
	movslq	4(%rbx), %rax
	movq	%rax, -104(%rbp)
	movq	_UNIPHYTransmitterControl@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-40(%rbp), %rax
	movq	%rax, 64(%rsp)
	movups	-104(%rbp), %xmm0
	movups	-88(%rbp), %xmm1
	movups	-72(%rbp), %xmm2
	movups	-56(%rbp), %xmm3
	movups	%xmm3, 48(%rsp)
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_EXEC_BIOS_CMD_TABLE
	testq	%rax, %rax
	je	LBB0_23
## %bb.21:
	movq	_BP_RESULT_OK@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$144, %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	_BP_RESULT_BADINPUT,4,2         ## @BP_RESULT_BADINPUT
	.comm	_CONNECTOR_ID_DUAL_LINK_DVII,4,2 ## @CONNECTOR_ID_DUAL_LINK_DVII
	.comm	_CONNECTOR_ID_DUAL_LINK_DVID,4,2 ## @CONNECTOR_ID_DUAL_LINK_DVID
	.comm	_LANE_COUNT_FOUR,4,2            ## @LANE_COUNT_FOUR
	.comm	_ENGINE_ID_DIGB,8,3             ## @ENGINE_ID_DIGB
	.comm	_CONNECTOR_ID_DISPLAY_PORT,4,2  ## @CONNECTOR_ID_DISPLAY_PORT
	.comm	_UNIPHYTransmitterControl,4,2   ## @UNIPHYTransmitterControl
	.comm	_BP_RESULT_OK,4,2               ## @BP_RESULT_OK
	.no_dead_strip	_transmitter_control_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transmitter_control_v2
_transmitter_control_v2:                ; @transmitter_control_v2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _BP_RESULT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BP_RESULT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	ldr	x0, [x1, #48]
	bl	_dal_graphics_object_id_get_connector_id
	mov	x21, x0
	add	x0, sp, #72
	mov	w1, #0
	mov	w2, #72
	bl	_memset
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #7
	b.hs	LBB0_6
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #135
	b.eq	LBB0_7
; %bb.2:
	cmp	w8, #136
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _CONNECTOR_ID_DUAL_LINK_DVII@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CONNECTOR_ID_DUAL_LINK_DVII@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _CONNECTOR_ID_DUAL_LINK_DVID@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CONNECTOR_ID_DUAL_LINK_DVID@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w21
	ccmp	w9, w21, #4, ne
	b.ne	LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [sp, #80]
LBB0_5:
	ldr	x0, [x19, #48]
	bl	_cpu_to_le16
	str	x0, [sp, #136]
	b	LBB0_12
LBB0_6:
Lloh9:
	adrp	x8, _BP_RESULT_BADINPUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BP_RESULT_BADINPUT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_19
LBB0_7:
	ldp	x9, x8, [x19, #32]
	stp	x9, x8, [sp, #120]
	b	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _LANE_COUNT_FOUR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LANE_COUNT_FOUR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	w9, [x19, #28]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [sp, #80]
	ldrsw	x8, [x19, #8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #35
	b	LBB0_11
LBB0_10:
	ldrsw	x8, [x19, #8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #34
LBB0_11:
	add	w8, w8, w9
	sxtw	x0, w8
	bl	_cpu_to_le16
	str	x0, [sp, #112]
LBB0_12:
	ldr	w8, [x19, #24]
	str	w8, [sp, #104]
	ldr	w0, [x19]
	sub	w9, w0, #128
	cmp	w9, #4
	mov	w8, #1
	lsl	w9, w8, w9
	mov	w10, #21
	and	w9, w9, w10
	ccmp	w9, #0, #4, ls
	b.eq	LBB0_14
; %bb.13:
	str	w8, [sp, #84]
LBB0_14:
Lloh15:
	adrp	x8, _ENGINE_ID_DIGB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENGINE_ID_DIGB@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	mov	w8, #1
	str	w8, [sp, #88]
LBB0_16:
Lloh18:
	adrp	x8, _CONNECTOR_ID_DISPLAY_PORT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CONNECTOR_ID_DISPLAY_PORT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_18
; %bb.17:
	mov	w8, #1
	str	w8, [sp, #92]
LBB0_18:
	ldr	x8, [x20]
	ldr	x8, [x8]
	blr	x8
	ldrsw	x10, [x19, #4]
Lloh21:
	adrp	x9, _UNIPHYTransmitterControl@GOTPAGE
Lloh22:
	ldr	x9, [x9, _UNIPHYTransmitterControl@GOTPAGEOFF]
	str	x0, [sp, #96]
Lloh23:
	ldr	w0, [x9]
	ldur	q0, [sp, #104]
	ldur	q1, [sp, #120]
	stp	q0, q1, [sp, #32]
	ldr	x8, [sp, #136]
	stp	x8, x10, [sp, #64]
	ldur	q0, [sp, #88]
	ldur	q1, [sp, #72]
	stp	q1, q0, [sp]
	mov	x1, sp
	bl	_EXEC_BIOS_CMD_TABLE
Lloh24:
	adrp	x8, _BP_RESULT_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _BP_RESULT_OK@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w0, w22, w8, eq
LBB0_19:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_BP_RESULT_FAILURE,4,2          ; @BP_RESULT_FAILURE
	.comm	_BP_RESULT_BADINPUT,4,2         ; @BP_RESULT_BADINPUT
	.comm	_CONNECTOR_ID_DUAL_LINK_DVII,4,2 ; @CONNECTOR_ID_DUAL_LINK_DVII
	.comm	_CONNECTOR_ID_DUAL_LINK_DVID,4,2 ; @CONNECTOR_ID_DUAL_LINK_DVID
	.comm	_LANE_COUNT_FOUR,4,2            ; @LANE_COUNT_FOUR
	.comm	_ENGINE_ID_DIGB,8,3             ; @ENGINE_ID_DIGB
	.comm	_CONNECTOR_ID_DISPLAY_PORT,4,2  ; @CONNECTOR_ID_DISPLAY_PORT
	.comm	_UNIPHYTransmitterControl,4,2   ; @UNIPHYTransmitterControl
	.comm	_BP_RESULT_OK,4,2               ; @BP_RESULT_OK
	.no_dead_strip	_transmitter_control_v2
.subsections_via_symbols
