	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_set_prefbuf                ## -- Begin function gsc_set_prefbuf
	.p2align	4, 0x90
_gsc_set_prefbuf:                       ## @gsc_set_prefbuf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movl	8(%rsi), %esi
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	cmpl	$3, %eax
	je	LBB0_4
## %bb.1:
	movq	(%rbx), %rdi
	movl	(%rdi), %edx
	xorl	%r8d, %r8d
	cmpl	$2, %eax
	jne	LBB0_2
## %bb.3:
	movl	12(%rbx), %ecx
	movl	4(%rdi), %r8d
	jmp	LBB0_14
LBB0_4:
	movl	12(%rbx), %eax
	movl	16(%rbx), %edx
	movl	%esi, %edi
	movl	%eax, %esi
	callq	_min3
	leaq	-20(%rbp), %rdx
	leaq	-24(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_get_plane_info
	testq	%rax, %rax
	jne	LBB0_15
## %bb.5:
	movl	8(%rbx), %edi
	movl	12(%rbx), %esi
	movl	16(%rbx), %edx
	callq	_max3
	leaq	-12(%rbp), %rdx
	leaq	-16(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_get_plane_info
	testq	%rax, %rax
	jne	LBB0_15
## %bb.6:
	movslq	-20(%rbp), %r9
	movslq	-12(%rbp), %rdi
	leal	(%rdi,%r9), %ecx
	cmpl	$1, %ecx
	je	LBB0_11
## %bb.7:
	cmpl	$3, %ecx
	je	LBB0_8
## %bb.9:
	cmpl	$2, %ecx
	jne	LBB0_15
## %bb.10:
	leaq	12(%rbx), %rax
	jmp	LBB0_12
LBB0_2:
	xorl	%ecx, %ecx
LBB0_14:
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	leaq	16(%rbx), %rax
	jmp	LBB0_12
LBB0_8:
	leaq	8(%rbx), %rax
LBB0_12:
	movl	$3, %edx
	subl	%ecx, %edx
	movl	(%rax), %eax
	movl	-24(%rbp), %esi
	movq	(%rbx), %rbx
	movl	%edx, %ecx
	movl	%eax, %edx
	subl	%esi, %edx
	addl	(%rbx,%rcx,4), %edx
	movl	-16(%rbp), %ecx
	movl	(%rbx,%rdi,4), %r8d
	movl	%ecx, %edi
	subl	%eax, %edi
	addl	%r8d, %edi
	cmpl	%edi, %edx
	jle	LBB0_14
## %bb.13:
	movl	(%rbx,%r9,4), %edx
	movl	%edi, %r8d
	movl	%eax, %ecx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"f_addr = 0x%08x, f_len = %d, s_addr = 0x%08x, s_len = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_set_prefbuf                ; -- Begin function gsc_set_prefbuf
	.p2align	2
_gsc_set_prefbuf:                       ; @gsc_set_prefbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x21, x1
	ldr	w1, [x21, #8]!
	ldr	x8, [x19, #24]
	ldr	w9, [x8]
	cmp	w9, #3
	b.eq	LBB0_3
; %bb.1:
	ldr	x8, [x19]
	ldr	w2, [x8]
	cmp	w9, #2
	b.ne	LBB0_8
; %bb.2:
	ldr	w3, [x19, #12]
	ldr	w4, [x8, #4]
	b	LBB0_9
LBB0_3:
	mov	x20, x19
	ldr	w8, [x20, #12]!
	mov	x22, x19
	ldr	w2, [x22, #16]!
	mov	x0, x1
	mov	x1, x8
	bl	_min3
	mov	x1, x0
	add	x2, sp, #8
	add	x3, sp, #12
	mov	x0, x19
	bl	_get_plane_info
	cbnz	x0, LBB0_10
; %bb.4:
	ldp	w0, w1, [x19, #8]
	ldr	w2, [x19, #16]
	bl	_max3
	mov	x1, x0
	mov	x2, sp
	add	x3, sp, #4
	mov	x0, x19
	bl	_get_plane_info
	cbnz	x0, LBB0_10
; %bb.5:
	ldrsw	x8, [sp, #8]
	ldrsw	x9, [sp]
	add	w10, w9, w8
	cmp	w10, #1
	b.eq	LBB0_11
; %bb.6:
	cmp	w10, #3
	b.eq	LBB0_12
; %bb.7:
	cmp	w10, #2
	b.ne	LBB0_10
	b	LBB0_13
LBB0_8:
	mov	w4, #0
	mov	w3, #0
LBB0_9:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
	mov	x20, x22
	b	LBB0_13
LBB0_12:
	mov	x20, x21
LBB0_13:
	mov	w11, #3
	sub	w12, w11, w10
	ldr	w10, [x20]
	ldr	w1, [sp, #12]
	ldr	x11, [x19]
	ldr	w12, [x11, w12, uxtw #2]
	sub	w13, w10, w1
	add	w2, w13, w12
	ldr	w3, [sp, #4]
	ldr	w4, [x11, x9, lsl #2]
	sub	w9, w3, w10
	add	w9, w9, w4
	cmp	w2, w9
	b.le	LBB0_9
; %bb.14:
	ldr	w2, [x11, x8, lsl #2]
	mov	x4, x9
	mov	x3, x10
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"f_addr = 0x%08x, f_len = %d, s_addr = 0x%08x, s_len = %d\n"

.subsections_via_symbols
