	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_fb_check_src_coords     ## -- Begin function komeda_fb_check_src_coords
	.p2align	4, 0x90
_komeda_fb_check_src_coords:            ## @komeda_fb_check_src_coords
	.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	%r8, %r12
	movq	%rcx, %r13
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	16(%rdi), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	callq	_drm_format_info_block_width
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rdi
	xorl	%esi, %esi
	callq	_drm_format_info_block_height
	movq	%rax, %rdi
	leaq	(%r14,%r13), %rax
	cmpq	(%r15), %rax
	jg	LBB0_2
## %bb.1:
	movq	%rbx, %r10
	leaq	(%r12,%rbx), %rax
	cmpq	8(%r15), %rax
	jle	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_39
LBB0_3:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rsi
	movq	%r14, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r14, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	LBB0_19
	jmp	LBB0_7
LBB0_4:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_19
LBB0_7:
	movq	%r13, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:
	movq	%r13, %rax
	cqto
	idivq	%rsi
	testq	%rdx, %rdx
	jne	LBB0_19
	jmp	LBB0_11
LBB0_8:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_19
LBB0_11:
	movq	8(%rbx), %rsi
	movq	%r10, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_12
## %bb.13:
	movq	%r10, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_14
LBB0_12:
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_14:
	testq	%rdx, %rdx
	jne	LBB0_19
## %bb.15:
	movq	%r12, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.17:
	movq	%r12, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_18
LBB0_16:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_18:
	testq	%rdx, %rdx
	je	LBB0_20
LBB0_19:
	movl	16(%rbx), %r9d
	leaq	L_.str.1(%rip), %rdi
LBB0_38:
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	movq	%r10, %rdx
	movq	%r13, %rcx
	movq	%r12, %r8
	xorl	%eax, %eax
	callq	_DRM_DEBUG_ATOMIC
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_39:
	subl	(%rax), %ebx
LBB0_40:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r14, %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:
	movq	%r14, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_23
LBB0_21:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_23:
	testq	%rdx, %rdx
	jne	LBB0_37
## %bb.24:
	movq	%rsi, %rax
	orq	%r13, %rax
	shrq	$32, %rax
	je	LBB0_25
## %bb.26:
	movq	%r13, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_27
LBB0_25:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_27:
	testq	%rdx, %rdx
	jne	LBB0_37
## %bb.28:
	movq	%r10, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_29
## %bb.30:
	movq	%r10, %rax
	cqto
	idivq	%rdi
	jmp	LBB0_31
LBB0_29:
	movl	%r10d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_31:
	testq	%rdx, %rdx
	jne	LBB0_37
## %bb.32:
	movq	%rdi, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_33
## %bb.34:
	movq	%r12, %rax
	cqto
	idivq	%rdi
	jmp	LBB0_35
LBB0_33:
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_35:
	testq	%rdx, %rdx
	je	LBB0_36
LBB0_37:
	movl	16(%rbx), %r9d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_38
LBB0_36:
	xorl	%ebx, %ebx
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid source coordinate.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Wrong subsampling dimension x:%d, y:%d, w:%d, h:%d for format: %x.\n"

L_.str.2:                               ## @.str.2
	.asciz	"x:%d, y:%d, w:%d, h:%d should be multiple of block_w/h for format: %x.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_komeda_fb_check_src_coords     ; -- Begin function komeda_fb_check_src_coords
	.p2align	2
_komeda_fb_check_src_coords:            ; @komeda_fb_check_src_coords
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x1
	mov	x25, x0
	ldr	x23, [x0, #16]
	mov	x0, x23
	mov	w1, #0
	bl	_drm_format_info_block_width
	mov	x24, x0
	ldr	x0, [x25, #16]
	mov	w1, #0
	bl	_drm_format_info_block_height
	ldr	x8, [x25]
	add	x9, x21, x19
	cmp	x9, x8
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x25, #8]
	add	x9, x22, x20
	cmp	x9, x8
	b.le	LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_3:
	ldr	x8, [x23]
	sdiv	x9, x19, x8
	msub	x9, x9, x8, x19
	cbnz	x9, LBB0_7
; %bb.4:
	sdiv	x9, x21, x8
	msub	x8, x9, x8, x21
	cbnz	x8, LBB0_7
; %bb.5:
	ldr	x8, [x23, #8]
	sdiv	x9, x20, x8
	msub	x9, x9, x8, x20
	cbnz	x9, LBB0_7
; %bb.6:
	sdiv	x9, x22, x8
	msub	x8, x9, x8, x22
	cbz	x8, LBB0_10
LBB0_7:
	ldr	w8, [x23, #16]
	stp	x22, x8, [sp, #24]
	stp	x20, x21, [sp, #8]
	str	x19, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_DRM_DEBUG_ATOMIC
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	sdiv	x8, x19, x24
	msub	x8, x8, x24, x19
	cbnz	x8, LBB0_14
; %bb.11:
	sdiv	x8, x21, x24
	msub	x8, x8, x24, x21
	cbnz	x8, LBB0_14
; %bb.12:
	sdiv	x8, x20, x0
	msub	x8, x8, x0, x20
	cbnz	x8, LBB0_14
; %bb.13:
	sdiv	x8, x22, x0
	msub	x8, x8, x0, x22
	cbz	x8, LBB0_15
LBB0_14:
	ldr	w8, [x23, #16]
	stp	x22, x8, [sp, #24]
	stp	x20, x21, [sp, #8]
	str	x19, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_15:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid source coordinate.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Wrong subsampling dimension x:%d, y:%d, w:%d, h:%d for format: %x.\n"

l_.str.2:                               ; @.str.2
	.asciz	"x:%d, y:%d, w:%d, h:%d should be multiple of block_w/h for format: %x.\n"

.subsections_via_symbols
