	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sunxi_layer_change_work_mode
_sunxi_layer_change_work_mode:          ## @sunxi_layer_change_work_mode
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movdqu	(%rdi), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqa	%xmm0, -64(%rbp)
	leaq	-72(%rbp), %r15
	movq	%r15, -48(%rbp)
	movl	16(%rdi), %edi
	movq	_DISP_CMD_LAYER_GET_PARA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%r14d, -72(%rbp)
	movdqu	(%rbx), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqa	%xmm0, -64(%rbp)
	movq	%r15, -48(%rbp)
	movl	16(%rbx), %edi
	movq	_DISP_CMD_LAYER_SET_PARA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DISP_CMD_LAYER_GET_PARA,4,2    ## @DISP_CMD_LAYER_GET_PARA
	.comm	_DISP_CMD_LAYER_SET_PARA,4,2    ## @DISP_CMD_LAYER_SET_PARA
	.no_dead_strip	_sunxi_layer_change_work_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sunxi_layer_change_work_mode
_sunxi_layer_change_work_mode:          ; @sunxi_layer_change_work_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	q0, [x0]
	ext.16b	v0, v0, v0, #8
	str	q0, [sp, #16]
	add	x21, sp, #8
	str	x21, [sp, #32]
	ldr	w0, [x0, #16]
Lloh3:
	adrp	x8, _DISP_CMD_LAYER_GET_PARA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISP_CMD_LAYER_GET_PARA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	tbnz	w0, #31, LBB0_2
; %bb.1:
	str	w20, [sp, #8]
	ldr	q0, [x19]
	ext.16b	v0, v0, v0, #8
	str	q0, [sp, #16]
	str	x21, [sp, #32]
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _DISP_CMD_LAYER_SET_PARA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DISP_CMD_LAYER_SET_PARA@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DISP_CMD_LAYER_GET_PARA,4,2    ; @DISP_CMD_LAYER_GET_PARA
	.comm	_DISP_CMD_LAYER_SET_PARA,4,2    ; @DISP_CMD_LAYER_SET_PARA
	.no_dead_strip	_sunxi_layer_change_work_mode
.subsections_via_symbols
