	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function core_read_mem
_core_read_mem:                         ## @core_read_mem
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PROCSTAT_CORE_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_assert
	cmpl	$0, 12(%rbx)
	jle	LBB0_13
## %bb.1:
	xorl	%r15d, %r15d
	leaq	-96(%rbp), %r14
	movq	_PT_LOAD@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	12(%rbx), %r15d
	jge	LBB0_13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_gelf_getphdr
	cmpq	%r14, %rax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-96(%rbp), %rax
	cmpq	(%r13), %rax
	jne	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-88(%rbp), %rcx
	cmpq	%r12, %rcx
	jg	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %rax
	addq	%rcx, %rax
	subq	%r12, %rax
	jl	LBB0_12
## %bb.7:
	subq	%rcx, %r12
	addq	-72(%rbp), %r12
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r14, %rax
	jae	LBB0_10
## %bb.8:
	movq	%rax, %r14
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_warnx
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_warnx
LBB0_14:
	movl	$-1, %ebx
	jmp	LBB0_15
LBB0_3:
	movl	$-1, %ebx
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_warnx
LBB0_15:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_core_offset
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_core_read
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	sbbl	%ebx, %ebx
	orl	%r14d, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PROCSTAT_CORE_MAGIC,8,3        ## @PROCSTAT_CORE_MAGIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gelf_getphdr: %s"

	.comm	_PT_LOAD,8,3                    ## @PT_LOAD
L_.str.1:                               ## @.str.1
	.asciz	"format error: attempt to read out of segment"

L_.str.2:                               ## @.str.2
	.asciz	"format error: address %ju not found"

	.no_dead_strip	_core_read_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function core_read_mem
_core_read_mem:                         ; @core_read_mem
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x23, x4
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PROCSTAT_CORE_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PROCSTAT_CORE_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	ldr	w8, [x21, #12]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	w24, #0
	add	x25, sp, #16
Lloh3:
	adrp	x26, _PT_LOAD@GOTPAGE
Lloh4:
	ldr	x26, [x26, _PT_LOAD@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	ldr	w8, [x21, #12]
	cmp	w24, w8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #8]
	add	x2, sp, #16
	mov	x1, x24
	bl	_gelf_getphdr
	cmp	x0, x25
	b.ne	LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #16]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #24]
	cmp	x8, x22
	b.gt	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [sp, #32]
	add	x9, x9, x8
	subs	x10, x9, x22
	b.lt	LBB0_2
; %bb.7:
	ldr	x9, [sp, #40]
	cmp	x10, x19
	b.hs	LBB0_16
; %bb.8:
	cbz	w23, LBB0_15
; %bb.9:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_10:
	str	x22, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_11:
	bl	_warnx
LBB0_12:
	mov	w19, #-1
	b	LBB0_14
LBB0_13:
	mov	w19, #-1
	mov	w0, #-1
	bl	_elf_errmsg
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
LBB0_14:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	mov	x19, x10
LBB0_16:
	sub	x8, x22, x8
	add	x1, x8, x9
	mov	x0, x21
	bl	_core_offset
	cbz	w0, LBB0_12
; %bb.17:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_core_read
	cmp	w0, #0
	csinv	w19, w19, wzr, ne
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PROCSTAT_CORE_MAGIC,8,3        ; @PROCSTAT_CORE_MAGIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gelf_getphdr: %s"

	.comm	_PT_LOAD,8,3                    ; @PT_LOAD
l_.str.1:                               ; @.str.1
	.asciz	"format error: attempt to read out of segment"

l_.str.2:                               ; @.str.2
	.asciz	"format error: address %ju not found"

	.no_dead_strip	_core_read_mem
.subsections_via_symbols
