	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdcs_set_size
_hdcs_set_size:                         ## @hdcs_set_size
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	addl	$3, %r15d
	andl	$-4, %r15d
	addl	$3, %ebx
	andl	$-4, %ebx
	movl	8(%r12), %eax
	cmpl	%eax, %r15d
	cmovael	%eax, %r15d
	callq	_IS_1020
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_HDCS_1020_BOTTOM_Y_SKIP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	12(%r12), %edx
	movl	16(%r12), %eax
	leal	(%rcx,%rdx,2), %edx
	movl	%eax, %r13d
	subl	%edx, %r13d
	addl	%ebx, %edx
	cmpl	%eax, %edx
	cmovbel	%ebx, %r13d
	addl	%r13d, %ecx
	subl	%ecx, %eax
	shrl	%eax
	addl	20(%r12), %eax
	jmp	LBB0_3
LBB0_2:
	movl	16(%r12), %eax
	cmpl	%eax, %ebx
	cmovael	%eax, %ebx
	subl	%ebx, %eax
	shrl	%eax
	addl	20(%r12), %eax
	movl	%ebx, %r13d
LBB0_3:
	movl	8(%r12), %ecx
	subl	%r15d, %ecx
	shrl	%ecx
	addl	24(%r12), %ecx
	movl	%eax, %edx
	shrl	$2, %edx
	movl	%edx, -64(%rbp)
	movl	%ecx, %edx
	shrl	$2, %edx
	movl	%edx, -60(%rbp)
	addl	%r13d, %eax
	shrl	$2, %eax
	decl	%eax
	movl	%eax, -56(%rbp)
	addl	%r15d, %ecx
	shrl	$2, %ecx
	decl	%ecx
	movl	%ecx, -52(%rbp)
	movq	_HDCS_FWROW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	$4, %ecx
	callq	_hdcs_reg_write_seq
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movl	%r15d, (%r12)
	movl	%r13d, 4(%r12)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_HDCS_1020_BOTTOM_Y_SKIP,4,2    ## @HDCS_1020_BOTTOM_Y_SKIP
	.comm	_HDCS_FWROW,4,2                 ## @HDCS_FWROW
	.no_dead_strip	_hdcs_set_size
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdcs_set_size
_hdcs_set_size:                         ; @hdcs_set_size
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x20, [x0]
	add	w8, w1, #3
	and	w8, w8, #0xfffffffc
	add	w9, w2, #3
	and	w22, w9, #0xfffffffc
	ldr	w9, [x20, #8]
	cmp	w8, w9
	csel	w21, w8, w9, lo
	bl	_IS_1020
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _HDCS_1020_BOTTOM_Y_SKIP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDCS_1020_BOTTOM_Y_SKIP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w10, [x20, #12]
	add	w9, w8, w9, lsl #1
	sub	w11, w10, w9
	add	w9, w9, w22
	cmp	w9, w10
	csel	w22, w11, w22, hi
	add	w8, w8, w22
	sub	w8, w10, w8
	ldr	w9, [x20, #20]
	b	LBB0_3
LBB0_2:
	ldp	w8, w9, [x20, #16]
	cmp	w22, w8
	csel	w22, w22, w8, lo
	sub	w8, w8, w22
LBB0_3:
	add	w8, w9, w8, lsr #1
	ldr	w9, [x20, #24]
	ldr	w10, [x20, #8]
	sub	w10, w10, w21
	add	w9, w9, w10, lsr #1
	lsr	w10, w8, #2
	lsr	w11, w9, #2
	stp	w10, w11, [sp, #8]
	add	w8, w8, w22
	lsr	w8, w8, #2
	sub	w8, w8, #1
	add	w9, w9, w21
	lsr	w9, w9, #2
	sub	w9, w9, #1
	stp	w8, w9, [sp, #16]
Lloh6:
	adrp	x8, _HDCS_FWROW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDCS_FWROW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	w3, #4
	bl	_hdcs_reg_write_seq
	tbnz	w0, #31, LBB0_5
; %bb.4:
	stp	w21, w22, [x20]
LBB0_5:
	ldr	x8, [sp, #24]
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_7
; %bb.6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HDCS_1020_BOTTOM_Y_SKIP,4,2    ; @HDCS_1020_BOTTOM_Y_SKIP
	.comm	_HDCS_FWROW,4,2                 ; @HDCS_FWROW
	.no_dead_strip	_hdcs_set_size
.subsections_via_symbols
