	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gsc_dst_set_buf_seq
_gsc_dst_set_buf_seq:                   ## @gsc_dst_set_buf_seq
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	testl	%edx, %edx
	sete	%bl
	movq	_GSC_OUT_BASE_ADDR_Y_MASK@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_gsc_read
	movl	%r12d, %ecx
	shll	%cl, %ebx
	btrl	%r12d, %eax
	orl	%eax, %ebx
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_gsc_write
	movq	_GSC_OUT_BASE_ADDR_CB_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_gsc_write
	movq	_GSC_OUT_BASE_ADDR_CR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_gsc_write
	movq	%r14, %rdi
	callq	_gsc_dst_get_buf_seq
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	movq	_GSC_BUF_START@GOTPCREL(%rip), %rcx
	movl	$1, %esi
	cmpq	(%rcx), %rax
	jge	LBB0_2
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_GSC_BUF_STOP@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	jg	LBB0_4
LBB0_2:
	movq	%r14, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gsc_handle_irq                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GSC_OUT_BASE_ADDR_Y_MASK,4,2   ## @GSC_OUT_BASE_ADDR_Y_MASK
	.comm	_GSC_OUT_BASE_ADDR_CB_MASK,4,2  ## @GSC_OUT_BASE_ADDR_CB_MASK
	.comm	_GSC_OUT_BASE_ADDR_CR_MASK,4,2  ## @GSC_OUT_BASE_ADDR_CR_MASK
	.comm	_GSC_BUF_START,8,3              ## @GSC_BUF_START
	.comm	_GSC_BUF_STOP,8,3               ## @GSC_BUF_STOP
	.no_dead_strip	_gsc_dst_set_buf_seq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gsc_dst_set_buf_seq
_gsc_dst_set_buf_seq:                   ; @gsc_dst_set_buf_seq
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w2, #0
	cset	w22, eq
	mov	w8, #1
	lsl	w23, w8, w1
Lloh0:
	adrp	x24, _GSC_OUT_BASE_ADDR_Y_MASK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GSC_OUT_BASE_ADDR_Y_MASK@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_gsc_read
	bic	w8, w0, w23
	lsl	w9, w22, w21
	orr	w21, w8, w9
	ldr	w1, [x24]
	mov	x0, x21
	bl	_gsc_write
Lloh2:
	adrp	x8, _GSC_OUT_BASE_ADDR_CB_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GSC_OUT_BASE_ADDR_CB_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_gsc_write
Lloh5:
	adrp	x8, _GSC_OUT_BASE_ADDR_CR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GSC_OUT_BASE_ADDR_CR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_gsc_write
	mov	x0, x19
	bl	_gsc_dst_get_buf_seq
	cbz	w20, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _GSC_BUF_START@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GSC_BUF_START@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_4
; %bb.2:
	mov	w1, #1
	b	LBB0_6
LBB0_3:
Lloh11:
	adrp	x8, _GSC_BUF_STOP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GSC_BUF_STOP@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	w1, #0
LBB0_6:
	mov	x0, x19
	mov	w2, #0
	mov	w3, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_gsc_handle_irq
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GSC_OUT_BASE_ADDR_Y_MASK,4,2   ; @GSC_OUT_BASE_ADDR_Y_MASK
	.comm	_GSC_OUT_BASE_ADDR_CB_MASK,4,2  ; @GSC_OUT_BASE_ADDR_CB_MASK
	.comm	_GSC_OUT_BASE_ADDR_CR_MASK,4,2  ; @GSC_OUT_BASE_ADDR_CR_MASK
	.comm	_GSC_BUF_START,8,3              ; @GSC_BUF_START
	.comm	_GSC_BUF_STOP,8,3               ; @GSC_BUF_STOP
	.no_dead_strip	_gsc_dst_set_buf_seq
.subsections_via_symbols
