	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function load_file
_load_file:                             ## @load_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_tmpfile
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_22
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_getc
	movq	_EOF@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	jne	LBB0_4
## %bb.3:
	xorl	%r15d, %r15d
	jmp	LBB0_6
LBB0_4:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_putc
	incq	%r15
	movq	%r13, %rdi
	callq	_getc
	cmpl	(%r14), %eax
	jne	LBB0_5
LBB0_6:
	movq	%r13, %rdi
	callq	_ferror
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	callq	_fclose
	movq	%r12, %rdi
	callq	_ferror
	testq	%rax, %rax
	jne	LBB0_9
## %bb.10:
	movq	%r12, %rdi
	callq	_rewind
	testq	%r15, %r15
	je	LBB0_21
## %bb.11:
	leaq	3(%r15), %rdi
	andq	$-4, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.12:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_getc
	cmpl	(%r14), %eax
	jne	LBB0_14
## %bb.13:
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_14:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cltq
	movq	%rax, (%r13,%rbx,8)
	incq	%rbx
	movq	%r12, %rdi
	callq	_getc
	cmpl	(%r14), %eax
	jne	LBB0_15
LBB0_16:
	movq	%r12, %rdi
	callq	_ferror
	testq	%rax, %rax
	jne	LBB0_18
## %bb.17:
	cmpq	%r15, %rbx
	jne	LBB0_18
## %bb.26:
	movq	%r12, %rdi
	callq	_fclose
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	%rbx, %rdi
	callq	_load_file.cold.1
	jmp	LBB0_23
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_load_file.cold.4
	jmp	LBB0_23
LBB0_9:
	callq	_load_file.cold.3
	jmp	LBB0_23
LBB0_18:
	movq	%r13, %rdi
	callq	_load_file.cold.2
LBB0_23:
	movq	%r12, %rdi
	callq	_fclose
	movl	$1, %edi
	callq	_exit
LBB0_24:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_20
LBB0_19:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
LBB0_20:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function load_file.cold.1
_load_file.cold.1:                      ## @load_file.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function load_file.cold.2
_load_file.cold.2:                      ## @load_file.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function load_file.cold.3
_load_file.cold.3:                      ## @load_file.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function load_file.cold.4
_load_file.cold.4:                      ## @load_file.cold.4
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_perror
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_fclose                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_EOF,4,2                        ## @EOF
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"%s: read error\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"temporary file write error\n"

L_.str.4:                               ## @.str.4
	.asciz	"temporary file read error\n"

L_.str.5:                               ## @.str.5
	.asciz	"%s: out of memory loading file\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s: empty file\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: open failed\n"

L_.str.8:                               ## @.str.8
	.asciz	"makepng: %s: could not open temporary file\n"

	.no_dead_strip	_load_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function load_file
_load_file:                             ; @load_file
	.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	x20, x1
	mov	x22, x0
	bl	_tmpfile
	cbz	x0, LBB0_22
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_fopen
	cbz	x0, LBB0_17
; %bb.2:
	mov	x23, x0
	bl	_getc
Lloh2:
	adrp	x24, _EOF@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EOF@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x21, #0
	b	LBB0_6
LBB0_4:
	mov	x21, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x1, x19
	bl	_putc
	add	x21, x21, #1
	mov	x0, x23
	bl	_getc
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x23
	bl	_ferror
	cbnz	x0, LBB0_18
; %bb.7:
	mov	x0, x23
	bl	_fclose
	mov	x0, x19
	bl	_ferror
	cbnz	x0, LBB0_19
; %bb.8:
	mov	x0, x19
	bl	_rewind
	cbz	x21, LBB0_23
; %bb.9:
	add	x8, x21, #3
	and	x0, x8, #0xfffffffffffffffc
	bl	_malloc
	cbz	x0, LBB0_24
; %bb.10:
	mov	x23, x0
	mov	x0, x19
	bl	_getc
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.11:
	mov	x22, #0
	b	LBB0_14
LBB0_12:
	mov	x8, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sxtw	x9, w0
	add	x22, x8, #1
	str	x9, [x23, x8, lsl #3]
	mov	x0, x19
	bl	_getc
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w9, [x24]
	mov	x8, x22
	cmp	w0, w9
	b.ne	LBB0_13
LBB0_14:
	mov	x0, x19
	bl	_ferror
	cbnz	x0, LBB0_20
; %bb.15:
	cmp	x22, x21
	b.ne	LBB0_20
; %bb.16:
	mov	x0, x19
	bl	_fclose
	str	x23, [x20]
	mov	x0, x21
	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
LBB0_17:
	mov	x0, x22
	bl	_load_file.cold.1
	b	LBB0_21
LBB0_18:
	mov	x0, x22
	mov	x1, x23
	bl	_load_file.cold.4
	b	LBB0_21
LBB0_19:
	bl	_load_file.cold.3
	b	LBB0_21
LBB0_20:
	mov	x0, x23
	bl	_load_file.cold.2
LBB0_21:
	mov	x0, x19
	bl	_fclose
	mov	w0, #1
	bl	_exit
LBB0_22:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh7:
	adrp	x1, l_.str.8@PAGE
Lloh8:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	bl	_exit
LBB0_23:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh12:
	adrp	x1, l_.str.6@PAGE
Lloh13:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	b	LBB0_21
LBB0_24:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	str	x22, [sp]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	b	LBB0_21
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function load_file.cold.1
_load_file.cold.1:                      ; @load_file.cold.1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_perror
Lloh19:
	adrp	x8, _stderr@GOTPAGE
Lloh20:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function load_file.cold.2
_load_file.cold.2:                      ; @load_file.cold.2
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh26:
	adrp	x8, _stderr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function load_file.cold.3
_load_file.cold.3:                      ; @load_file.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh31:
	adrp	x0, l_.str.2@PAGE
Lloh32:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_fprintf
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function load_file.cold.4
_load_file.cold.4:                      ; @load_file.cold.4
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_perror
Lloh38:
	adrp	x8, _stderr@GOTPAGE
Lloh39:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_fclose
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_EOF,4,2                        ; @EOF
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"%s: read error\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"temporary file write error\n"

l_.str.4:                               ; @.str.4
	.asciz	"temporary file read error\n"

l_.str.5:                               ; @.str.5
	.asciz	"%s: out of memory loading file\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s: empty file\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: open failed\n"

l_.str.8:                               ; @.str.8
	.asciz	"makepng: %s: could not open temporary file\n"

	.no_dead_strip	_load_file
.subsections_via_symbols
