	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_uncompressed_sgi
_read_uncompressed_sgi:                 ## @read_uncompressed_sgi
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rsi), %ebx
	imull	4(%rsi), %ebx
	imull	8(%rsi), %ebx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	12(%rsi), %r14d
	imull	%ebx, %r14d
	leaq	20(%rsi), %rdi
	callq	_bytestream2_get_bytes_left
	cmpl	%eax, %r14d
	jbe	LBB0_1
## %bb.26:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_1:
	xorl	%eax, %eax
	cmpl	$0, 12(%r15)
	movl	$0, %edi
	je	LBB0_5
## %bb.2:
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%r15), %eax
	movl	%eax, (%r13)
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_bytestream2_skip
	incq	%r14
	movl	12(%r15), %edi
	addl	%ebx, %r12d
	addq	$4, %r13
	cmpq	%rdi, %r14
	jb	LBB0_3
## %bb.4:
	xorl	%eax, %eax
LBB0_5:
	movl	(%r15), %esi
	decl	%esi
	js	LBB0_24
## %bb.6:
	movl	%edi, %ecx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	decl	%esi
	js	LBB0_23
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
                                        ##       Child Loop BB0_19 Depth 3
                                        ##     Child Loop BB0_9 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
	movslq	16(%r15), %rdx
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r14
	imulq	%rdx, %r14
	addq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	movl	4(%r15), %r13d
	cmpl	$1, 8(%r15)
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	testl	%r13d, %r13d
	jg	LBB0_9
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_9 Depth=2
	xorl	%edi, %edi
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=2
	leal	-1(%r13), %edx
	movl	%edi, %ecx
	cmpl	$1, %r13d
	movl	%edx, %r13d
	jle	LBB0_22
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
	testl	%edi, %edi
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	leaq	-64(%rbp), %rbx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_9 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%rbx, %rdi
	callq	_bytestream2_get_byteu
	movb	%al, (%r14,%r12)
	incq	%r12
	movl	12(%r15), %edi
	addq	$4, %rbx
	cmpq	%rdi, %r12
	jb	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=2
	addq	%r12, %r14
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	testl	%r13d, %r13d
	jg	LBB0_16
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=2
	xorl	%ecx, %ecx
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=2
	leal	-1(%r13), %edx
	cmpl	$1, %r13d
	movl	%edx, %r13d
	jle	LBB0_22
LBB0_16:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_19 Depth 3
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=2
	leaq	-64(%rbp), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_7 Depth=1
                                        ##     Parent Loop BB0_16 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r12, %rdi
	callq	_bytestream2_get_ne16u
	movl	%eax, (%r14)
	addq	$4, %r14
	incq	%rbx
	movl	12(%r15), %edi
	addq	$4, %r12
	cmpq	%rdi, %rbx
	jb	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=2
	movl	%edi, %ecx
	jmp	LBB0_21
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_read_uncompressed_sgi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_uncompressed_sgi
_read_uncompressed_sgi:                 ; @read_uncompressed_sgi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldp	w8, w9, [x1]
	mul	w8, w9, w8
	ldp	w9, w10, [x1, #8]
	mul	w22, w8, w9
	mul	w21, w10, w22
	add	x0, x1, #20
	bl	_bytestream2_get_bytes_left
	cmp	w21, w0
	b.ls	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_2:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_6
; %bb.3:
	mov	w21, #0
	mov	x23, #0
	add	x0, sp, #8
	mov	x24, x0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #20]
	str	w8, [x24], #4
	mov	x1, x21
	bl	_bytestream2_skip
	add	x23, x23, #1
	ldr	w8, [x19, #12]
	add	w21, w21, w22
	mov	x0, x24
	cmp	x23, x8
	b.lo	LBB0_4
; %bb.5:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_6:
	ldr	w9, [x19]
	subs	w22, w9, #1
	b.mi	LBB0_22
; %bb.7:
	mov	x9, x8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	subs	w22, w22, #1
	b.mi	LBB0_22
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
                                        ;       Child Loop BB0_20 Depth 3
                                        ;     Child Loop BB0_12 Depth 2
                                        ;       Child Loop BB0_14 Depth 3
	ldrsw	x10, [x19, #16]
	sxtw	x11, w22
	madd	x23, x10, x11, x20
	ldp	w24, w10, [x19, #4]
	cmp	w10, #1
	b.ne	LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w24, #1
	b.ge	LBB0_12
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	mov	x9, x8
	subs	w24, w24, #1
	b.le	LBB0_8
LBB0_12:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_14 Depth 3
	cbz	w8, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x25, #0
	add	x21, sp, #8
LBB0_14:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_12 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x21
	bl	_bytestream2_get_byteu
	strb	w0, [x23, x25]
	add	x25, x25, #1
	ldr	w8, [x19, #12]
	add	x21, x21, #4
	cmp	x25, x8
	b.lo	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=2
	add	x23, x23, x25
	b	LBB0_11
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	cmp	w24, #1
	b.ge	LBB0_18
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	subs	w24, w24, #1
	b.le	LBB0_8
LBB0_18:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_20 Depth 3
	cbz	w9, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x25, #0
	add	x21, sp, #8
LBB0_20:                                ;   Parent Loop BB0_9 Depth=1
                                        ;     Parent Loop BB0_18 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	mov	x0, x21
	bl	_bytestream2_get_ne16u
	str	w0, [x23], #4
	add	x25, x25, #1
	ldr	w9, [x19, #12]
	add	x21, x21, #4
	cmp	x25, x9
	b.lo	LBB0_20
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x8, x9
	b	LBB0_17
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_read_uncompressed_sgi
.subsections_via_symbols
