	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function komeda_layer_validate
_komeda_layer_validate:                 ## @komeda_layer_validate
	.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	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	16(%rsi), %r12
	movq	%r12, %rdi
	callq	_to_kfb
	movq	%rax, %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rbx
	movq	%rax, %rsi
	movq	%r14, %rdx
	callq	_komeda_layer_check_cfg
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_1
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r12, %r14
	movl	8(%r13), %esi
	movl	(%r13), %ecx
	movl	4(%r13), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_komeda_component_get_state_and_set_user
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.11:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movq	%r12, %rdi
	callq	_to_layer_st
	movq	%rbx, %r13
	movl	40(%rbx), %ecx
	movq	%rax, %rdx
	movl	%ecx, (%rax)
	cmpq	$0, 8(%r14)
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.3:
	movq	%r15, %r12
	movdqu	(%r15), %xmm0
	movq	8(%r13), %rcx
	movq	16(%r13), %rax
	movdqu	8(%r13), %xmm1
	movdqu	24(%r13), %xmm2
	paddq	%xmm1, %xmm2
	movdqa	%xmm0, %xmm1
	psubq	%xmm2, %xmm1
	jmp	LBB0_5
LBB0_4:
	movdqu	24(%r13), %xmm0
	pxor	%xmm1, %xmm1
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	movq	%r15, %r12
LBB0_5:
	movq	%rdx, %r15
	movdqu	%xmm0, 48(%rdx)
	movq	%rax, 40(%rdx)
	pextrq	$1, %xmm1, 32(%rdx)
	movq	%rcx, 24(%rdx)
	movq	%xmm1, 16(%rdx)
	movq	(%r14), %rax
	cmpl	$0, (%rax)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdx
	movq	16(%r13), %rsi
	movq	%r12, %rdi
	movl	%ebx, %ecx
	callq	_komeda_fb_get_pixel_addr
	movq	8(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movq	(%r14), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_komeda_component_validate_private
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rsi
	movq	%r13, %rbx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_komeda_component_set_output
	movl	(%r15), %esi
	movq	%r13, %rdi
	callq	_komeda_rotate_data_flow
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_komeda_layer_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function komeda_layer_validate
_komeda_layer_validate:                 ; @komeda_layer_validate
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x21, [x1, #16]
	mov	x0, x21
	bl	_to_kfb
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_komeda_layer_check_cfg
	cbz	w0, LBB0_2
LBB0_1:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldp	w2, w1, [x23, #4]
	ldr	w3, [x23]
	mov	x0, x20
	bl	_komeda_component_get_state_and_set_user
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_4:
	mov	x0, x23
	bl	_to_layer_st
	mov	x24, x0
	ldr	w8, [x19, #40]
	str	w8, [x0]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldp	x10, x8, [x22]
	ldp	x11, x9, [x19, #8]
	ldp	x13, x12, [x19, #24]
	add	x12, x9, x12
	sub	x12, x8, x12
	add	x13, x11, x13
	sub	x13, x10, x13
	b	LBB0_7
LBB0_6:
	mov	x9, #0
	mov	x12, #0
	mov	x11, #0
	mov	x13, #0
	ldp	x10, x8, [x19, #24]
LBB0_7:
	stp	x10, x8, [x24, #48]
	stp	x12, x9, [x24, #32]
	stp	x13, x11, [x24, #16]
	ldr	x8, [x21]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x25, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x2, x1, [x19, #8]
	mov	x0, x22
	mov	x3, x25
	bl	_komeda_fb_get_pixel_addr
	ldr	x8, [x24, #8]
	str	w0, [x8, x25, lsl #2]
	add	x25, x25, #1
	ldr	x8, [x21]
	ldrsw	x8, [x8]
	cmp	x25, x8
	b.lt	LBB0_9
LBB0_10:
	mov	x0, x20
	mov	x1, x23
	bl	_komeda_component_validate_private
	cbnz	w0, LBB0_1
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_komeda_component_set_output
	ldr	w1, [x24]
	mov	x0, x19
	bl	_komeda_rotate_data_flow
	mov	w0, #0
	b	LBB0_1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_komeda_layer_validate
.subsections_via_symbols
