	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_gfx_load
_aspeed_gfx_load:                       ## @aspeed_gfx_load
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	callq	_to_platform_device
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, 8(%r15)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	(%r15), %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, (%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rdi
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_26:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str(%rip), %rdi
	callq	_syscon_regmap_lookup_by_compatible
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	movq	(%r15), %rdi
	callq	_of_reserved_mem_device_init
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_9
LBB0_10:
	movq	(%r15), %r12
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_26
LBB0_12:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_reset_control_get_exclusive
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	16(%rbx), %rdi
	jmp	LBB0_4
LBB0_14:
	movq	16(%rbx), %rdi
	callq	_reset_control_deassert
	movq	(%r15), %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movq	%rax, 8(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	8(%rbx), %rdi
	jmp	LBB0_4
LBB0_16:
	movq	8(%rbx), %rdi
	callq	_clk_prepare_enable
	movq	_CRT_CTRL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	_CRT_CTRL2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	%r15, %rdi
	callq	_aspeed_gfx_setup_mode_config
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_drm_vblank_init
	testl	%eax, %eax
	js	LBB0_17
## %bb.18:
	movq	%r15, %rdi
	callq	_aspeed_gfx_create_output
	testl	%eax, %eax
	js	LBB0_19
## %bb.20:
	movq	%r15, %rdi
	callq	_aspeed_gfx_create_pipe
	movq	(%r15), %rbx
	testl	%eax, %eax
	js	LBB0_21
## %bb.23:
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	_aspeed_gfx_irq_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	L_.str.9(%rip), %r8
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_24
## %bb.25:
	movq	%r15, %rdi
	callq	_drm_mode_config_reset
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_drm_fbdev_generic_setup
	jmp	LBB0_26
LBB0_17:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_22
LBB0_19:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_22
LBB0_21:
	movl	%eax, %r12d
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rdi
LBB0_22:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_26
LBB0_24:
	movl	%eax, %ebx
	movq	(%r15), %rdi
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %r12d
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aspeed,ast2500-scu"

L_.str.1:                               ## @.str.1
	.asciz	"failed to find SCU regmap\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to initialize reserved mem: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set DMA mask: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"missing or invalid reset controller device tree entry"

L_.str.5:                               ## @.str.5
	.asciz	"missing or invalid clk device tree entry"

	.comm	_CRT_CTRL1,8,3                  ## @CRT_CTRL1
	.comm	_CRT_CTRL2,8,3                  ## @CRT_CTRL2
L_.str.6:                               ## @.str.6
	.asciz	"Failed to initialise vblank\n"

L_.str.7:                               ## @.str.7
	.asciz	"Failed to create outputs\n"

L_.str.8:                               ## @.str.8
	.asciz	"Cannot setup simple display pipe\n"

	.comm	_aspeed_gfx_irq_handler,4,2     ## @aspeed_gfx_irq_handler
L_.str.9:                               ## @.str.9
	.asciz	"aspeed gfx"

L_.str.10:                              ## @.str.10
	.asciz	"Failed to install IRQ handler\n"

	.no_dead_strip	_aspeed_gfx_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_gfx_load
_aspeed_gfx_load:                       ; @aspeed_gfx_load
	.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
	mov	x19, x0
	ldr	x0, [x0]
	bl	_to_platform_device
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	str	x0, [x19, #8]
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	ldr	x0, [x19]
	bl	_devm_ioremap_resource
	str	x0, [x21]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x21]
	b	LBB0_7
LBB0_3:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_4:
	mov	x0, x22
	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_5:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_syscon_regmap_lookup_by_compatible
	str	x0, [x21, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x21, #24]
LBB0_7:
	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
	b	_PTR_ERR
LBB0_8:
	ldr	x0, [x19]
	bl	_of_reserved_mem_device_init
	cbz	w0, LBB0_10
; %bb.9:
	mov	x22, x0
	str	x22, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_4
LBB0_10:
	ldr	x22, [x19]
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x22
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_12
; %bb.11:
	mov	x22, x0
	str	x22, [sp]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_4
LBB0_12:
	mov	x0, x20
	mov	x1, #0
	bl	_devm_reset_control_get_exclusive
	str	x0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.13:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x21, #16]
	b	LBB0_7
LBB0_14:
	ldr	x0, [x21, #16]
	bl	_reset_control_deassert
	ldr	x0, [x19]
	mov	x1, #0
	bl	_devm_clk_get
	str	x0, [x21, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.15:
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x21, #8]
	b	LBB0_7
LBB0_16:
	ldr	x0, [x21, #8]
	bl	_clk_prepare_enable
	ldr	x8, [x21]
Lloh21:
	adrp	x9, _CRT_CTRL1@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CRT_CTRL1@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x21]
Lloh24:
	adrp	x9, _CRT_CTRL2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _CRT_CTRL2@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel
	mov	x0, x19
	bl	_aspeed_gfx_setup_mode_config
	mov	x0, x19
	mov	w1, #1
	bl	_drm_vblank_init
	tbnz	w0, #31, LBB0_21
; %bb.17:
	mov	x0, x19
	bl	_aspeed_gfx_create_output
	tbnz	w0, #31, LBB0_22
; %bb.18:
	mov	x0, x19
	bl	_aspeed_gfx_create_pipe
	ldr	x21, [x19]
	tbnz	w0, #31, LBB0_23
; %bb.19:
	mov	x0, x20
	mov	w1, #0
	bl	_platform_get_irq
	mov	x1, x0
Lloh27:
	adrp	x8, _aspeed_gfx_irq_handler@GOTPAGE
Lloh28:
	ldr	x8, [x8, _aspeed_gfx_irq_handler@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
Lloh30:
	adrp	x4, l_.str.9@PAGE
Lloh31:
	add	x4, x4, l_.str.9@PAGEOFF
	mov	x0, x21
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_24
; %bb.20:
	mov	x0, x19
	bl	_drm_mode_config_reset
	mov	x0, x19
	mov	w1, #32
	bl	_drm_fbdev_generic_setup
	mov	w22, #0
	b	LBB0_4
LBB0_21:
	mov	x22, x0
	ldr	x0, [x19]
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_22:
	mov	x22, x0
	ldr	x0, [x19]
Lloh34:
	adrp	x1, l_.str.7@PAGE
Lloh35:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
	b	LBB0_4
LBB0_23:
	mov	x22, x0
Lloh36:
	adrp	x1, l_.str.8@PAGE
Lloh37:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_4
LBB0_24:
	mov	x22, x0
	ldr	x0, [x19]
Lloh38:
	adrp	x1, l_.str.10@PAGE
Lloh39:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_dev_err
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aspeed,ast2500-scu"

l_.str.1:                               ; @.str.1
	.asciz	"failed to find SCU regmap\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to initialize reserved mem: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set DMA mask: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"missing or invalid reset controller device tree entry"

l_.str.5:                               ; @.str.5
	.asciz	"missing or invalid clk device tree entry"

	.comm	_CRT_CTRL1,8,3                  ; @CRT_CTRL1
	.comm	_CRT_CTRL2,8,3                  ; @CRT_CTRL2
l_.str.6:                               ; @.str.6
	.asciz	"Failed to initialise vblank\n"

l_.str.7:                               ; @.str.7
	.asciz	"Failed to create outputs\n"

l_.str.8:                               ; @.str.8
	.asciz	"Cannot setup simple display pipe\n"

	.comm	_aspeed_gfx_irq_handler,4,2     ; @aspeed_gfx_irq_handler
l_.str.9:                               ; @.str.9
	.asciz	"aspeed gfx"

l_.str.10:                              ; @.str.10
	.asciz	"Failed to install IRQ handler\n"

	.no_dead_strip	_aspeed_gfx_load
.subsections_via_symbols
