	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arcpgu_drm_sim_init            ## -- Begin function arcpgu_drm_sim_init
	.p2align	4, 0x90
_arcpgu_drm_sim_init:                   ## @arcpgu_drm_sim_init
	.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, %r14
	movl	(%rdi), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	$1, (%rax)
	movq	$0, 8(%rax)
	movq	_DRM_MODE_ENCODER_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_arcpgu_drm_encoder_funcs@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%r8d, %r8d
	callq	_drm_encoder_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	(%r14), %edi
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	_arcpgu_drm_connector_helper_funcs@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_drm_connector_helper_add
	movq	_DRM_MODE_CONNECTOR_VIRTUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_arcpgu_drm_connector_funcs@GOTPCREL(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_connector_init
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_drm_connector_attach_encoder
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_10
## %bb.8:
	movl	%eax, %r13d
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_drm_connector_unregister
	movq	%r15, %rdi
	callq	_drm_connector_cleanup
	movl	%r13d, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movl	%eax, %ebx
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movq	%r12, %rdi
	callq	_drm_encoder_cleanup
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_arcpgu_drm_encoder_funcs,4,2   ## @arcpgu_drm_encoder_funcs
	.comm	_DRM_MODE_ENCODER_VIRTUAL,4,2   ## @DRM_MODE_ENCODER_VIRTUAL
	.comm	_arcpgu_drm_connector_helper_funcs,4,2 ## @arcpgu_drm_connector_helper_funcs
	.comm	_arcpgu_drm_connector_funcs,4,2 ## @arcpgu_drm_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_VIRTUAL,4,2 ## @DRM_MODE_CONNECTOR_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to initialize drm connector\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not attach connector to encoder\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_arcpgu_drm_sim_init            ; -- Begin function arcpgu_drm_sim_init
	.p2align	2
_arcpgu_drm_sim_init:                   ; @arcpgu_drm_sim_init
	.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, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w8, #1
	str	w8, [x0]
	str	xzr, [x0, #8]
Lloh2:
	adrp	x8, _DRM_MODE_ENCODER_VIRTUAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRM_MODE_ENCODER_VIRTUAL@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x2, _arcpgu_drm_encoder_funcs@GOTPAGE
Lloh6:
	ldr	x2, [x2, _arcpgu_drm_encoder_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	x4, #0
	bl	_drm_encoder_init
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.2:
	ldr	w0, [x20]
	ldr	w2, [x22]
	mov	w1, #4
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, x0
Lloh7:
	adrp	x1, _arcpgu_drm_connector_helper_funcs@GOTPAGE
Lloh8:
	ldr	x1, [x1, _arcpgu_drm_connector_helper_funcs@GOTPAGEOFF]
	bl	_drm_connector_helper_add
Lloh9:
	adrp	x8, _DRM_MODE_CONNECTOR_VIRTUAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DRM_MODE_CONNECTOR_VIRTUAL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x2, _arcpgu_drm_connector_funcs@GOTPAGE
Lloh13:
	ldr	x2, [x2, _arcpgu_drm_connector_funcs@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x22
	bl	_drm_connector_init
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x0, x22
	mov	x1, x19
	bl	_drm_connector_attach_encoder
	tbnz	w0, #31, LBB0_9
; %bb.5:
	mov	w21, #0
	b	LBB0_11
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_8:
	mov	x21, x0
	ldr	w0, [x20]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_9:
	mov	x21, x0
	ldr	w0, [x20]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x22
	bl	_drm_connector_unregister
	mov	x0, x22
	bl	_drm_connector_cleanup
LBB0_10:
	mov	x0, x19
	bl	_drm_encoder_cleanup
LBB0_11:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_arcpgu_drm_encoder_funcs,4,2   ; @arcpgu_drm_encoder_funcs
	.comm	_DRM_MODE_ENCODER_VIRTUAL,4,2   ; @DRM_MODE_ENCODER_VIRTUAL
	.comm	_arcpgu_drm_connector_helper_funcs,4,2 ; @arcpgu_drm_connector_helper_funcs
	.comm	_arcpgu_drm_connector_funcs,4,2 ; @arcpgu_drm_connector_funcs
	.comm	_DRM_MODE_CONNECTOR_VIRTUAL,4,2 ; @DRM_MODE_CONNECTOR_VIRTUAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to initialize drm connector\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not attach connector to encoder\n"

.subsections_via_symbols
