	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function komeda_wb_connector_add
_komeda_wb_connector_add:               ## @komeda_wb_connector_add
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	movl	$0, -44(%rbp)
	movq	16(%rsi), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %rbx
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %r14
	addq	$8, %r14
	leaq	8(%r15), %rdi
	callq	_drm_crtc_index
	movl	%eax, %edi
	callq	_BIT
	movl	%eax, 12(%rbx)
	movq	(%rbx), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	callq	_komeda_get_layer_fourcc_list
	movq	%rax, %r13
	movl	-44(%rbp), %r9d
	movq	_komeda_wb_connector_funcs@GOTPCREL(%rip), %rdx
	movq	_komeda_wb_encoder_helper_funcs@GOTPCREL(%rip), %rcx
	movq	%r12, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movq	%rax, %r8
	callq	_drm_writeback_connector_init
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_komeda_put_fourcc_list
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r12d, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	_komeda_wb_conn_helper_funcs@GOTPCREL(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_drm_connector_helper_add
	movq	%rbx, (%r15)
	xorl	%eax, %eax
LBB0_6:
	addq	$24, %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	_komeda_wb_connector_funcs,4,2  ## @komeda_wb_connector_funcs
	.comm	_komeda_wb_encoder_helper_funcs,4,2 ## @komeda_wb_encoder_helper_funcs
	.comm	_komeda_wb_conn_helper_funcs,4,2 ## @komeda_wb_conn_helper_funcs
	.no_dead_strip	_komeda_wb_connector_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function komeda_wb_connector_add
_komeda_wb_connector_add:               ; @komeda_wb_connector_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x23, [x0]
	str	wzr, [sp, #12]
	ldr	x8, [x1, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	str	x8, [x0]
	add	x22, x0, #8
	add	x0, x19, #8
	bl	_drm_crtc_index
	bl	_BIT
	str	w0, [x20, #12]
	ldr	x8, [x20]
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x23
	bl	_komeda_get_layer_fourcc_list
	mov	x23, x0
	ldr	w5, [sp, #12]
Lloh3:
	adrp	x2, _komeda_wb_connector_funcs@GOTPAGE
Lloh4:
	ldr	x2, [x2, _komeda_wb_connector_funcs@GOTPAGEOFF]
Lloh5:
	adrp	x3, _komeda_wb_encoder_helper_funcs@GOTPAGE
Lloh6:
	ldr	x3, [x3, _komeda_wb_encoder_helper_funcs@GOTPAGEOFF]
	mov	x0, x21
	mov	x1, x22
	mov	x4, x23
	bl	_drm_writeback_connector_init
	mov	x21, x0
	mov	x0, x23
	bl	_komeda_put_fourcc_list
	cbz	w21, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_kfree
	b	LBB0_7
LBB0_4:
	mov	w21, #0
	b	LBB0_7
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
Lloh10:
	adrp	x1, _komeda_wb_conn_helper_funcs@GOTPAGE
Lloh11:
	ldr	x1, [x1, _komeda_wb_conn_helper_funcs@GOTPAGEOFF]
	mov	x0, x22
	bl	_drm_connector_helper_add
	str	x20, [x19]
LBB0_7:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_komeda_wb_connector_funcs,4,2  ; @komeda_wb_connector_funcs
	.comm	_komeda_wb_encoder_helper_funcs,4,2 ; @komeda_wb_encoder_helper_funcs
	.comm	_komeda_wb_conn_helper_funcs,4,2 ; @komeda_wb_conn_helper_funcs
	.no_dead_strip	_komeda_wb_connector_add
.subsections_via_symbols
