	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspitexutil_create_native_window ## -- Begin function raspitexutil_create_native_window
	.p2align	4, 0x90
_raspitexutil_create_native_window:     ## @raspitexutil_create_native_window
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	$0, -72(%rbp)
	movl	$0, -48(%rbp)
	movq	$0, -56(%rbp)
	movl	$0, -96(%rbp)
	movl	48(%rdi), %eax
	movl	%eax, -76(%rbp)
	movq	(%rdi), %r14
	movq	40(%rdi), %r10
	movq	%r10, %xmm0
	movq	%r14, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movq	%r14, %rbx
	shrq	$32, %rbx
	movdqa	%xmm1, -112(%rbp)
	movq	_VCOS_FUNCTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r10, %rax
	shrq	$32, %rax
	leaq	L_.str(%rip), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	%r14
	pushq	%r10
	pushq	%rax
	callq	_vcos_log_trace
	addq	$32, %rsp
	shll	$16, %r14d
	movl	%r14d, -64(%rbp)
	shll	$16, %ebx
	movl	%ebx, -60(%rbp)
	xorl	%edi, %edi
	callq	_vc_dispmanx_display_open
	movq	%rax, 8(%r13)
	movq	_DISPMANX_NO_HANDLE@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	xorl	%edi, %edi
	callq	_vc_dispmanx_update_start
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_5:
	movq	%rax, %r15
	movq	8(%r13), %rsi
	movq	_DISPMANX_PROTECTION_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DISPMANX_NO_ROTATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	leaq	-80(%rbp), %r10
	leaq	-112(%rbp), %rcx
	xorl	%r14d, %r14d
	leaq	-64(%rbp), %r9
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	pushq	%rbx
	pushq	$0
	pushq	%r10
	pushq	%rax
	callq	_vc_dispmanx_element_add
	addq	$32, %rsp
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
LBB0_2:
	callq	_vcos_log_error
	movl	$-1, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	16(%r13), %rbx
	movq	%rax, 24(%r13)
	movq	(%r13), %rax
	movq	%rax, 16(%r13)
	movq	%r15, %rdi
	callq	_vc_dispmanx_update_submit_sync
	movq	%rbx, 32(%r13)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS,4,2 ## @DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %d,%d,%d,%d %d,%d,0x%x,0x%x"

	.comm	_VCOS_FUNCTION,4,2              ## @VCOS_FUNCTION
	.comm	_DISPMANX_NO_HANDLE,8,3         ## @DISPMANX_NO_HANDLE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to open display handle"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to open update handle"

	.comm	_DISPMANX_PROTECTION_NONE,4,2   ## @DISPMANX_PROTECTION_NONE
	.comm	_DISPMANX_NO_ROTATE,4,2         ## @DISPMANX_NO_ROTATE
L_.str.3:                               ## @.str.3
	.asciz	"Failed to create element handle"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_raspitexutil_create_native_window ; -- Begin function raspitexutil_create_native_window
	.p2align	2
_raspitexutil_create_native_window:     ; @raspitexutil_create_native_window
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stur	xzr, [x29, #-40]
	str	wzr, [sp, #72]
	str	xzr, [sp, #64]
	str	wzr, [sp, #48]
	ldr	w9, [x0, #48]
	stp	w8, w9, [x29, #-48]
	ldr	d0, [x0, #40]
Lloh3:
	adrp	x8, _VCOS_FUNCTION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCOS_FUNCTION@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	d2, [x0]
	mov.16b	v1, v2
	mov.d	v1[1], v0[0]
	stp	q2, q1, [sp, #16]               ; 16-byte Folded Spill
	mov.s	w6, v0[1]
	fmov	w7, s0
	str	d2, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_vcos_log_trace
	ldr	q0, [sp, #16]                   ; 16-byte Folded Reload
	shl.2s	v0, v0, #16
	str	d0, [sp, #56]
	mov	w0, #0
	bl	_vc_dispmanx_display_open
	str	x0, [x19, #8]
Lloh8:
	adrp	x21, _DISPMANX_NO_HANDLE@GOTPAGE
Lloh9:
	ldr	x21, [x21, _DISPMANX_NO_HANDLE@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_2:
	mov	w0, #0
	bl	_vc_dispmanx_update_start
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:
	mov	x20, x0
	ldr	x1, [x19, #8]
Lloh14:
	adrp	x8, _DISPMANX_PROTECTION_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DISPMANX_PROTECTION_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w6, [x8]
Lloh17:
	adrp	x8, _DISPMANX_NO_ROTATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DISPMANX_NO_ROTATE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	str	xzr, [sp]
	add	x3, sp, #32
	add	x5, sp, #56
	sub	x7, x29, #48
	mov	w2, #0
	mov	w4, #0
	bl	_vc_dispmanx_element_add
	ldr	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.5:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_6:
	bl	_vcos_log_error
	mov	w0, #-1
LBB0_7:
	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
	add	sp, sp, #144
	ret
LBB0_8:
	ldr	d0, [x19]
	str	d0, [x19, #16]!
	str	x0, [x19, #8]
	mov	x0, x20
	bl	_vc_dispmanx_update_submit_sync
	mov	w0, #0
	str	x19, [x19, #16]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS,4,2 ; @DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %d,%d,%d,%d %d,%d,0x%x,0x%x"

	.comm	_VCOS_FUNCTION,4,2              ; @VCOS_FUNCTION
	.comm	_DISPMANX_NO_HANDLE,8,3         ; @DISPMANX_NO_HANDLE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to open display handle"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to open update handle"

	.comm	_DISPMANX_PROTECTION_NONE,4,2   ; @DISPMANX_PROTECTION_NONE
	.comm	_DISPMANX_NO_ROTATE,4,2         ; @DISPMANX_NO_ROTATE
l_.str.3:                               ; @.str.3
	.asciz	"Failed to create element handle"

.subsections_via_symbols
