	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vidi_connection_ioctl          ## -- Begin function vidi_connection_ioctl
	.p2align	4, 0x90
_vidi_connection_ioctl:                 ## @vidi_connection_ioctl
	.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
	movq	%rsi, %rbx
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.4:
	movl	(%rbx), %eax
	cmpl	$2, %eax
	jl	LBB0_6
## %bb.5:
	movl	16(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	movl	16(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	cmpl	%eax, (%r14)
	jne	LBB0_8
## %bb.7:
	movl	16(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	callq	_DRM_DEV_DEBUG_KMS
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_drm_edid_is_valid
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	callq	_drm_edid_duplicate
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	jne	LBB0_16
## %bb.12:
	movl	16(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_DRM_DEV_DEBUG_KMS
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_13:
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:
	movq	_fake_edid_info@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_16
## %bb.15:
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_16:
	movl	(%rbx), %eax
	movl	%eax, (%r14)
	movl	4(%r14), %edi
	callq	_drm_helper_hpd_irq_event
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_10:
	movl	16(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"user data for vidi is null.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"connection should be 0 or 1.\n"

L_.str.2:                               ## @.str.2
	.asciz	"same connection request.\n"

L_.str.3:                               ## @.str.3
	.asciz	"edid data is invalid.\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to allocate raw_edid.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_fake_edid_info,8,3             ## @fake_edid_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vidi_connection_ioctl          ; -- Begin function vidi_connection_ioctl
	.p2align	2
_vidi_connection_ioctl:                 ; @vidi_connection_ioctl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x19, x0
	cbz	x20, LBB0_3
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.2:
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_3:
	ldr	w0, [x19, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
	ldr	w9, [x19]
	cmp	w9, w8
	b.ne	LBB0_9
; %bb.5:
	ldr	w0, [x19, #16]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_6:
	bl	_DRM_DEV_DEBUG_KMS
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	cbz	w8, LBB0_13
; %bb.10:
	ldr	x21, [x20, #8]
	mov	x0, x21
	bl	_drm_edid_is_valid
	cbz	w0, LBB0_16
; %bb.11:
	mov	x0, x21
	bl	_drm_edid_duplicate
	str	x0, [x19, #8]
	cbnz	x0, LBB0_15
; %bb.12:
	ldr	w0, [x19, #16]
Lloh8:
	adrp	x1, l_.str.4@PAGE
Lloh9:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_DRM_DEV_DEBUG_KMS
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_13:
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x8, _fake_edid_info@GOTPAGE
Lloh13:
	ldr	x8, [x8, _fake_edid_info@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	cmp	x0, #0
	ccmp	x0, x8, #4, ne
	b.eq	LBB0_15
; %bb.14:
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_15:
	ldr	w8, [x20]
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_drm_helper_hpd_irq_event
	mov	w0, #0
	b	LBB0_8
LBB0_16:
	ldr	w0, [x19, #16]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"user data for vidi is null.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"connection should be 0 or 1.\n"

l_.str.2:                               ; @.str.2
	.asciz	"same connection request.\n"

l_.str.3:                               ; @.str.3
	.asciz	"edid data is invalid.\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to allocate raw_edid.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_fake_edid_info,8,3             ; @fake_edid_info
.subsections_via_symbols
