	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function dispmanx_surface_setup
LCPI0_0:
	.long	0x3f000000                      ## float 0.5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_dispmanx_surface_setup:                ## @dispmanx_surface_setup
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movss	%xmm0, -56(%rbp)                ## 4-byte Spill
	movq	%r9, %rbx
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -80(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	32(%rbp), %eax
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	40(%rbp), %r12
	movl	$1, %edi
	movl	$80, %esi
	callq	_calloc
	movq	%rax, %r14
	movq	%rax, (%r12)
	movq	_VC_IMAGE_XRGB8888@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, (%rax)
	movq	%r14, %r12
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	sete	%sil
	shll	$5, %esi
	addl	$32, %esi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movl	%r15d, %edi
	callq	_ALIGN_UP
	movl	%eax, 72(%r14)
	movq	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r14)
	movq	$0, 16(%r14)
	movl	(%r14), %ebx
	movl	%ebx, %edi
	movl	$4, %esi
	callq	_calloc
	movq	%rax, 40(%r14)
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%rax,%rbx)
	movq	%r12, 24(%rax,%rbx)
	movq	%r13, 16(%rax,%rbx)
	xorl	%eax, %eax
	callq	_slock_new
	movl	%eax, %ecx
	movq	40(%r12), %rax
	movl	%ecx, 8(%rax,%rbx)
	incq	%r15
	movslq	(%r12), %rcx
	addq	$32, %rbx
	cmpq	%rcx, %r15
	jl	LBB0_2
LBB0_3:
	leaq	8(%r14), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, 64(%r12)
	movl	$1, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cltd
	idivl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movss	(%r13), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	-56(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %ecx
	cvttss2si	%xmm0, %r8d
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	4(%r13), %eax
	cmpl	%ecx, %eax
	cmovll	%eax, %ecx
	subl	%ecx, %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	cvttps2dq	%xmm0, %xmm1
	cvtdq2ps	%xmm1, %xmm1
	subss	%xmm1, %xmm0
	mulss	LCPI0_0(%rip), %xmm0
	sarl	%esi
	cvttss2si	%xmm0, %edx
	leaq	48(%r14), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_vc_dispmanx_rect_set
	leaq	56(%r14), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	-80(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %r8d
	callq	_vc_dispmanx_rect_set
	addq	$32, %r14
	shll	$16, %ebx
	shll	$16, %r15d
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movl	%r15d, %r8d
	callq	_vc_dispmanx_rect_set
	cmpl	$0, (%r12)
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	jle	LBB0_6
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	16(%rax), %r15
	movl	$4, %r13d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rcx
	callq	_vc_dispmanx_resource_create
	movq	40(%r12), %rcx
	movl	%eax, (%rcx,%r13)
	incq	%r14
	movslq	(%r12), %rax
	addq	$32, %r13
	cmpq	%rax, %r14
	jl	LBB0_5
LBB0_6:
	xorl	%edi, %edi
	callq	_vc_dispmanx_update_start
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, 8(%rbx)
	movl	12(%rbx), %esi
	movq	40(%r12), %rcx
	movl	4(%rcx), %r8d
	movq	_DISPMANX_PROTECTION_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movl	%eax, %edi
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %r9                  ## 8-byte Reload
	pushq	$0
	pushq	$0
	pushq	-72(%rbp)                       ## 8-byte Folded Reload
	pushq	%r10
	callq	_vc_dispmanx_element_add
	addq	$32, %rsp
	movl	%eax, 52(%r12)
	movl	8(%rbx), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vc_dispmanx_update_submit_sync ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_IMAGE_XRGB8888,8,3          ## @VC_IMAGE_XRGB8888
	.comm	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS,4,2 ## @DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS
	.comm	_DISPMANX_PROTECTION_NONE,4,2   ## @DISPMANX_PROTECTION_NONE
	.no_dead_strip	_dispmanx_surface_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispmanx_surface_setup
_dispmanx_surface_setup:                ; @dispmanx_surface_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	mov	x24, x7
	fmov	s8, s0
	mov	x28, x6
	mov	x22, x5
	mov	x27, x4
	mov	x25, x3
	mov	x23, x2
	mov	x26, x1
	mov	x19, x0
	ldr	w8, [x29, #16]
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	ldr	x21, [x29, #24]
	mov	w0, #1
	mov	w1, #80
	bl	_calloc
	mov	x20, x0
	str	x0, [x21]
Lloh0:
	adrp	x8, _VC_IMAGE_XRGB8888@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_IMAGE_XRGB8888@GOTPAGEOFF]
	str	w24, [x0]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x22
	mov	w8, #32
	mov	w9, #64
	csel	w1, w9, w8, eq
	mov	x0, x25
	bl	_ALIGN_UP
	str	w0, [x20, #72]
Lloh3:
	adrp	x8, _DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x20
	str	w28, [x9, #8]!
	str	x9, [sp, #16]                   ; 8-byte Folded Spill
	str	w8, [x20, #24]
	str	xzr, [x20, #16]
	ldr	w28, [x20]
	mov	x0, x28
	mov	w1, #4
	bl	_calloc
	str	x0, [x20, #40]
	cmp	w28, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
	mov	x24, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x0, x21
	str	wzr, [x8]
	stp	x19, x20, [x8, #16]
	bl	_slock_new
	mov	x8, x0
	ldr	x0, [x20, #40]
	add	x9, x0, x21
	str	w8, [x9, #8]
	add	x24, x24, #1
	ldrsw	x8, [x20]
	add	x21, x21, #32
	cmp	x24, x8
	b.lt	LBB0_2
LBB0_3:
	str	x0, [x20, #64]
	mov	w8, #1
	str	w8, [x0]
	add	w8, w27, #7
	ldr	s0, [x19]
	fmul	s1, s0, s8
	fcvtzs	w9, s1
	cmp	w27, #0
	csel	w21, w8, w27, lt
	fcvtzs	w4, s0
	ldr	w8, [x19, #4]
	cmp	w8, w9
	csel	w3, w8, w9, lt
	sub	w8, w8, w3
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	fcvtzs	s1, s0
	scvtf	s1, s1
	fsub	s0, s0, s1
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	fcvtzs	w2, s0
	add	x27, x20, #48
	mov	x0, x27
	bl	_vc_dispmanx_rect_set
	add	x0, x20, #56
	mov	w1, #0
	mov	w2, #0
	mov	x3, x26
	mov	x4, x23
	bl	_vc_dispmanx_rect_set
	add	x28, x20, #32
	lsl	w3, w26, #16
	lsl	w4, w23, #16
	mov	x0, x28
	mov	w1, #0
	mov	w2, #0
	bl	_vc_dispmanx_rect_set
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x24, #0
	asr	w8, w21, #3
	add	x26, x19, #16
	mov	w21, #4
	sdiv	w25, w25, w8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x25
	mov	x2, x23
	mov	x3, x26
	bl	_vc_dispmanx_resource_create
	ldr	x8, [x20, #40]
	str	w0, [x8, x21]
	add	x24, x24, #1
	ldrsw	x8, [x20]
	add	x21, x21, #32
	cmp	x24, x8
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
	bl	_vc_dispmanx_update_start
	str	w0, [x19, #8]
	ldr	w1, [x19, #12]
	ldr	x8, [x20, #40]
	ldr	w4, [x8, #4]
Lloh6:
	adrp	x8, _DISPMANX_PROTECTION_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DISPMANX_PROTECTION_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	str	xzr, [sp]
	ldr	w2, [sp, #28]                   ; 4-byte Folded Reload
	mov	x3, x27
	mov	x5, x28
	ldr	x7, [sp, #16]                   ; 8-byte Folded Reload
	bl	_vc_dispmanx_element_add
	str	w0, [x20, #52]
	ldr	w0, [x19, #8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_vc_dispmanx_update_submit_sync
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_IMAGE_XRGB8888,8,3          ; @VC_IMAGE_XRGB8888
	.comm	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS,4,2 ; @DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS
	.comm	_DISPMANX_PROTECTION_NONE,4,2   ; @DISPMANX_PROTECTION_NONE
	.no_dead_strip	_dispmanx_surface_setup
.subsections_via_symbols
