	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_dev_create              ## -- Begin function komeda_dev_create
	.p2align	4, 0x90
_komeda_dev_create:                     ## @komeda_dev_create
	.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, %r15
	callq	_to_platform_device
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_of_device_get_match_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	leaq	48(%rax), %rdi
	callq	_mutex_init
	movq	%r15, 16(%r14)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	32(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	movq	$0, 32(%r14)
	jmp	LBB0_27
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_28
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_28
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_clk_get
	movq	%rax, 40(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	40(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %r13d
	movq	$0, 40(%r14)
	jmp	LBB0_27
LBB0_11:
	movq	40(%r14), %rdi
	callq	_clk_prepare_enable
	movq	32(%r14), %rdi
	leaq	28(%r14), %rbx
	movq	%rbx, %rsi
	callq	*8(%r12)
	movq	%rax, 8(%r14)
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_komeda_product_match
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	28(%r14), %edi
	callq	_MALIDP_CORE_ID_PRODUCT_ID
	movl	%eax, %r12d
	movl	28(%r14), %edi
	callq	_MALIDP_CORE_ID_MAJOR
	movl	%eax, %ebx
	movl	28(%r14), %edi
	callq	_MALIDP_CORE_ID_MINOR
	leaq	L_.str.5(%rip), %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_DRM_INFO
	movq	8(%r14), %rax
	movq	%r14, %rdi
	callq	*16(%rax)
	movq	8(%r14), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r13d
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_26
LBB0_12:
	movl	(%r12), %r15d
	movl	(%rbx), %edi
	callq	_MALIDP_CORE_ID_PRODUCT_ID
	leaq	L_.str.4(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%r15d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_27
LBB0_15:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_komeda_parse_dt
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r13d
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_26
LBB0_17:
	movq	%r14, %rdi
	callq	_komeda_assemble_pipelines
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %r13d
	leaq	L_.str.8(%rip), %rdi
	jmp	LBB0_26
LBB0_19:
	movq	%r14, %rax
	addq	$24, %rax
	movq	%rax, 8(%r15)
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_dma_set_max_seg_size
	movq	16(%r14), %rdi
	callq	_iommu_get_domain_for_dev
	movq	%rax, (%r14)
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_INFO
	cmpq	$0, (%r14)
	je	LBB0_24
LBB0_21:
	movq	8(%r14), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_24
## %bb.22:
	movq	%r14, %rdi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %r13d
	movq	$0, (%r14)
	jmp	LBB0_27
LBB0_24:
	movq	_komeda_sysfs_attr_group@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_sysfs_create_group
	testl	%eax, %eax
	je	LBB0_29
## %bb.25:
	movl	%eax, %r13d
	leaq	L_.str.10(%rip), %rdi
LBB0_26:
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_27:
	movq	%r14, %rdi
	callq	_komeda_dev_destroy
LBB0_28:
	movl	%r13d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_29:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No registers defined.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Map register space failed.\n"

L_.str.2:                               ## @.str.2
	.asciz	"aclk"

L_.str.3:                               ## @.str.3
	.asciz	"Get engine clk failed.\n"

L_.str.4:                               ## @.str.4
	.asciz	"DT configured %x mismatch with real HW %x.\n"

L_.str.5:                               ## @.str.5
	.asciz	"Found ARM Mali-D%x version r%dp%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"enumerate display resource failed.\n"

L_.str.7:                               ## @.str.7
	.asciz	"parse device tree failed.\n"

L_.str.8:                               ## @.str.8
	.asciz	"assemble display pipelines failed.\n"

L_.str.9:                               ## @.str.9
	.asciz	"continue without IOMMU support!\n"

	.comm	_komeda_sysfs_attr_group,4,2    ## @komeda_sysfs_attr_group
L_.str.10:                              ## @.str.10
	.asciz	"create sysfs group failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_dev_create              ; -- Begin function komeda_dev_create
	.p2align	2
_komeda_dev_create:                     ; @komeda_dev_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	bl	_to_platform_device
	mov	x19, x0
	mov	x0, x20
	bl	_of_device_get_match_data
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	add	x0, x0, #48
	bl	_mutex_init
	str	x20, [x19, #16]
	mov	x0, x20
	mov	x1, x22
	bl	_devm_ioremap_resource
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.4:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	ldr	x0, [x19, #32]
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x19, #32]
	b	LBB0_27
LBB0_5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_6:
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_28
LBB0_8:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_9:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_devm_clk_get
	str	x0, [x19, #40]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	ldr	x0, [x19, #40]
	bl	_PTR_ERR
	mov	x21, x0
	str	xzr, [x19, #40]
	b	LBB0_27
LBB0_11:
	ldr	x0, [x19, #40]
	bl	_clk_prepare_enable
	ldr	x8, [x21, #8]
	ldr	x0, [x19, #32]
	add	x22, x19, #28
	mov	x1, x22
	blr	x8
	str	x0, [x19, #8]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_komeda_product_match
	cbz	w0, LBB0_14
; %bb.12:
	ldr	w0, [x19, #28]
	bl	_MALIDP_CORE_ID_PRODUCT_ID
	mov	x21, x0
	ldr	w0, [x19, #28]
	bl	_MALIDP_CORE_ID_MAJOR
	mov	x22, x0
	ldr	w0, [x19, #28]
	bl	_MALIDP_CORE_ID_MINOR
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #8]
	str	x21, [sp]
Lloh18:
	adrp	x0, l_.str.5@PAGE
Lloh19:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_INFO
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_15
; %bb.13:
	mov	x21, x0
Lloh20:
	adrp	x0, l_.str.6@PAGE
Lloh21:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_26
LBB0_14:
	ldr	w0, [x22]
	ldr	w20, [x21]
	bl	_MALIDP_CORE_ID_PRODUCT_ID
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh22:
	adrp	x0, l_.str.4@PAGE
Lloh23:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_27
LBB0_15:
	mov	x0, x20
	mov	x1, x19
	bl	_komeda_parse_dt
	cbz	w0, LBB0_17
; %bb.16:
	mov	x21, x0
Lloh27:
	adrp	x0, l_.str.7@PAGE
Lloh28:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_26
LBB0_17:
	mov	x0, x19
	bl	_komeda_assemble_pipelines
	cbz	w0, LBB0_19
; %bb.18:
	mov	x21, x0
Lloh29:
	adrp	x0, l_.str.8@PAGE
Lloh30:
	add	x0, x0, l_.str.8@PAGEOFF
	b	LBB0_26
LBB0_19:
	add	x8, x19, #24
	str	x8, [x20, #8]
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_max_seg_size
	ldr	x0, [x19, #16]
	bl	_iommu_get_domain_for_dev
	str	x0, [x19]
	cbnz	x0, LBB0_21
; %bb.20:
Lloh31:
	adrp	x0, l_.str.9@PAGE
Lloh32:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_DRM_INFO
	ldr	x8, [x19]
	cbz	x8, LBB0_24
LBB0_21:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_24
; %bb.22:
	mov	x0, x19
	blr	x8
	cbz	w0, LBB0_24
; %bb.23:
	mov	x21, x0
	str	xzr, [x19]
	b	LBB0_27
LBB0_24:
Lloh33:
	adrp	x1, _komeda_sysfs_attr_group@GOTPAGE
Lloh34:
	ldr	x1, [x1, _komeda_sysfs_attr_group@GOTPAGEOFF]
	mov	x0, x20
	bl	_sysfs_create_group
	cbz	w0, LBB0_29
; %bb.25:
	mov	x21, x0
Lloh35:
	adrp	x0, l_.str.10@PAGE
Lloh36:
	add	x0, x0, l_.str.10@PAGEOFF
LBB0_26:
	bl	_DRM_ERROR
LBB0_27:
	mov	x0, x19
	bl	_komeda_dev_destroy
LBB0_28:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_ERR_PTR
LBB0_29:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No registers defined.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Map register space failed.\n"

l_.str.2:                               ; @.str.2
	.asciz	"aclk"

l_.str.3:                               ; @.str.3
	.asciz	"Get engine clk failed.\n"

l_.str.4:                               ; @.str.4
	.asciz	"DT configured %x mismatch with real HW %x.\n"

l_.str.5:                               ; @.str.5
	.asciz	"Found ARM Mali-D%x version r%dp%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"enumerate display resource failed.\n"

l_.str.7:                               ; @.str.7
	.asciz	"parse device tree failed.\n"

l_.str.8:                               ; @.str.8
	.asciz	"assemble display pipelines failed.\n"

l_.str.9:                               ; @.str.9
	.asciz	"continue without IOMMU support!\n"

	.comm	_komeda_sysfs_attr_group,4,2    ; @komeda_sysfs_attr_group
l_.str.10:                              ; @.str.10
	.asciz	"create sysfs group failed.\n"

.subsections_via_symbols
