	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function read_depth_pixels
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_read_depth_pixels:                     ## @read_depth_pixels
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movq	%r9, -104(%rbp)                 ## 8-byte Spill
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%esi, -108(%rbp)                ## 4-byte Spill
	movq	%rdi, %rbx
	movq	16(%rbp), %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	64(%rdi), %rax
	cmpq	$0, (%rax)
	jle	LBB0_1
## %bb.4:
	movl	%r8d, %r15d
	movl	%edx, %r14d
	movsd	32(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	movb	$1, %al
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorpd	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jne	LBB0_6
	jp	LBB0_6
## %bb.5:
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	cmpneqsd	40(%rbx), %xmm0
	movq	%xmm0, %rax
	andl	$1, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_6:
	movq	-104(%rbp), %rdi                ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_gl_sizeof_type
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:
	movl	%eax, %ecx
	movl	(%rbx), %esi
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	cmovlel	-52(%rbp), %edi                 ## 4-byte Folded Reload
	cmpl	%esi, %eax
	jge	LBB0_10
## %bb.9:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %r12d
	imull	%ecx, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_CEILING
	movl	%eax, %edi
	imull	%r12d, %edi
LBB0_10:
	movl	%r14d, %ecx
	movslq	16(%rbx), %rdx
	movslq	%edi, %rsi
	movq	%rsi, %rax
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	imulq	%rsi, %rdx
	movslq	20(%rbx), %rax
	addq	%rdx, %rax
	cmpl	$129, -104(%rbp)                ## 4-byte Folded Reload
	setne	%dl
	orb	-80(%rbp), %dl                  ## 1-byte Folded Reload
	jne	LBB0_29
## %bb.11:
	cmpq	$0, 24(%rbx)
	je	LBB0_12
LBB0_29:
	movq	%rdi, -136(%rbp)                ## 8-byte Spill
	testl	%r15d, %r15d
	jle	LBB0_63
## %bb.30:
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	testl	%edx, %edx
	setg	%sil
	cltq
	movl	%r15d, %edi
	leaq	(%r13,%rax,4), %r15
	movl	%edx, %r13d
	leaq	(,%r13,4), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	%edi, %eax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	andb	%sil, %al
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_31
LBB0_61:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	_GL_INVALID_ENUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rdx
	callq	_gl_error
	movq	-120(%rbp), %r14                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_62:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	-152(%rbp), %rsp                ## 8-byte Reload
	incq	%r14
	movl	-92(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	addq	-176(%rbp), %r15                ## 8-byte Folded Reload
	cmpq	-144(%rbp), %r14                ## 8-byte Folded Reload
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_63
LBB0_31:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_33 Depth 2
                                        ##     Child Loop BB0_41 Depth 2
                                        ##     Child Loop BB0_57 Depth 2
                                        ##     Child Loop BB0_49 Depth 2
                                        ##     Child Loop BB0_38 Depth 2
                                        ##     Child Loop BB0_52 Depth 2
                                        ##     Child Loop BB0_44 Depth 2
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	movq	%rsp, -152(%rbp)                ## 8-byte Spill
	movq	_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	movl	%ecx, %r14d
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	%rbx, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	-108(%rbp), %edx                ## 4-byte Reload
	movl	%r14d, -92(%rbp)                ## 4-byte Spill
	movl	%r14d, %ecx
	movq	%r12, %r8
	callq	*48(%rbx)
	cmpb	$0, -80(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_34
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_33:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	xorps	%xmm0, %xmm0
	cvtsi2sdl	(%r12,%r14,4), %xmm0
	mulsd	40(%rbx), %xmm0
	addsd	32(%rbx), %xmm0
	cvttsd2si	%xmm0, %edi
	xorpd	%xmm0, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	callq	_CLAMP
	movl	%eax, (%r12,%r14,4)
	incq	%r14
	cmpq	%r14, %r13
	jne	LBB0_33
LBB0_34:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addl	$-128, %eax
	cmpl	$6, %eax
	ja	LBB0_61
## %bb.35:                              ##   in Loop: Header=BB0_31 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	movq	-120(%rbp), %r14                ## 8-byte Reload
	jmpq	*%rax
LBB0_42:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_45
## %bb.43:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_44:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_USHORT
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_44
	jmp	LBB0_45
LBB0_36:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_62
## %bb.37:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_38:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_UBYTE
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_38
	jmp	LBB0_62
LBB0_47:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_45
## %bb.48:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_49:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_SHORT
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_49
LBB0_45:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 24(%rax)
	je	LBB0_62
## %bb.46:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	%r14, %rax
	imulq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_gl_swap2
	jmp	LBB0_62
LBB0_55:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_53
## %bb.56:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_57:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_INT
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_57
	jmp	LBB0_53
LBB0_50:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_53
## %bb.51:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_52:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_UINT
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_52
LBB0_53:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	$0, 24(%rax)
	jne	LBB0_54
	jmp	LBB0_62
LBB0_58:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_60
## %bb.59:                              ##   in Loop: Header=BB0_31 Depth=1
	movq	-136(%rbp), %rax                ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	imull	%r14d, %eax
	cltq
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	%r12, %rsi
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	callq	_memcpy
LBB0_60:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpq	$0, 24(%rbx)
	je	LBB0_62
LBB0_54:                                ##   in Loop: Header=BB0_31 Depth=1
	movq	%r14, %rax
	imulq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_gl_swap4
	jmp	LBB0_62
LBB0_39:                                ##   in Loop: Header=BB0_31 Depth=1
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_62
## %bb.40:                              ##   in Loop: Header=BB0_31 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_41:                                ##   Parent Loop BB0_31 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12,%rbx,4), %edi
	callq	_FLOAT_TO_BYTE
	movl	%eax, (%r15,%rbx,4)
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_41
	jmp	LBB0_62
LBB0_1:
	leaq	L_.str(%rip), %rdx
	movq	_GL_INVALID_OPERATION@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	leaq	L_.str.1(%rip), %rdx
	movq	_GL_INVALID_ENUM@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_65
## %bb.3:
	movq	%rbx, %rdi
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gl_error                       ## TAILCALL
LBB0_12:
	movq	_MAX_DEPTH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	xorl	%r12d, %r12d
	testl	%edx, %edx
	js	LBB0_14
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	addl	%edx, %edx
	incl	%r12d
	testl	%edx, %edx
	jns	LBB0_19
LBB0_14:
	testl	%r15d, %r15d
	jle	LBB0_63
## %bb.15:
	leaq	(,%rax,4), %r8
	addq	%r13, %r8
	movl	%r15d, %esi
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, %edi
	andl	$-8, %edi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	addq	$-8, %rdi
	movq	%rdi, -136(%rbp)                ## 8-byte Spill
	movq	%rdi, %rdx
	shrq	$3, %rdx
	incq	%rdx
	movd	%r12d, %xmm0
	movq	%rdx, %rdi
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	andq	$-2, %rdx
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	leaq	48(,%rax,4), %r14
	addq	%r13, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	xorl	%edx, %edx
	pmovzxdq	%xmm0, %xmm4                    ## xmm4 = xmm0[0],zero,xmm0[1],zero
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, %r13
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movdqa	%xmm4, -176(%rbp)               ## 16-byte Spill
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-120(%rbp), %rdx                ## 8-byte Reload
	incq	%rdx
	movl	-92(%rbp), %ecx                 ## 4-byte Reload
	incl	%ecx
	movq	-144(%rbp), %rax                ## 8-byte Reload
	addq	%rax, %r14
	addq	%rax, %r13
	cmpq	-104(%rbp), %rdx                ## 8-byte Folded Reload
	je	LBB0_63
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	%rdx, %rax
	imulq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	leaq	(%rdx,%rax,4), %r8
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	-108(%rbp), %edx                ## 4-byte Reload
	movl	%ecx, -92(%rbp)                 ## 4-byte Spill
	movq	%r8, -152(%rbp)                 ## 8-byte Spill
	callq	*56(%rbx)
	movdqa	-176(%rbp), %xmm4               ## 16-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	testl	%r15d, %r15d
	jle	LBB0_28
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpl	$8, -52(%rbp)                   ## 4-byte Folded Reload
	jae	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	xorl	%eax, %eax
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpq	$0, -136(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-184(%rbp), %rcx                ## 8-byte Reload
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	-48(%r14,%rax,4), %xmm0
	movdqu	-32(%r14,%rax,4), %xmm1
	movdqu	-16(%r14,%rax,4), %xmm2
	movdqu	(%r14,%rax,4), %xmm3
	pslld	%xmm4, %xmm0
	pslld	%xmm4, %xmm1
	movdqu	%xmm0, -48(%r14,%rax,4)
	movdqu	%xmm1, -32(%r14,%rax,4)
	pslld	%xmm4, %xmm2
	pslld	%xmm4, %xmm3
	movdqu	%xmm2, -16(%r14,%rax,4)
	movdqu	%xmm3, (%r14,%rax,4)
	addq	$16, %rax
	addq	$-2, %rcx
	jne	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=1
	testb	$1, -128(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_26
LBB0_25:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movdqu	(%rcx,%rax,4), %xmm0
	movdqu	16(%rcx,%rax,4), %xmm1
	pslld	%xmm4, %xmm0
	pslld	%xmm4, %xmm1
	movdqu	%xmm0, (%rcx,%rax,4)
	movdqu	%xmm1, 16(%rcx,%rax,4)
LBB0_26:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %rax
	cmpq	%rsi, %rcx
	je	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, %ecx
	shll	%cl, (%r13,%rax,4)
	incq	%rax
	cmpq	%rax, %rsi
	jne	LBB0_27
	jmp	LBB0_28
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	xorl	%eax, %eax
	testb	$1, -128(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_25
	jmp	LBB0_26
LBB0_63:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_65
## %bb.64:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_65:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_42, LBB0_42-LJTI0_0
.set L0_0_set_50, LBB0_50-LJTI0_0
.set L0_0_set_36, LBB0_36-LJTI0_0
.set L0_0_set_47, LBB0_47-LJTI0_0
.set L0_0_set_55, LBB0_55-LJTI0_0
.set L0_0_set_58, LBB0_58-LJTI0_0
.set L0_0_set_39, LBB0_39-LJTI0_0
LJTI0_0:
	.long	L0_0_set_42
	.long	L0_0_set_50
	.long	L0_0_set_36
	.long	L0_0_set_47
	.long	L0_0_set_55
	.long	L0_0_set_58
	.long	L0_0_set_39
	.end_data_region
                                        ## -- End function
	.comm	_GL_INVALID_OPERATION,4,2       ## @GL_INVALID_OPERATION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glReadPixels"

	.comm	_GL_INVALID_ENUM,4,2            ## @GL_INVALID_ENUM
L_.str.1:                               ## @.str.1
	.asciz	"glReadPixels(type)"

	.comm	_MAX_DEPTH,4,2                  ## @MAX_DEPTH
	.comm	_MAX_WIDTH,4,2                  ## @MAX_WIDTH
	.no_dead_strip	_read_depth_pixels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_depth_pixels
_read_depth_pixels:                     ; @read_depth_pixels
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #96
	stur	w1, [x29, #-92]                 ; 4-byte Folded Spill
	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, #-88]
	ldr	x8, [x0, #64]
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x23, x6
	mov	x25, x5
	mov	x26, x4
	mov	x20, x3
	mov	x21, x2
	ldr	d0, [x19, #32]
	fcmp	d0, #0.0
	b.eq	LBB0_4
; %bb.2:
	mov	w22, #1
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
Lloh5:
	adrp	x8, _GL_INVALID_OPERATION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GL_INVALID_OPERATION@GOTPAGEOFF]
	b	LBB0_50
LBB0_4:
	ldr	d0, [x19, #40]
	fmov	d1, #1.00000000
	fcmp	d0, d1
	cset	w22, ne
LBB0_5:
	mov	x0, x25
	bl	_gl_sizeof_type
Lloh7:
	adrp	x8, _GL_INVALID_ENUM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GL_INVALID_ENUM@GOTPAGEOFF]
	cmp	w0, #1
	b.lt	LBB0_49
; %bb.6:
	ldr	w1, [x19]
	ldr	x8, [x19, #8]
	cmp	x8, #0
	csel	w11, w8, w20, gt
	cmp	w0, w1
	b.ge	LBB0_8
; %bb.7:
	mul	w8, w11, w0
	sdiv	w24, w1, w0
	mov	x0, x8
	bl	_CEILING
	mul	w11, w0, w24
LBB0_8:
	sxtw	x8, w11
	ldpsw	x9, x10, [x19, #16]
	madd	x8, x9, x8, x10
	cmp	w25, #129
	cset	w9, ne
	orr	w9, w9, w22
	tbnz	w9, #0, LBB0_10
; %bb.9:
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_52
LBB0_10:
	stur	x11, [x29, #-160]               ; 8-byte Folded Spill
	cmp	w26, #1
	b.lt	LBB0_67
; %bb.11:
	mov	x27, #0
	cmp	w20, #0
	cset	w9, gt
	add	x10, x23, w8, sxtw #2
	mov	w8, w20
	stp	x10, x8, [x29, #-144]           ; 16-byte Folded Spill
	lsl	x8, x8, #2
	stur	x8, [x29, #-168]                ; 8-byte Folded Spill
	ldur	x8, [x29, #-160]                ; 8-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x8, w8
	stur	x8, [x29, #-152]                ; 8-byte Folded Spill
	and	w8, w22, w9
	stur	w8, [x29, #-104]                ; 4-byte Folded Spill
	sub	w23, w25, #128
	mov	w8, w26
	stur	x8, [x29, #-128]                ; 8-byte Folded Spill
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=1
Lloh9:
	adrp	x8, _GL_INVALID_ENUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GL_INVALID_ENUM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
Lloh12:
	adrp	x2, l_.str.1@PAGE
Lloh13:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_gl_error
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	sp, x28
	add	x27, x27, #1
	add	w21, w21, #1
	ldur	x8, [x29, #-128]                ; 8-byte Folded Reload
	cmp	x27, x8
	b.eq	LBB0_67
LBB0_14:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
                                        ;     Child Loop BB0_48 Depth 2
                                        ;     Child Loop BB0_35 Depth 2
                                        ;     Child Loop BB0_29 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
                                        ;     Child Loop BB0_38 Depth 2
                                        ;     Child Loop BB0_21 Depth 2
	mov	x28, sp
Lloh14:
	adrp	x8, _MAX_WIDTH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MAX_WIDTH@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh17:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh18:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x24, x9, x8
	mov	sp, x24
	ldr	x8, [x19, #48]
	mov	x0, x19
	mov	x1, x20
	ldur	w2, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x3, x21
	mov	x4, x24
	blr	x8
	ldur	w8, [x29, #-104]                ; 4-byte Folded Reload
	cbz	w8, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
	mov	x25, x24
LBB0_16:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	s0, [x25]
	sshll.2d	v0, v0, #0
	scvtf	d0, d0
	ldp	d2, d1, [x19, #32]
	fmadd	d0, d0, d1, d2
	fcvtzs	w0, d0
	movi	d0, #0000000000000000
	fmov	d1, #1.00000000
	bl	_CLAMP
	str	w0, [x25], #4
	subs	x26, x26, #1
	b.ne	LBB0_16
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w23, #6
	b.hi	LBB0_12
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
Lloh19:
	adrp	x10, lJTI0_0@PAGE
Lloh20:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x8, LBB0_19
	ldrb	w9, [x10, x23]
	add	x8, x8, x9, lsl #2
	br	x8
LBB0_19:                                ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x22, x9, x8, lsl #2
	cmp	w20, #1
	b.lt	LBB0_22
; %bb.20:                               ;   in Loop: Header=BB0_14 Depth=1
	ldur	x25, [x29, #-136]               ; 8-byte Folded Reload
	mov	x26, x22
LBB0_21:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_USHORT
	str	w0, [x26], #4
	subs	x25, x25, #1
	b.ne	LBB0_21
LBB0_22:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.23:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x22
	b	LBB0_32
LBB0_24:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.25:                               ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x25, x9, x8, lsl #2
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
LBB0_26:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_UBYTE
	str	w0, [x25], #4
	subs	x26, x26, #1
	b.ne	LBB0_26
	b	LBB0_13
LBB0_27:                                ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x26, x9, x8, lsl #2
	cmp	w20, #1
	b.lt	LBB0_30
; %bb.28:                               ;   in Loop: Header=BB0_14 Depth=1
	ldur	x25, [x29, #-136]               ; 8-byte Folded Reload
	mov	x22, x26
LBB0_29:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_SHORT
	str	w0, [x22], #4
	subs	x25, x25, #1
	b.ne	LBB0_29
LBB0_30:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.31:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x26
LBB0_32:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x20
	bl	_gl_swap2
	b	LBB0_13
LBB0_33:                                ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x26, x9, x8, lsl #2
	cmp	w20, #1
	b.lt	LBB0_39
; %bb.34:                               ;   in Loop: Header=BB0_14 Depth=1
	ldur	x25, [x29, #-136]               ; 8-byte Folded Reload
	mov	x22, x26
LBB0_35:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_INT
	str	w0, [x22], #4
	subs	x25, x25, #1
	b.ne	LBB0_35
	b	LBB0_39
LBB0_36:                                ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x26, x9, x8, lsl #2
	cmp	w20, #1
	b.lt	LBB0_39
; %bb.37:                               ;   in Loop: Header=BB0_14 Depth=1
	ldur	x25, [x29, #-136]               ; 8-byte Folded Reload
	mov	x22, x26
LBB0_38:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_UINT
	str	w0, [x22], #4
	subs	x25, x25, #1
	b.ne	LBB0_38
LBB0_39:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.40:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x26
	b	LBB0_45
LBB0_41:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w20, #1
	b.lt	LBB0_43
; %bb.42:                               ;   in Loop: Header=BB0_14 Depth=1
	ldp	x2, x8, [x29, #-168]            ; 16-byte Folded Reload
	mul	w8, w8, w27
	ldur	x9, [x29, #-144]                ; 8-byte Folded Reload
	add	x0, x9, w8, sxtw #2
	mov	x1, x24
	bl	_memcpy
LBB0_43:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.44:                               ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x0, x9, x8, lsl #2
LBB0_45:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x1, x20
	bl	_gl_swap4
	b	LBB0_13
LBB0_46:                                ;   in Loop: Header=BB0_14 Depth=1
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.47:                               ;   in Loop: Header=BB0_14 Depth=1
	ldp	x8, x9, [x29, #-152]            ; 16-byte Folded Reload
	mul	x8, x27, x8
	add	x25, x9, x8, lsl #2
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
LBB0_48:                                ;   Parent Loop BB0_14 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24], #4
	bl	_FLOAT_TO_BYTE
	str	w0, [x25], #4
	subs	x26, x26, #1
	b.ne	LBB0_48
	b	LBB0_13
LBB0_49:
Lloh21:
	adrp	x2, l_.str.1@PAGE
Lloh22:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_50:
	ldr	w1, [x8]
	ldur	x8, [x29, #-88]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_69
; %bb.51:
	mov	x0, x19
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_gl_error
LBB0_52:
Lloh26:
	adrp	x9, _MAX_DEPTH@GOTPAGE
Lloh27:
	ldr	x9, [x9, _MAX_DEPTH@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tbnz	w9, #31, LBB0_56
; %bb.53:
	mov	w22, #0
LBB0_54:                                ; =>This Inner Loop Header: Depth=1
	lsl	w9, w9, #1
	add	w22, w22, #1
	tbz	w9, #31, LBB0_54
; %bb.55:
	cmp	w26, #1
	b.ge	LBB0_57
	b	LBB0_67
LBB0_56:
	mov	w22, #0
	cmp	w26, #1
	b.lt	LBB0_67
LBB0_57:
	mov	x24, #0
	add	x28, x23, x8, lsl #2
	mov	x8, x11
	sxtw	x9, w8
	stur	x9, [x29, #-104]                ; 8-byte Folded Spill
	mov	w9, w20
	stur	x9, [x29, #-136]                ; 8-byte Folded Spill
	and	x9, x9, #0xfffffff0
	stur	x9, [x29, #-144]                ; 8-byte Folded Spill
	dup.4s	v4, w22
	add	x27, x28, #32
	mov	x9, x26
	sbfiz	x26, x8, #2, #32
	mov	x23, x28
	mov	w25, w9
	stur	q4, [x29, #-128]                ; 16-byte Folded Spill
	b	LBB0_59
LBB0_58:                                ;   in Loop: Header=BB0_59 Depth=1
	add	x24, x24, #1
	add	w21, w21, #1
	add	x27, x27, x26
	add	x23, x23, x26
	cmp	x24, x25
	b.eq	LBB0_67
LBB0_59:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_63 Depth 2
                                        ;     Child Loop BB0_66 Depth 2
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	mul	x8, x24, x8
	add	x4, x28, x8, lsl #2
	ldr	x8, [x19, #56]
	mov	x0, x19
	mov	x1, x20
	ldur	w2, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x3, x21
	blr	x8
	ldur	q4, [x29, #-128]                ; 16-byte Folded Reload
	cmp	w20, #1
	b.lt	LBB0_58
; %bb.60:                               ;   in Loop: Header=BB0_59 Depth=1
	cmp	w20, #16
	b.hs	LBB0_62
; %bb.61:                               ;   in Loop: Header=BB0_59 Depth=1
	mov	x9, #0
	b	LBB0_65
LBB0_62:                                ;   in Loop: Header=BB0_59 Depth=1
	mov	x8, x27
	ldur	x9, [x29, #-144]                ; 8-byte Folded Reload
LBB0_63:                                ;   Parent Loop BB0_59 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	q0, q1, [x8, #-32]
	ldp	q2, q3, [x8]
	ushl.4s	v0, v0, v4
	ushl.4s	v1, v1, v4
	ushl.4s	v2, v2, v4
	ushl.4s	v3, v3, v4
	stp	q0, q1, [x8, #-32]
	stp	q2, q3, [x8], #64
	subs	x9, x9, #16
	b.ne	LBB0_63
; %bb.64:                               ;   in Loop: Header=BB0_59 Depth=1
	ldp	x10, x8, [x29, #-144]           ; 16-byte Folded Reload
	mov	x9, x10
	cmp	x10, x8
	b.eq	LBB0_58
LBB0_65:                                ;   in Loop: Header=BB0_59 Depth=1
	add	x8, x23, x9, lsl #2
	ldur	x10, [x29, #-136]               ; 8-byte Folded Reload
	sub	x9, x10, x9
LBB0_66:                                ;   Parent Loop BB0_59 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w10, [x8]
	lsl	w10, w10, w22
	str	w10, [x8], #4
	subs	x9, x9, #1
	b.ne	LBB0_66
	b	LBB0_58
LBB0_67:
	ldur	x8, [x29, #-88]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_69
; %bb.68:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_69:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_19-LBB0_19)>>2
	.byte	(LBB0_36-LBB0_19)>>2
	.byte	(LBB0_24-LBB0_19)>>2
	.byte	(LBB0_27-LBB0_19)>>2
	.byte	(LBB0_33-LBB0_19)>>2
	.byte	(LBB0_41-LBB0_19)>>2
	.byte	(LBB0_46-LBB0_19)>>2
                                        ; -- End function
	.comm	_GL_INVALID_OPERATION,4,2       ; @GL_INVALID_OPERATION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glReadPixels"

	.comm	_GL_INVALID_ENUM,4,2            ; @GL_INVALID_ENUM
l_.str.1:                               ; @.str.1
	.asciz	"glReadPixels(type)"

	.comm	_MAX_DEPTH,4,2                  ; @MAX_DEPTH
	.comm	_MAX_WIDTH,4,2                  ; @MAX_WIDTH
	.no_dead_strip	_read_depth_pixels
.subsections_via_symbols
