	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_shape_from_file
_read_shape_from_file:                  ## @read_shape_from_file
	.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	%r8, %r12
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	-56(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rcx, %rdi
	xorl	%ecx, %ecx
	callq	_av_file_map
	testl	%eax, %eax
	js	LBB0_25
## %bb.1:
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	xorl	%ebx, %ebx
	movq	_INT_MAX@GOTPCREL(%rip), %r14
	xorl	%esi, %esi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	(%r14), %esi
	je	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%esi
	incq	%rbx
	cmpq	%rbx, %rax
	jbe	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	-56(%rbp), %rcx
	cmpb	$10, (%rcx,%rbx)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %eax
	cmpl	(%r14), %eax
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%eax
	movl	%eax, (%r15)
	movl	(%r13), %edi
	callq	_FFMAX
	movl	%eax, (%r13)
	xorl	%esi, %esi
	movq	-48(%rbp), %rax
	jmp	LBB0_9
LBB0_10:
	movslq	(%r15), %rcx
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$2, %rax
	movslq	(%r13), %r8
	movq	%rax, %rdx
	orq	%r8, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	xorl	%edx, %edx
	divq	%r8
	cmpq	%rcx, %rax
	jae	LBB0_15
LBB0_14:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_24
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r8d
                                        ## kill: def $eax killed $eax def $rax
	cmpq	%rcx, %rax
	jb	LBB0_14
LBB0_15:
	shll	$2, %ecx
	movl	%ecx, %edi
	movl	%r8d, %esi
	callq	_av_mallocz_array
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_24
## %bb.18:
	movq	-56(%rbp), %rbx
	movq	-48(%rbp), %rcx
	leaq	(%rbx,%rcx), %r12
	decq	%r12
	xorl	%r14d, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	addq	%r15, %rbx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %eax
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%rbx
	incl	%r14d
	cmpl	%eax, %r14d
	jge	LBB0_24
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	cmpq	%r12, %rbx
	ja	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	(%rbx,%r15), %edi
	cmpl	$10, %edi
	je	LBB0_22
## %bb.26:                              ##   in Loop: Header=BB0_21 Depth=2
	callq	_av_isgraph
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	(%r13), %rdx
	movslq	%r14d, %rsi
	imulq	%rdx, %rsi
	addq	%r15, %rsi
	movl	%ecx, (%rax,%rsi,4)
	leaq	(%rbx,%r15), %rax
	incq	%rax
	incq	%r15
	cmpq	%r12, %rax
	jbe	LBB0_21
	jmp	LBB0_22
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_25
LBB0_5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_24
LBB0_16:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_24:
	movq	-56(%rbp), %rdi
	movq	-48(%rbp), %rsi
	callq	_av_file_unmap
	xorl	%eax, %eax
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Overflow on the number of rows in the file\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.1:                               ## @.str.1
	.asciz	"Overflow on the number of columns in the file\n"

	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
L_.str.2:                               ## @.str.2
	.asciz	"File with size %dx%d is too big\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.no_dead_strip	_read_shape_from_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_shape_from_file
_read_shape_from_file:                  ; @read_shape_from_file
	.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	x22, x4
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x3
	mov	w3, #0
	bl	_av_file_map
	tbnz	w0, #31, LBB0_26
; %bb.1:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x23, #0
	mov	w1, #0
Lloh0:
	adrp	x24, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _INT_MAX@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x24]
	cmp	w1, w9
	b.eq	LBB0_21
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w1, w1, #1
	add	x23, x23, #1
	cmp	x8, x23
	b.ls	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [sp, #24]
	ldrb	w9, [x9, x23]
	cmp	w9, #10
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x24]
	cmp	w8, w9
	b.eq	LBB0_22
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w8, #1
	str	w8, [x20]
	ldr	w0, [x21]
	bl	_FFMAX
	mov	w1, #0
	str	w0, [x21]
	ldr	x8, [sp, #16]
	b	LBB0_4
LBB0_8:
Lloh2:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
	ldrsw	x9, [x20]
Lloh4:
	ldrsw	x8, [x8]
	lsr	x8, x8, #2
	ldrsw	x1, [x21]
	udiv	x8, x8, x1
	cmp	x8, x9
	b.hs	LBB0_10
; %bb.9:
Lloh5:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	stp	x9, x1, [sp]
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x1, x8
	b	LBB0_23
LBB0_10:
	lsl	w0, w9, #2
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_av_mallocz_array
	str	x0, [x19]
	cbz	x0, LBB0_24
; %bb.11:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.12:
	mov	w22, #0
	ldp	x9, x23, [sp, #16]
	add	x9, x23, x9
	sub	x24, x9, #1
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, x25
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x20]
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x23, x23, #1
	add	w22, w22, #1
	cmp	w22, w8
	b.ge	LBB0_25
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	cmp	x23, x24
	b.hi	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x25, #0
LBB0_18:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsb	w0, [x23, x25]
	cmp	w0, #10
	b.eq	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	bl	_av_isgraph
	cmp	w0, #0
	cset	w8, ne
	ldr	x9, [x19]
	ldrsw	x10, [x21]
	sxtw	x11, w22
	madd	x10, x11, x10, x25
	str	w8, [x9, x10, lsl #2]
	add	x25, x25, #1
	add	x8, x23, x25
	cmp	x8, x24
	b.ls	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x23, x8
	b	LBB0_14
LBB0_21:
Lloh10:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_av_log
Lloh15:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_26
LBB0_22:
Lloh18:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x2, l_.str@PAGE
Lloh22:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
LBB0_23:
	bl	_av_log
	b	LBB0_25
LBB0_24:
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_25:
	ldp	x1, x0, [sp, #16]
	bl	_av_file_unmap
	mov	w0, #0
LBB0_26:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Overflow on the number of rows in the file\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.1:                               ; @.str.1
	.asciz	"Overflow on the number of columns in the file\n"

	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
l_.str.2:                               ; @.str.2
	.asciz	"File with size %dx%d is too big\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.no_dead_strip	_read_shape_from_file
.subsections_via_symbols
