	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_check_tex_size             ## -- Begin function vc4_check_tex_size
	.p2align	4, 0x90
_vc4_check_tex_size:                    ## @vc4_check_tex_size
	.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
	movl	%r9d, %r13d
	movl	%r8d, %r12d
	movl	%ecx, %r14d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %ebx
	movl	%ebx, %edi
	callq	_utile_width
	movl	%eax, %r15d
	movl	%ebx, %edi
	callq	_utile_height
	movl	%r13d, %edx
	cmpl	$4096, %r12d                    ## imm = 0x1000
	jg	LBB0_2
## %bb.1:
	cmpl	$4097, %edx                     ## imm = 0x1001
	jge	LBB0_2
## %bb.3:
	cmpl	$128, %r14d
	je	LBB0_9
## %bb.4:
	cmpl	$129, %r14d
	je	LBB0_7
## %bb.5:
	cmpl	$130, %r14d
	jne	LBB0_8
## %bb.6:
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%edx, %r15d
	callq	_round_up
	movl	%eax, %r14d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %eax
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_14
LBB0_9:
	shll	$3, %r15d
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%edx, %r15d
	movl	%eax, %r13d
	callq	_round_up
	movl	%eax, %r14d
	shll	$3, %r13d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_round_up
	jmp	LBB0_10
LBB0_7:
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%edx, %r15d
	movl	%eax, %r14d
	callq	_round_up
	movl	%eax, %r13d
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	movl	%r14d, %esi
	callq	_round_up
	movl	%r13d, %r14d
LBB0_10:
	imull	%eax, %ebx
	imull	%r14d, %ebx
	movq	-64(%rbp), %r11                 ## 8-byte Reload
	testl	%r11d, %r11d
	js	LBB0_11
## %bb.12:
	leal	(%rbx,%r11), %ecx
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %r10d
	movl	$1, %r13d
	cmpl	%r10d, %ecx
	jg	LBB0_13
	jmp	LBB0_14
LBB0_11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %r10d
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r14d, %ecx
	movl	%eax, %r8d
	movl	%ebx, %r9d
	xorl	%eax, %eax
	pushq	%r10
	pushq	%r11
	callq	_DRM_DEBUG
	addq	$16, %rsp
	jmp	LBB0_14
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
LBB0_14:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Surface dimensions (%d,%d) too large"

L_.str.1:                               ## @.str.1
	.asciz	"buffer tiling %d unsupported\n"

L_.str.2:                               ## @.str.2
	.asciz	"Overflow in %dx%d (%dx%d) fbo size (%d + %d > %zd)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vc4_check_tex_size             ; -- Begin function vc4_check_tex_size
	.p2align	2
_vc4_check_tex_size:                    ; @vc4_check_tex_size
	.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	x23, x6
	mov	x20, x5
	mov	x19, x4
	mov	x24, x3
	mov	x21, x2
	mov	x22, x1
	mov	x0, x6
	bl	_utile_width
	mov	x26, x0
	mov	x0, x23
	bl	_utile_height
	cmp	w19, #1, lsl #12                ; =4096
	b.gt	LBB0_6
; %bb.1:
	cmp	w20, #1, lsl #12                ; =4096
	b.gt	LBB0_6
; %bb.2:
	mov	x25, x0
	cmp	w24, #128
	b.eq	LBB0_7
; %bb.3:
	cmp	w24, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	w24, #130
	b.ne	LBB0_18
; %bb.5:
	mov	x0, x19
	mov	x1, x26
	bl	_round_up
	mov	x24, x0
	mov	x0, x20
	b	LBB0_10
LBB0_6:
	str	x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_15
LBB0_7:
	lsl	w1, w26, #3
	mov	x0, x19
	bl	_round_up
	mov	x24, x0
	lsl	w1, w25, #3
	mov	x0, x20
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, x26
	bl	_round_up
	mov	x24, x0
	mov	x0, x20
	mov	x1, x25
LBB0_9:
	bl	_round_up
                                        ; kill: def $w0 killed $w0 def $x0
LBB0_10:
	mul	w8, w0, w23
	mul	w8, w8, w24
	tbnz	w21, #31, LBB0_13
; %bb.11:
	ldr	w9, [x22]
	add	w10, w8, w21
	cmp	w10, w9
	b.gt	LBB0_14
; %bb.12:
	mov	w0, #1
	b	LBB0_17
LBB0_13:
	ldr	w9, [x22]
LBB0_14:
	stp	x21, x9, [sp, #32]
	stp	x0, x8, [sp, #16]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x20, x24, [sp]
Lloh2:
	adrp	x0, l_.str.2@PAGE
Lloh3:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_15:
	mov	x1, x19
LBB0_16:
	bl	_DRM_DEBUG
	mov	w0, #0
LBB0_17:
	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_18:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Surface dimensions (%d,%d) too large"

l_.str.1:                               ; @.str.1
	.asciz	"buffer tiling %d unsupported\n"

l_.str.2:                               ; @.str.2
	.asciz	"Overflow in %dx%d (%dx%d) fbo size (%d + %d > %zd)\n"

.subsections_via_symbols
