	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function amdgpu_dm_init
_amdgpu_dm_init:                        ## @amdgpu_dm_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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	72(%rdi), %rax
	movq	%rax, 64(%rdi)
	movq	%rdi, 56(%rdi)
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	52(%rbx), %rdi
	callq	_mutex_init
	leaq	48(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %rdi
	callq	_amdgpu_dm_irq_init
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %rdi
LBB0_2:
	callq	_DRM_ERROR
LBB0_3:
	movq	%rbx, %rdi
	callq	_amdgpu_dm_fini
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movups	96(%rbx), %xmm0
	movups	%xmm0, -28(%rbp)
	movq	88(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	%rbx, -40(%rbp)
	movq	%rbx, %rdi
	callq	_amdgpu_cgs_create_device
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	movq	%rax, -48(%rbp)
	movq	_DCE_ENV_PRODUCTION_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_AMD_IS_APU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_10
## %bb.7:
	movq	8(%rbx), %rax
	movq	_CHIP_CARRIZO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.8:
	movq	_CHIP_RAVEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_10
## %bb.9:
	movl	$1, -68(%rbp)
LBB0_10:
	movq	_amdgpu_dc_feature_mask@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DC_FBC_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.11:
	movl	$1, -64(%rbp)
LBB0_12:
	movq	_DC_MULTI_MON_PP_MCLK_SWITCH_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
## %bb.13:
	movl	$1, -60(%rbp)
LBB0_14:
	movl	$1, -56(%rbp)
	leaq	-72(%rbp), %rdi
	callq	_dc_create
	movq	%rax, 24(%rbx)
	movq	_DC_VER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_INFO
	movq	24(%rbx), %rdi
	callq	_mod_freesync_create
	movl	%eax, 32(%rbx)
	testl	%eax, %eax
	je	LBB0_19
## %bb.16:
	leaq	L_.str.5(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_18:
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_INFO
	jmp	LBB0_3
LBB0_19:
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_ERROR
LBB0_20:
	xorl	%eax, %eax
	callq	_amdgpu_dm_init_color_mod
	movq	%rbx, %rdi
	callq	_amdgpu_dm_initialize_drm_device
	testq	%rax, %rax
	jne	LBB0_22
## %bb.21:
	movl	16(%rbx), %esi
	movl	%esi, 80(%rbx)
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	movq	72(%rbx), %rdi
	movl	%eax, 4(%rdi)
	movl	%eax, (%rdi)
	callq	_drm_vblank_init
	testq	%rax, %rax
	je	LBB0_23
LBB0_22:
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_2
LBB0_23:
	leaq	L_.str.7(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_DRIVER
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu: failed to initialize DM IRQ support.\n"

L_.str.1:                               ## @.str.1
	.asciz	"amdgpu: failed to create cgs device.\n"

	.comm	_DCE_ENV_PRODUCTION_DRV,4,2     ## @DCE_ENV_PRODUCTION_DRV
	.comm	_AMD_IS_APU,4,2                 ## @AMD_IS_APU
	.comm	_CHIP_CARRIZO,8,3               ## @CHIP_CARRIZO
	.comm	_CHIP_RAVEN,8,3                 ## @CHIP_RAVEN
	.comm	_amdgpu_dc_feature_mask,4,2     ## @amdgpu_dc_feature_mask
	.comm	_DC_FBC_MASK,4,2                ## @DC_FBC_MASK
	.comm	_DC_MULTI_MON_PP_MCLK_SWITCH_MASK,4,2 ## @DC_MULTI_MON_PP_MCLK_SWITCH_MASK
L_.str.2:                               ## @.str.2
	.asciz	"Display Core initialized with v%s!\n"

	.comm	_DC_VER,4,2                     ## @DC_VER
L_.str.3:                               ## @.str.3
	.asciz	"Display Core failed to initialize with v%s!\n"

L_.str.4:                               ## @.str.4
	.asciz	"amdgpu: failed to initialize freesync_module.\n"

L_.str.5:                               ## @.str.5
	.asciz	"amdgpu: freesync_module init done %p.\n"

L_.str.6:                               ## @.str.6
	.asciz	"amdgpu: failed to initialize sw for display support.\n"

L_.str.7:                               ## @.str.7
	.asciz	"KMS initialized.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_amdgpu_dm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function amdgpu_dm_init
_amdgpu_dm_init:                        ; @amdgpu_dm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #72]
	stp	x0, x8, [x0, #56]
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x0, x19, #52
	bl	_mutex_init
	add	x0, x19, #48
	bl	_mutex_init
	mov	x0, x19
	bl	_amdgpu_dm_irq_init
	cbz	x0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_DRM_ERROR
LBB0_3:
	mov	x0, x19
	bl	_amdgpu_dm_fini
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	ldr	q0, [x19, #96]
	stur	q0, [sp, #60]
	ldr	x8, [x19, #88]
	ldr	w8, [x8]
	str	w8, [sp, #56]
	str	x19, [sp, #48]
	mov	x0, x19
	bl	_amdgpu_cgs_create_device
	str	x0, [x19, #40]
	cbz	x0, LBB0_17
; %bb.6:
	str	x0, [sp, #40]
Lloh5:
	adrp	x8, _DCE_ENV_PRODUCTION_DRV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DCE_ENV_PRODUCTION_DRV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _AMD_IS_APU@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AMD_IS_APU@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.7:
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x9, _CHIP_CARRIZO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHIP_CARRIZO@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_10
; %bb.8:
Lloh14:
	adrp	x9, _CHIP_RAVEN@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CHIP_RAVEN@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [sp, #20]
LBB0_10:
Lloh17:
	adrp	x8, _amdgpu_dc_feature_mask@GOTPAGE
Lloh18:
	ldr	x8, [x8, _amdgpu_dc_feature_mask@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _DC_FBC_MASK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DC_FBC_MASK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	w9, #1
	str	w9, [sp, #24]
LBB0_12:
Lloh23:
	adrp	x9, _DC_MULTI_MON_PP_MCLK_SWITCH_MASK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DC_MULTI_MON_PP_MCLK_SWITCH_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [sp, #28]
LBB0_14:
	mov	w8, #1
	str	w8, [sp, #32]
	add	x0, sp, #16
	bl	_dc_create
	str	x0, [x19, #24]
Lloh26:
	adrp	x8, _DC_VER@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DC_VER@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	cbz	x0, LBB0_18
; %bb.15:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_INFO
	ldr	x0, [x19, #24]
	bl	_mod_freesync_create
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x19, #32]
	cbz	w0, LBB0_19
; %bb.16:
	str	x0, [sp]
Lloh31:
	adrp	x0, l_.str.5@PAGE
Lloh32:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	b	LBB0_20
LBB0_17:
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_18:
Lloh35:
	adrp	x0, l_.str.3@PAGE
Lloh36:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_INFO
	b	LBB0_3
LBB0_19:
Lloh37:
	adrp	x0, l_.str.4@PAGE
Lloh38:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
LBB0_20:
	bl	_amdgpu_dm_init_color_mod
	mov	x0, x19
	bl	_amdgpu_dm_initialize_drm_device
	cbnz	x0, LBB0_22
; %bb.21:
	ldr	w1, [x19, #16]
	str	w1, [x19, #80]
	ldr	x8, [x19, #24]
	ldr	w8, [x8]
	ldr	x0, [x19, #72]
	stp	w8, w8, [x0]
	bl	_drm_vblank_init
	cbz	x0, LBB0_23
LBB0_22:
Lloh39:
	adrp	x0, l_.str.6@PAGE
Lloh40:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_2
LBB0_23:
Lloh41:
	adrp	x0, l_.str.7@PAGE
Lloh42:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
	mov	w0, #0
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu: failed to initialize DM IRQ support.\n"

l_.str.1:                               ; @.str.1
	.asciz	"amdgpu: failed to create cgs device.\n"

	.comm	_DCE_ENV_PRODUCTION_DRV,4,2     ; @DCE_ENV_PRODUCTION_DRV
	.comm	_AMD_IS_APU,4,2                 ; @AMD_IS_APU
	.comm	_CHIP_CARRIZO,8,3               ; @CHIP_CARRIZO
	.comm	_CHIP_RAVEN,8,3                 ; @CHIP_RAVEN
	.comm	_amdgpu_dc_feature_mask,4,2     ; @amdgpu_dc_feature_mask
	.comm	_DC_FBC_MASK,4,2                ; @DC_FBC_MASK
	.comm	_DC_MULTI_MON_PP_MCLK_SWITCH_MASK,4,2 ; @DC_MULTI_MON_PP_MCLK_SWITCH_MASK
l_.str.2:                               ; @.str.2
	.asciz	"Display Core initialized with v%s!\n"

	.comm	_DC_VER,4,2                     ; @DC_VER
l_.str.3:                               ; @.str.3
	.asciz	"Display Core failed to initialize with v%s!\n"

l_.str.4:                               ; @.str.4
	.asciz	"amdgpu: failed to initialize freesync_module.\n"

l_.str.5:                               ; @.str.5
	.asciz	"amdgpu: freesync_module init done %p.\n"

l_.str.6:                               ; @.str.6
	.asciz	"amdgpu: failed to initialize sw for display support.\n"

l_.str.7:                               ; @.str.7
	.asciz	"KMS initialized.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_amdgpu_dm_init
.subsections_via_symbols
