	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_dual_mode_set_tmds_output ## -- Begin function drm_dp_dual_mode_set_tmds_output
	.p2align	4, 0x90
_drm_dp_dual_mode_set_tmds_output:      ## @drm_dp_dual_mode_set_tmds_output
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %rbx
	xorl	%r14d, %r14d
	testl	%edx, %edx
	jne	LBB0_1
## %bb.2:
	movq	_DP_DUAL_MODE_TMDS_DISABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	movq	%rax, -40(%rbp)
	movq	_DRM_DP_DUAL_MODE_TYPE2_DVI@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	ja	LBB0_23
## %bb.4:
	movq	_DP_DUAL_MODE_TMDS_OEN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_write
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	$1, %edx
LBB0_6:
	movl	%eax, %r14d
	testl	%r15d, %r15d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_8:
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	$1, %edx
LBB0_10:
	movl	%eax, %r14d
	testl	%r15d, %r15d
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.3(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_23:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	je	LBB0_23
## %bb.12:
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_write
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	$2, %edx
	jmp	LBB0_6
LBB0_14:
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	$2, %edx
	jmp	LBB0_10
LBB0_16:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	je	LBB0_23
## %bb.17:
	movl	(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_write
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	$3, %edx
	jmp	LBB0_6
LBB0_19:
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_21
## %bb.20:
	movl	$3, %edx
	jmp	LBB0_10
LBB0_21:
	movq	-48(%rbp), %rax
	cmpq	-40(%rbp), %rax
	je	LBB0_23
## %bb.22:
	testl	%r15d, %r15d
	leaq	L_.str.5(%rip), %rax
	leaq	L_.str.4(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.6(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_DUAL_MODE_TMDS_DISABLE,8,3  ## @DP_DUAL_MODE_TMDS_DISABLE
	.comm	_DRM_DP_DUAL_MODE_TYPE2_DVI,4,2 ## @DRM_DP_DUAL_MODE_TYPE2_DVI
	.comm	_DP_DUAL_MODE_TMDS_OEN,4,2      ## @DP_DUAL_MODE_TMDS_OEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to %s TMDS output buffers (%d attempts)\n"

L_.str.1:                               ## @.str.1
	.asciz	"enable"

L_.str.2:                               ## @.str.2
	.asciz	"disable"

L_.str.3:                               ## @.str.3
	.asciz	"I2C read failed during TMDS output buffer %s (%d attempts)\n"

L_.str.4:                               ## @.str.4
	.asciz	"enabling"

L_.str.5:                               ## @.str.5
	.asciz	"disabling"

L_.str.6:                               ## @.str.6
	.asciz	"I2C write value mismatch during TMDS output buffer %s\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dp_dual_mode_set_tmds_output ; -- Begin function drm_dp_dual_mode_set_tmds_output
	.p2align	2
_drm_dp_dual_mode_set_tmds_output:      ; @drm_dp_dual_mode_set_tmds_output
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, _DP_DUAL_MODE_TMDS_DISABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_DUAL_MODE_TMDS_DISABLE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	w2, #0
	csel	x8, x8, xzr, eq
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _DRM_DP_DUAL_MODE_TYPE2_DVI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_DP_DUAL_MODE_TYPE2_DVI@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ls	LBB0_2
LBB0_1:
	mov	w20, #0
	b	LBB0_8
LBB0_2:
	mov	x19, x2
	mov	x21, x1
Lloh6:
	adrp	x22, _DP_DUAL_MODE_TMDS_OEN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _DP_DUAL_MODE_TMDS_OEN@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_write
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
	mov	w8, #1
LBB0_4:
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh10:
	adrp	x10, l_.str.2@PAGE
Lloh11:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x1, x10, x9, eq
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_8
LBB0_5:
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_9
; %bb.6:
	mov	x20, x0
	mov	w8, #1
LBB0_7:
Lloh14:
	adrp	x9, l_.str.4@PAGE
Lloh15:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh16:
	adrp	x10, l_.str.5@PAGE
Lloh17:
	add	x10, x10, l_.str.5@PAGEOFF
	cmp	w19, #0
	csel	x1, x10, x9, eq
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_8:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_9:
	ldp	x8, x9, [sp, #16]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.10:
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_write
	cbz	w0, LBB0_12
; %bb.11:
	mov	x20, x0
	mov	w8, #2
	b	LBB0_4
LBB0_12:
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_14
; %bb.13:
	mov	x20, x0
	mov	w8, #2
	b	LBB0_7
LBB0_14:
	ldp	x8, x9, [sp, #16]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.15:
	ldr	w1, [x22]
	add	x2, sp, #24
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_write
	cbz	w0, LBB0_17
; %bb.16:
	mov	x20, x0
	mov	w8, #3
	b	LBB0_4
LBB0_17:
	ldr	w1, [x22]
	add	x2, sp, #16
	mov	x0, x21
	mov	w3, #8
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_19
; %bb.18:
	mov	x20, x0
	mov	w8, #3
	b	LBB0_7
LBB0_19:
	ldp	x8, x9, [sp, #16]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.20:
Lloh20:
	adrp	x8, l_.str.4@PAGE
Lloh21:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh22:
	adrp	x9, l_.str.5@PAGE
Lloh23:
	add	x9, x9, l_.str.5@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_DUAL_MODE_TMDS_DISABLE,8,3  ; @DP_DUAL_MODE_TMDS_DISABLE
	.comm	_DRM_DP_DUAL_MODE_TYPE2_DVI,4,2 ; @DRM_DP_DUAL_MODE_TYPE2_DVI
	.comm	_DP_DUAL_MODE_TMDS_OEN,4,2      ; @DP_DUAL_MODE_TMDS_OEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to %s TMDS output buffers (%d attempts)\n"

l_.str.1:                               ; @.str.1
	.asciz	"enable"

l_.str.2:                               ; @.str.2
	.asciz	"disable"

l_.str.3:                               ; @.str.3
	.asciz	"I2C read failed during TMDS output buffer %s (%d attempts)\n"

l_.str.4:                               ; @.str.4
	.asciz	"enabling"

l_.str.5:                               ; @.str.5
	.asciz	"disabling"

l_.str.6:                               ; @.str.6
	.asciz	"I2C write value mismatch during TMDS output buffer %s\n"

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