	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lspcon_get_mode            ## -- Begin function drm_lspcon_get_mode
	.p2align	4, 0x90
_drm_lspcon_get_mode:                   ## @drm_lspcon_get_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.9:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_DP_DUAL_MODE_LSPCON_CURRENT_MODE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.5:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_drm_dp_dual_mode_read
	testl	%eax, %eax
	js	LBB0_8
LBB0_10:
	movq	_DP_DUAL_MODE_LSPCON_MODE_PCON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	jne	LBB0_11
## %bb.12:
	movq	_DRM_LSPCON_MODE_LS@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_11:
	movq	_DRM_LSPCON_MODE_PCON@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NULL input\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DP_DUAL_MODE_LSPCON_CURRENT_MODE,4,2 ## @DP_DUAL_MODE_LSPCON_CURRENT_MODE
L_.str.1:                               ## @.str.1
	.asciz	"LSPCON read(0x80, 0x41) failed\n"

	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_DP_DUAL_MODE_LSPCON_MODE_PCON,4,2 ## @DP_DUAL_MODE_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_PCON,4,2       ## @DRM_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_LS,4,2         ## @DRM_LSPCON_MODE_LS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lspcon_get_mode            ; -- Begin function drm_lspcon_get_mode
	.p2align	2
_drm_lspcon_get_mode:                   ; @drm_lspcon_get_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	cbz	x1, LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _DP_DUAL_MODE_LSPCON_CURRENT_MODE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DP_DUAL_MODE_LSPCON_CURRENT_MODE@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_7
; %bb.2:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_7
; %bb.3:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_7
; %bb.4:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_7
; %bb.5:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	cbz	w0, LBB0_7
; %bb.6:
	mov	w0, #500
	mov	w1, #1000
	bl	_usleep_range
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	mov	w3, #4
	bl	_drm_dp_dual_mode_read
	tbnz	w0, #31, LBB0_11
LBB0_7:
	mov	w0, #0
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _DP_DUAL_MODE_LSPCON_MODE_PCON@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DP_DUAL_MODE_LSPCON_MODE_PCON@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _DRM_LSPCON_MODE_LS@GOTPAGE
Lloh6:
	ldr	x10, [x10, _DRM_LSPCON_MODE_LS@GOTPAGEOFF]
Lloh7:
	adrp	x11, _DRM_LSPCON_MODE_PCON@GOTPAGE
Lloh8:
	ldr	x11, [x11, _DRM_LSPCON_MODE_PCON@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_10
LBB0_8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh15:
	adrp	x8, _EFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NULL input\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DP_DUAL_MODE_LSPCON_CURRENT_MODE,4,2 ; @DP_DUAL_MODE_LSPCON_CURRENT_MODE
l_.str.1:                               ; @.str.1
	.asciz	"LSPCON read(0x80, 0x41) failed\n"

	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_DP_DUAL_MODE_LSPCON_MODE_PCON,4,2 ; @DP_DUAL_MODE_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_PCON,4,2       ; @DRM_LSPCON_MODE_PCON
	.comm	_DRM_LSPCON_MODE_LS,4,2         ; @DRM_LSPCON_MODE_LS
.subsections_via_symbols
