	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _gd2ReadChunk
__gd2ReadChunk:                         ## @_gd2ReadChunk
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, %r14
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movl	%edi, %r12d
	movq	%r9, %rdi
	callq	_gdTell
	cmpl	%r12d, %eax
	jne	LBB0_1
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_gd_error
	movl	%eax, %edi
	callq	_GD2_DBG
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_gd_error
	movl	%eax, %edi
	callq	_GD2_DBG
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_gdSeek
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_gd_error
	movl	%eax, %edi
	callq	_GD2_DBG
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%rbx, %rdx
	callq	_gdGetBuf
	cmpl	%r13d, %eax
	jne	LBB0_4
## %bb.5:
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rdi
	movl	%r13d, %esi
	xorl	%eax, %eax
	callq	_gd_error
	movl	%eax, %edi
	callq	_GD2_DBG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_uncompress
	movq	_Z_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.7:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_gd_error
	movq	_TRUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_8
LBB0_4:
	movq	_FALSE@GOTPCREL(%rip), %rbx
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_gd_error
	movq	_FALSE@GOTPCREL(%rip), %rbx
LBB0_8:
	movl	%eax, %edi
	callq	_GD2_DBG
LBB0_9:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Positioning in file to %d"

L_.str.1:                               ## @.str.1
	.asciz	"Already Positioned in file to %d"

L_.str.2:                               ## @.str.2
	.asciz	"Reading file"

	.comm	_FALSE,4,2                      ## @FALSE
L_.str.3:                               ## @.str.3
	.asciz	"Got %d bytes. Uncompressing into buffer of %d bytes"

	.comm	_Z_OK,4,2                       ## @Z_OK
L_.str.4:                               ## @.str.4
	.asciz	"Error %d from uncompress"

L_.str.5:                               ## @.str.5
	.asciz	"Got chunk"

	.comm	_TRUE,4,2                       ## @TRUE
	.no_dead_strip	__gd2ReadChunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _gd2ReadChunk
__gd2ReadChunk:                         ; @_gd2ReadChunk
	.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	x23, x5
	mov	x19, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x24, x0
	mov	x0, x5
	bl	_gdTell
	cmp	w0, w24
	b.ne	LBB0_2
; %bb.1:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_gd_error
	bl	_GD2_DBG
	b	LBB0_3
LBB0_2:
	str	x24, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_gd_error
	bl	_GD2_DBG
	mov	x0, x23
	mov	x1, x24
	bl	_gdSeek
LBB0_3:
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_gd_error
	bl	_GD2_DBG
	mov	x0, x21
	mov	x1, x20
	mov	x2, x23
	bl	_gdGetBuf
	cmp	w0, w20
	b.ne	LBB0_6
; %bb.4:
	ldr	x8, [x19]
	stp	x20, x8, [sp]
Lloh6:
	adrp	x0, l_.str.3@PAGE
Lloh7:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_gd_error
	bl	_GD2_DBG
	mov	x0, x22
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_uncompress
                                        ; kill: def $w0 killed $w0 def $x0
Lloh8:
	adrp	x8, _Z_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Z_OK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:
Lloh11:
	adrp	x0, l_.str.5@PAGE
Lloh12:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_gd_error
Lloh13:
	adrp	x19, _TRUE@GOTPAGE
Lloh14:
	ldr	x19, [x19, _TRUE@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x19, _FALSE@GOTPAGE
Lloh16:
	ldr	x19, [x19, _FALSE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	str	x0, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_gd_error
Lloh19:
	adrp	x19, _FALSE@GOTPAGE
Lloh20:
	ldr	x19, [x19, _FALSE@GOTPAGEOFF]
LBB0_8:
	bl	_GD2_DBG
LBB0_9:
	ldr	w0, [x19]
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Positioning in file to %d"

l_.str.1:                               ; @.str.1
	.asciz	"Already Positioned in file to %d"

l_.str.2:                               ; @.str.2
	.asciz	"Reading file"

	.comm	_FALSE,4,2                      ; @FALSE
l_.str.3:                               ; @.str.3
	.asciz	"Got %d bytes. Uncompressing into buffer of %d bytes"

	.comm	_Z_OK,4,2                       ; @Z_OK
l_.str.4:                               ; @.str.4
	.asciz	"Error %d from uncompress"

l_.str.5:                               ; @.str.5
	.asciz	"Got chunk"

	.comm	_TRUE,4,2                       ; @TRUE
	.no_dead_strip	__gd2ReadChunk
.subsections_via_symbols
