	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_surface_free
_drm_surface_free:                      ## @drm_surface_free
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	(%rsi), %rbx
	movl	(%rbx), %ecx
	movq	8(%rbx), %rdi
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.1:
	leaq	-1(%rcx), %rdx
	movl	%ecx, %eax
	andl	$3, %eax
	cmpq	$3, %rdx
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %ecx
	leaq	52(%rdi), %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -48(%rsi)
	movl	$0, -32(%rsi)
	movl	$0, -16(%rsi)
	movl	$0, (%rsi)
	addq	$4, %rdx
	addq	$64, %rsi
	cmpq	%rdx, %rcx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	shlq	$4, %rdx
	leaq	(%rdi,%rdx), %rcx
	addq	$4, %rcx
	shlq	$4, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rcx,%rdx)
	addq	$16, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_7
LBB0_8:
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	$0, (%r14)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_drm_surface_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_surface_free
_drm_surface_free:                      ; @drm_surface_free
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x20, [x1]
	ldr	w8, [x20]
	ldr	x0, [x20, #8]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	cmp	w8, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x9, #0
	b	LBB0_6
LBB0_3:
	and	x9, x8, #0xfffffffc
	add	x10, x0, #36
	mov	x11, x9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	stur	wzr, [x10, #-32]
	stur	wzr, [x10, #-16]
	str	wzr, [x10]
	str	wzr, [x10, #16]
	add	x10, x10, #64
	subs	x11, x11, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x9, x8
	b.eq	LBB0_8
LBB0_6:
	add	x10, x0, x9, lsl #4
	add	x10, x10, #4
	sub	x8, x8, x9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x10], #16
	subs	x8, x8, #1
	b.ne	LBB0_7
LBB0_8:
	bl	_free
	mov	x0, x20
	bl	_free
	str	xzr, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_drm_surface_free
.subsections_via_symbols
