	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _libelf_getshdrstrndx
__libelf_getshdrstrndx:                 ## @_libelf_getshdrstrndx
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	movq	%rsi, %r14
	movl	8(%rbx), %esi
	movq	_ELFCLASS32@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_7
## %bb.3:
	movq	_ELFCLASS64@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_7
LBB0_4:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
LBB0_5:
	movl	$-1, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	__libelf_ehdr
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	movq	16(%rbx), %rax
	movq	%rax, (%r14)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ELF_K_ELF,8,3                  ## @ELF_K_ELF
	.comm	_ELFCLASS32,4,2                 ## @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ## @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.no_dead_strip	__libelf_getshdrstrndx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _libelf_getshdrstrndx
__libelf_getshdrstrndx:                 ; @_libelf_getshdrstrndx
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ELF_K_ELF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ELF_K_ELF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x19, x1
	ldr	w1, [x20, #8]
Lloh3:
	adrp	x8, _ELFCLASS32@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ELFCLASS32@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ELFCLASS64@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ELFCLASS64@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w1, w8
	ccmp	w1, w9, #4, ne
	b.ne	LBB0_5
; %bb.3:
	mov	x0, x20
	mov	w2, #0
	bl	__libelf_ehdr
	cbz	x0, LBB0_6
; %bb.4:
	mov	w0, #0
	ldr	x8, [x20, #16]
	str	x8, [x19]
	b	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ELF_K_ELF,8,3                  ; @ELF_K_ELF
	.comm	_ELFCLASS32,4,2                 ; @ELFCLASS32
	.comm	_ELFCLASS64,4,2                 ; @ELFCLASS64
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.no_dead_strip	__libelf_getshdrstrndx
.subsections_via_symbols
