	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jinit_memory_mgr               ## -- Begin function jinit_memory_mgr
	.p2align	4, 0x90
_jinit_memory_mgr:                      ## @jinit_memory_mgr
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, (%rdi)
	movq	_ALIGN_TYPE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_SIZEOF
	movq	%rax, %rbx
	movl	(%r15), %edi
	callq	_SIZEOF
	decq	%rax
	testq	%rbx, %rax
	je	LBB0_2
## %bb.1:
	movq	_JERR_BAD_ALIGN_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ERREXIT
LBB0_2:
	movq	_MAX_ALLOC_CHUNK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	(%r15), %edi
	callq	_SIZEOF
	movq	%rax, %rcx
	orq	%rbx, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	je	LBB0_7
LBB0_6:
	movq	_JERR_BAD_ALLOC_CHUNK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_ERREXIT
LBB0_7:
	movq	%r14, %rdi
	callq	_jpeg_mem_init
	movq	%rax, %r15
	movq	%rax, -56(%rbp)
	movq	_my_memory_mgr@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_SIZEOF
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_jpeg_get_small
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_jpeg_mem_term
	movq	_JERR_OUT_OF_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ERREXIT1
LBB0_9:
	movq	_alloc_small@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rbx, %r12
	addq	$8, %r12
	movl	%eax, 56(%rbx)
	movq	_alloc_large@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movq	_alloc_sarray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_alloc_barray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_request_virt_sarray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_request_virt_barray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_realize_virt_arrays@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_access_virt_sarray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_access_virt_barray@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_free_pool@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_self_destruct@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, 8(%rbx)
	movq	_JPOOL_NUMPOOLS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	_JPOOL_PERMANENT@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	%eax, %ecx
	jle	LBB0_14
## %bb.10:
	movl	%ecx, %edi
	subl	%eax, %edi
	movq	%rax, %rsi
	notq	%rsi
	movq	%rcx, %rdx
	testb	$1, %dil
	je	LBB0_12
## %bb.11:
	leaq	-1(%rcx), %rdx
	movq	88(%rbx), %rdi
	movq	$0, -8(%rdi,%rcx,8)
	movq	80(%rbx), %rdi
	movq	$0, -8(%rdi,%rcx,8)
LBB0_12:
	addq	%rcx, %rsi
	je	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	88(%rbx), %rcx
	movq	$0, -8(%rcx,%rdx,8)
	movq	80(%rbx), %rcx
	movq	$0, -8(%rcx,%rdx,8)
	movq	88(%rbx), %rcx
	movq	$0, -16(%rcx,%rdx,8)
	movq	80(%rbx), %rcx
	movq	$0, -16(%rcx,%rdx,8)
	leaq	-2(%rdx), %rcx
	movq	%rcx, %rdx
	cmpq	%rax, %rcx
	jg	LBB0_13
LBB0_14:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 64(%rbx)
	movl	(%r13), %edi
	callq	_SIZEOF
	movq	%rax, (%rbx)
	movq	%r12, (%r14)
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_19
## %bb.15:
	movb	$120, -41(%rbp)
	leaq	L_.str.1(%rip), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-41(%rbp), %rcx
	movq	%rax, %rdi
	callq	_sscanf
	testq	%rax, %rax
	jle	LBB0_19
## %bb.16:
	movb	-41(%rbp), %cl
	andb	$-33, %cl
	movq	-56(%rbp), %rax
	cmpb	$77, %cl
	jne	LBB0_18
## %bb.17:
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	movq	%rax, -56(%rbp)
LBB0_18:
	imulq	$1000, %rax, %rax               ## imm = 0x3E8
	movq	%rax, (%r12)
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ALIGN_TYPE,4,2                 ## @ALIGN_TYPE
	.comm	_JERR_BAD_ALIGN_TYPE,4,2        ## @JERR_BAD_ALIGN_TYPE
	.comm	_MAX_ALLOC_CHUNK,8,3            ## @MAX_ALLOC_CHUNK
	.comm	_JERR_BAD_ALLOC_CHUNK,4,2       ## @JERR_BAD_ALLOC_CHUNK
	.comm	_my_memory_mgr,4,2              ## @my_memory_mgr
	.comm	_JERR_OUT_OF_MEMORY,4,2         ## @JERR_OUT_OF_MEMORY
	.comm	_alloc_small,4,2                ## @alloc_small
	.comm	_alloc_large,4,2                ## @alloc_large
	.comm	_alloc_sarray,4,2               ## @alloc_sarray
	.comm	_alloc_barray,4,2               ## @alloc_barray
	.comm	_request_virt_sarray,4,2        ## @request_virt_sarray
	.comm	_request_virt_barray,4,2        ## @request_virt_barray
	.comm	_realize_virt_arrays,4,2        ## @realize_virt_arrays
	.comm	_access_virt_sarray,4,2         ## @access_virt_sarray
	.comm	_access_virt_barray,4,2         ## @access_virt_barray
	.comm	_free_pool,4,2                  ## @free_pool
	.comm	_self_destruct,4,2              ## @self_destruct
	.comm	_JPOOL_NUMPOOLS,4,2             ## @JPOOL_NUMPOOLS
	.comm	_JPOOL_PERMANENT,4,2            ## @JPOOL_PERMANENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"JPEGMEM"

L_.str.1:                               ## @.str.1
	.asciz	"%ld%c"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jinit_memory_mgr               ; -- Begin function jinit_memory_mgr
	.p2align	2
_jinit_memory_mgr:                      ; @jinit_memory_mgr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	str	xzr, [x0]
Lloh0:
	adrp	x21, _ALIGN_TYPE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ALIGN_TYPE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_SIZEOF
	mov	x20, x0
	ldr	w0, [x21]
	bl	_SIZEOF
	sub	x8, x0, #1
	tst	x8, x20
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _JERR_BAD_ALIGN_TYPE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _JERR_BAD_ALIGN_TYPE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT
LBB0_2:
Lloh5:
	adrp	x8, _MAX_ALLOC_CHUNK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MAX_ALLOC_CHUNK@GOTPAGEOFF]
Lloh7:
	ldr	x20, [x8]
	ldr	w0, [x21]
	bl	_SIZEOF
	sdiv	x8, x20, x0
	msub	x8, x8, x0, x20
	cbz	x8, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _JERR_BAD_ALLOC_CHUNK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _JERR_BAD_ALLOC_CHUNK@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT
LBB0_4:
	mov	x0, x19
	bl	_jpeg_mem_init
	mov	x21, x0
	str	x0, [sp, #8]
Lloh11:
	adrp	x22, _my_memory_mgr@GOTPAGE
Lloh12:
	ldr	x22, [x22, _my_memory_mgr@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_SIZEOF
	mov	x1, x0
	mov	x0, x19
	bl	_jpeg_get_small
	mov	x20, x0
	cbnz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_jpeg_mem_term
Lloh13:
	adrp	x8, _JERR_OUT_OF_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _JERR_OUT_OF_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_ERREXIT1
LBB0_6:
Lloh16:
	adrp	x8, _alloc_small@GOTPAGE
Lloh17:
	ldr	x8, [x8, _alloc_small@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20, #56]
Lloh19:
	adrp	x8, _alloc_large@GOTPAGE
Lloh20:
	ldr	x8, [x8, _alloc_large@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _alloc_sarray@GOTPAGE
Lloh23:
	ldr	x9, [x9, _alloc_sarray@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #48]
Lloh25:
	adrp	x8, _alloc_barray@GOTPAGE
Lloh26:
	ldr	x8, [x8, _alloc_barray@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
Lloh28:
	adrp	x9, _request_virt_sarray@GOTPAGE
Lloh29:
	ldr	x9, [x9, _request_virt_sarray@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh31:
	adrp	x8, _request_virt_barray@GOTPAGE
Lloh32:
	ldr	x8, [x8, _request_virt_barray@GOTPAGEOFF]
Lloh33:
	adrp	x9, _realize_virt_arrays@GOTPAGE
Lloh34:
	ldr	x9, [x9, _realize_virt_arrays@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #32]
Lloh37:
	adrp	x8, _access_virt_sarray@GOTPAGE
Lloh38:
	ldr	x8, [x8, _access_virt_sarray@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
Lloh40:
	adrp	x9, _access_virt_barray@GOTPAGE
Lloh41:
	ldr	x9, [x9, _access_virt_barray@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
Lloh43:
	adrp	x8, _free_pool@GOTPAGE
Lloh44:
	ldr	x8, [x8, _free_pool@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	mov	x23, x20
	str	x21, [x23, #8]!
Lloh46:
	adrp	x9, _self_destruct@GOTPAGE
Lloh47:
	ldr	x9, [x9, _self_destruct@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	adrp	x10, _JPOOL_NUMPOOLS@GOTPAGE
Lloh50:
	ldr	x10, [x10, _JPOOL_NUMPOOLS@GOTPAGEOFF]
	stp	w9, w8, [x23, #8]
Lloh51:
	ldrsw	x9, [x10]
Lloh52:
	adrp	x8, _JPOOL_PERMANENT@GOTPAGE
Lloh53:
	ldr	x8, [x8, _JPOOL_PERMANENT@GOTPAGEOFF]
Lloh54:
	ldrsw	x8, [x8]
	cmp	w9, w8
	b.le	LBB0_9
; %bb.7:
	sub	x9, x9, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20, #88]
	lsl	x11, x9, #3
	str	xzr, [x10, x11]
	ldr	x10, [x20, #80]
	str	xzr, [x10, x11]
	sub	x10, x9, #1
	cmp	x9, x8
	mov	x9, x10
	b.gt	LBB0_8
LBB0_9:
	stp	xzr, xzr, [x20, #64]
	ldr	w0, [x22]
	bl	_SIZEOF
	str	x0, [x20]
	str	x23, [x19]
Lloh55:
	adrp	x0, l_.str@PAGE
Lloh56:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_14
; %bb.10:
	mov	w8, #120
	strb	w8, [sp, #7]
Lloh57:
	adrp	x1, l_.str.1@PAGE
Lloh58:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #7
	bl	_sscanf
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.11:
	ldrb	w8, [sp, #7]
	and	w9, w8, #0xffffffdf
	ldr	x8, [sp, #8]
	cmp	w9, #77
	b.ne	LBB0_13
; %bb.12:
	mov	w9, #1000
	mul	x8, x8, x9
	str	x8, [sp, #8]
LBB0_13:
	mov	w9, #1000
	mul	x8, x8, x9
	str	x8, [x23]
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh35
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.cfi_endproc
                                        ; -- End function
	.comm	_ALIGN_TYPE,4,2                 ; @ALIGN_TYPE
	.comm	_JERR_BAD_ALIGN_TYPE,4,2        ; @JERR_BAD_ALIGN_TYPE
	.comm	_MAX_ALLOC_CHUNK,8,3            ; @MAX_ALLOC_CHUNK
	.comm	_JERR_BAD_ALLOC_CHUNK,4,2       ; @JERR_BAD_ALLOC_CHUNK
	.comm	_my_memory_mgr,4,2              ; @my_memory_mgr
	.comm	_JERR_OUT_OF_MEMORY,4,2         ; @JERR_OUT_OF_MEMORY
	.comm	_alloc_small,4,2                ; @alloc_small
	.comm	_alloc_large,4,2                ; @alloc_large
	.comm	_alloc_sarray,4,2               ; @alloc_sarray
	.comm	_alloc_barray,4,2               ; @alloc_barray
	.comm	_request_virt_sarray,4,2        ; @request_virt_sarray
	.comm	_request_virt_barray,4,2        ; @request_virt_barray
	.comm	_realize_virt_arrays,4,2        ; @realize_virt_arrays
	.comm	_access_virt_sarray,4,2         ; @access_virt_sarray
	.comm	_access_virt_barray,4,2         ; @access_virt_barray
	.comm	_free_pool,4,2                  ; @free_pool
	.comm	_self_destruct,4,2              ; @self_destruct
	.comm	_JPOOL_NUMPOOLS,4,2             ; @JPOOL_NUMPOOLS
	.comm	_JPOOL_PERMANENT,4,2            ; @JPOOL_PERMANENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"JPEGMEM"

l_.str.1:                               ; @.str.1
	.asciz	"%ld%c"

.subsections_via_symbols
