	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_layer_set_output_window
_sunxi_layer_set_output_window:         ## @sunxi_layer_set_output_window
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$64, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movl	%esi, -64(%rbp)
	movl	%edx, -60(%rbp)
	movl	%ecx, -56(%rbp)
	movl	%r8d, -52(%rbp)
	movl	$-1, %eax
	testl	%r8d, %r8d
	jle	LBB0_4
## %bb.1:
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.2:
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	js	LBB0_4
## %bb.3:
	movl	%esi, 8(%rdi)
	movl	%edx, 12(%rdi)
	movq	16(%rdi), %rax
	movq	%rax, -48(%rbp)
	movq	%rcx, -40(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -32(%rbp)
	movl	24(%rdi), %edi
	movq	_DISP_CMD_LAYER_SET_SCN_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-8(%rbp), %rcx
	jne	LBB0_6
## %bb.5:
	addq	$64, %rsp
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DISP_CMD_LAYER_SET_SCN_WINDOW,4,2 ## @DISP_CMD_LAYER_SET_SCN_WINDOW
	.no_dead_strip	_sunxi_layer_set_output_window
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_layer_set_output_window
_sunxi_layer_set_output_window:         ; @sunxi_layer_set_output_window
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-8]
	stp	w1, w2, [sp, #8]
	stp	w3, w4, [sp, #16]
	mov	w0, #-1
	cmp	w4, #1
	b.lt	LBB0_4
; %bb.1:
	cmp	w3, #1
	b.lt	LBB0_4
; %bb.2:
	ldr	x9, [x8]
	tbnz	x9, #63, LBB0_4
; %bb.3:
	stp	w1, w2, [x8, #8]
	ldr	x10, [x8, #16]
	stp	x10, x9, [sp, #24]
	add	x9, sp, #8
	str	x9, [sp, #40]
	ldr	w0, [x8, #24]
Lloh3:
	adrp	x8, _DISP_CMD_LAYER_SET_SCN_WINDOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISP_CMD_LAYER_SET_SCN_WINDOW@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_ioctl
LBB0_4:
	ldur	x8, [x29, #-8]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DISP_CMD_LAYER_SET_SCN_WINDOW,4,2 ; @DISP_CMD_LAYER_SET_SCN_WINDOW
	.no_dead_strip	_sunxi_layer_set_output_window
.subsections_via_symbols
