	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_prg_headers
_read_prg_headers:                      ## @read_prg_headers
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movslq	%ebx, %r13
	shlq	$2, %r13
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r15
	shrq	$32, %rbx
	movq	(%r12), %rax
	movq	_SEEK_SET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	*(%rax)
	testq	%rax, %rax
	js	LBB0_5
## %bb.2:
	movq	(%r12), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	*8(%rax)
	cmpq	%r13, %rax
	jne	LBB0_6
## %bb.3:
	movq	%r15, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_4:
	movq	__ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_7
LBB0_6:
	movq	%r15, %rdi
	callq	_free
	movq	_errno@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_10
LBB0_7:
	movq	__EIO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	__ENOEXEC@GOTPCREL(%rip), %rax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	__ENOMEM,4,2                    ## @_ENOMEM
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	__EIO,4,2                       ## @_EIO
	.comm	_errno,8,3                      ## @errno
	.comm	__ENOEXEC,4,2                   ## @_ENOEXEC
	.no_dead_strip	_read_prg_headers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_prg_headers
_read_prg_headers:                      ; @read_prg_headers
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	mov	x23, x1
	mov	x22, x0
	sbfiz	x21, x1, #2, #32
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	lsr	x1, x23, #32
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x9]
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	blr	x8
	tbnz	x0, #63, LBB0_5
; %bb.2:
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	blr	x8
	cmp	x0, x21
	b.ne	LBB0_6
; %bb.3:
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_9
LBB0_4:
Lloh3:
	adrp	x8, __ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, __ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_free
	b	LBB0_7
LBB0_6:
	mov	x0, x20
	bl	_free
Lloh5:
	adrp	x8, _errno@GOTPAGE
Lloh6:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, __EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, __EIO@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh10:
	adrp	x8, __ENOEXEC@GOTPAGE
Lloh11:
	ldr	x8, [x8, __ENOEXEC@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	__ENOMEM,4,2                    ; @_ENOMEM
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	__EIO,4,2                       ; @_EIO
	.comm	_errno,8,3                      ; @errno
	.comm	__ENOEXEC,4,2                   ; @_ENOEXEC
	.no_dead_strip	_read_prg_headers
.subsections_via_symbols
