	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl2_init_pbo_readback
_gl2_init_pbo_readback:                 ## @gl2_init_pbo_readback
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rsi
	movl	$4, %edi
	callq	_glGenBuffers
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_gl2_renderchain_bind_pbo
	movl	16(%rbx), %edi
	imull	20(%rbx), %edi
	shll	$2, %edi
	xorl	%esi, %esi
	callq	_gl2_renderchain_init_pbo
	movq	8(%rbx), %rax
	movl	4(%rax), %edi
	callq	_gl2_renderchain_bind_pbo
	movl	16(%rbx), %edi
	imull	20(%rbx), %edi
	shll	$2, %edi
	xorl	%esi, %esi
	callq	_gl2_renderchain_init_pbo
	movq	8(%rbx), %rax
	movl	8(%rax), %edi
	callq	_gl2_renderchain_bind_pbo
	movl	16(%rbx), %edi
	imull	20(%rbx), %edi
	shll	$2, %edi
	xorl	%esi, %esi
	callq	_gl2_renderchain_init_pbo
	movq	8(%rbx), %rax
	movl	12(%rax), %edi
	callq	_gl2_renderchain_bind_pbo
	movl	16(%rbx), %edi
	imull	20(%rbx), %edi
	shll	$2, %edi
	xorl	%esi, %esi
	callq	_gl2_renderchain_init_pbo
	xorl	%eax, %eax
	callq	_gl2_renderchain_unbind_pbo
	leaq	24(%rbx), %rdi
	movq	16(%rbx), %rax
	movq	%rax, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	movdqu	%xmm0, 24(%rbx)
	leal	(,%rax,4), %ecx
	movl	%ecx, 40(%rbx)
	leal	(%rax,%rax,2), %eax
	movl	%eax, 44(%rbx)
	movq	_SCALER_FMT_ARGB8888@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
	movq	_SCALER_FMT_BGR24@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_SCALER_TYPE_POINT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	callq	_scaler_ctx_gen_filter
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$0, (%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	movq	8(%rbx), %rsi
	movl	$4, %edi
	callq	_glDeleteBuffers
LBB0_2:
	xorl	%eax, %eax
	testl	%r14d, %r14d
	setne	%al
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCALER_FMT_ARGB8888,4,2        ## @SCALER_FMT_ARGB8888
	.comm	_SCALER_FMT_BGR24,4,2           ## @SCALER_FMT_BGR24
	.comm	_SCALER_TYPE_POINT,4,2          ## @SCALER_TYPE_POINT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[GL]: Failed to initialize pixel conversion for PBO.\n"

	.no_dead_strip	_gl2_init_pbo_readback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl2_init_pbo_readback
_gl2_init_pbo_readback:                 ; @gl2_init_pbo_readback
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x1, [x0, #8]
	mov	w0, #4
	bl	_glGenBuffers
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_gl2_renderchain_bind_pbo
	ldp	w8, w9, [x19, #16]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	mov	x1, #0
	bl	_gl2_renderchain_init_pbo
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #4]
	bl	_gl2_renderchain_bind_pbo
	ldp	w8, w9, [x19, #16]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	mov	x1, #0
	bl	_gl2_renderchain_init_pbo
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_gl2_renderchain_bind_pbo
	ldp	w8, w9, [x19, #16]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	mov	x1, #0
	bl	_gl2_renderchain_init_pbo
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #12]
	bl	_gl2_renderchain_bind_pbo
	ldp	w8, w9, [x19, #16]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	mov	x1, #0
	bl	_gl2_renderchain_init_pbo
	bl	_gl2_renderchain_unbind_pbo
	ldr	d0, [x19, #16]
	fmov	w8, s0
	mov.d	v0[1], v0[0]
	mov	x0, x19
	str	q0, [x0, #24]!
	lsl	w9, w8, #2
	add	w8, w8, w8, lsl #1
	stp	w9, w8, [x0, #16]
Lloh0:
	adrp	x8, _SCALER_FMT_ARGB8888@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCALER_FMT_ARGB8888@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #32]
Lloh3:
	adrp	x8, _SCALER_FMT_BGR24@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SCALER_FMT_BGR24@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _SCALER_TYPE_POINT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SCALER_TYPE_POINT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	bl	_scaler_ctx_gen_filter
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	str	wzr, [x19]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	ldr	x1, [x19, #8]
	mov	w0, #4
	bl	_glDeleteBuffers
LBB0_2:
	cmp	w20, #0
	cset	w0, ne
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SCALER_FMT_ARGB8888,4,2        ; @SCALER_FMT_ARGB8888
	.comm	_SCALER_FMT_BGR24,4,2           ; @SCALER_FMT_BGR24
	.comm	_SCALER_TYPE_POINT,4,2          ; @SCALER_TYPE_POINT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[GL]: Failed to initialize pixel conversion for PBO.\n"

	.no_dead_strip	_gl2_init_pbo_readback
.subsections_via_symbols
