	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_kms_attach              ## -- Begin function komeda_kms_attach
	.p2align	4, 0x90
_komeda_kms_attach:                     ## @komeda_kms_attach
	.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	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movq	%rax, %r14
	addq	$8, %r14
	movl	(%r15), %edx
	movq	_komeda_kms_driver@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_drm_dev_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movq	%r15, 16(%r12)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_komeda_kms_mode_config_init
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_komeda_kms_add_private_objs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.4:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_komeda_kms_add_planes
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_drm_vblank_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.6:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_komeda_kms_add_crtcs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_komeda_kms_add_wb_connectors
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.8:
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_component_bind_all
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	movq	%r14, %rdi
	callq	_drm_mode_config_reset
	movl	32(%r12), %edi
	movl	16(%r15), %esi
	movq	_komeda_kms_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	24(%r12), %rax
	movl	(%rax), %r8d
	movq	%r14, %r9
	callq	_devm_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.10:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movl	$1, (%r14)
	movq	%r14, %rdi
	callq	_drm_kms_helper_poll_init
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_drm_dev_register
	testl	%eax, %eax
	je	LBB0_17
## %bb.12:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_drm_kms_helper_poll_fini
	movl	$0, (%r14)
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*8(%rax)
LBB0_13:
	movl	(%r15), %edi
	movq	%r14, %rsi
	callq	_component_unbind_all
LBB0_14:
	movq	%r14, %rdi
	callq	_drm_mode_config_cleanup
	movq	%r12, %rdi
	callq	_komeda_kms_cleanup_private_objs
	movq	$0, 16(%r12)
	movq	%r14, %rdi
	callq	_drm_dev_put
LBB0_15:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_16
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_16:
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_17:
	movq	%r12, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_komeda_kms_driver,4,2          ## @komeda_kms_driver
	.comm	_komeda_kms_irq_handler,4,2     ## @komeda_kms_irq_handler
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_kms_attach              ; -- Begin function komeda_kms_attach
	.p2align	2
_komeda_kms_attach:                     ; @komeda_kms_attach
	.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	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_15
; %bb.1:
	mov	x19, x0
	add	x20, x0, #8
	ldr	w2, [x21]
Lloh3:
	adrp	x1, _komeda_kms_driver@GOTPAGE
Lloh4:
	ldr	x1, [x1, _komeda_kms_driver@GOTPAGEOFF]
	mov	x0, x20
	bl	_drm_dev_init
	mov	x22, x0
	cbnz	w0, LBB0_14
; %bb.2:
	str	x21, [x19, #16]
	mov	x0, x19
	mov	x1, x21
	bl	_komeda_kms_mode_config_init
	mov	x0, x19
	mov	x1, x21
	bl	_komeda_kms_add_private_objs
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_komeda_kms_add_planes
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_drm_vblank_init
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_komeda_kms_add_crtcs
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_komeda_kms_add_wb_connectors
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.7:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_component_bind_all
	mov	x22, x0
	cbnz	w0, LBB0_13
; %bb.8:
	mov	x0, x20
	bl	_drm_mode_config_reset
	ldr	w0, [x19, #32]
	ldr	w1, [x21, #16]
Lloh5:
	adrp	x8, _komeda_kms_irq_handler@GOTPAGE
Lloh6:
	ldr	x8, [x8, _komeda_kms_irq_handler@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	ldr	x8, [x19, #24]
	ldr	w4, [x8]
	mov	x5, x20
	bl	_devm_request_irq
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.9:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.10:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x20
	bl	_drm_kms_helper_poll_init
	mov	x0, x20
	mov	w1, #0
	bl	_drm_dev_register
	cbz	w0, LBB0_17
; %bb.11:
	mov	x22, x0
	mov	x0, x20
	bl	_drm_kms_helper_poll_fini
	str	wzr, [x20]
	ldr	x8, [x21, #8]
	ldr	x8, [x8, #8]
	mov	x0, x21
	blr	x8
LBB0_12:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_component_unbind_all
LBB0_13:
	mov	x0, x20
	bl	_drm_mode_config_cleanup
	mov	x0, x19
	bl	_komeda_kms_cleanup_private_objs
	str	xzr, [x19, #16]
	mov	x0, x20
	bl	_drm_dev_put
LBB0_14:
	mov	x0, x19
	bl	_kfree
	b	LBB0_16
LBB0_15:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	mov	x0, x22
	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
	b	_ERR_PTR
LBB0_17:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_komeda_kms_driver,4,2          ; @komeda_kms_driver
	.comm	_komeda_kms_irq_handler,4,2     ; @komeda_kms_irq_handler
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
.subsections_via_symbols
