	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_ptrsz                      ## -- Begin function elf_ptrsz
	.p2align	4, 0x90
_elf_ptrsz:                             ## @elf_ptrsz
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	leaq	-8(%rbp), %rsi
	callq	_gelf_getehdr
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	$-1, %edi
	callq	_elf_errmsg
	leaq	L_.str(%rip), %rdi
	movq	%rax, %rsi
	callq	_terminate
LBB0_2:
	movq	-8(%rbp), %rax
	movq	_EI_CLASS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	_ELFCLASS32@GOTPCREL(%rip), %rcx
	movl	$4, %eax
	cmpq	(%rcx), %rsi
	je	LBB0_5
## %bb.3:
	movq	_ELFCLASS64@GOTPCREL(%rip), %rcx
	movl	$8, %eax
	cmpq	(%rcx), %rsi
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_terminate
	xorl	%eax, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to read ELF header: %s\n"

	.comm	_EI_CLASS,8,3                   ## @EI_CLASS
	.comm	_ELFCLASS32,8,3                 ## @ELFCLASS32
	.comm	_ELFCLASS64,8,3                 ## @ELFCLASS64
L_.str.1:                               ## @.str.1
	.asciz	"unknown ELF class %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_ptrsz                      ; -- Begin function elf_ptrsz
	.p2align	2
_elf_ptrsz:                             ; @elf_ptrsz
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.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
	add	x1, sp, #8
	bl	_gelf_getehdr
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w0, #-1
	bl	_elf_errmsg
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_terminate
LBB0_2:
	ldr	x8, [sp, #8]
Lloh2:
	adrp	x9, _EI_CLASS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EI_CLASS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x1, [x8, x9, lsl #3]
Lloh5:
	adrp	x8, _ELFCLASS32@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ELFCLASS32@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_4
; %bb.3:
	mov	w0, #4
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _ELFCLASS64@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ELFCLASS64@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_6
; %bb.5:
	mov	w0, #8
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_terminate
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to read ELF header: %s\n"

	.comm	_EI_CLASS,8,3                   ; @EI_CLASS
	.comm	_ELFCLASS32,8,3                 ; @ELFCLASS32
	.comm	_ELFCLASS64,8,3                 ; @ELFCLASS64
l_.str.1:                               ; @.str.1
	.asciz	"unknown ELF class %d\n"

.subsections_via_symbols
