	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_getident                   ## -- Begin function elf_getident
	.p2align	4, 0x90
_elf_getident:                          ## @elf_getident
	.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
	movq	%rsi, %r14
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.4:
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_ELF_C_WRITE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	cmpq	$0, 24(%rbx)
	je	LBB0_6
LBB0_7:
	movq	8(%rbx), %rcx
	movq	_ELF_K_AR@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rcx
	setne	%cl
	movq	_ELF_C_READ@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	testq	%r14, %r14
	je	LBB0_14
## %bb.8:
	movq	8(%rbx), %rcx
	movq	_ELF_K_ELF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_9
## %bb.10:
	movq	_EI_NIDENT@GOTPCREL(%rip), %rax
	cmpq	(%r15), %rcx
	je	LBB0_12
	jmp	LBB0_13
LBB0_1:
	movq	_ARGUMENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_9:
	leaq	16(%rbx), %rax
	cmpq	(%r15), %rcx
	jne	LBB0_13
LBB0_12:
	movq	_SARMAG@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_14:
	movq	24(%rbx), %rbx
	jmp	LBB0_15
LBB0_6:
	movq	_SEQUENCE@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_LIBELF_SET_ERROR
	testq	%r14, %r14
	je	LBB0_15
## %bb.3:
	movq	$0, (%r14)
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARGUMENT,4,2                   ## @ARGUMENT
	.comm	_ELF_C_WRITE,8,3                ## @ELF_C_WRITE
	.comm	_SEQUENCE,4,2                   ## @SEQUENCE
	.comm	_ELF_K_AR,8,3                   ## @ELF_K_AR
	.comm	_ELF_C_READ,8,3                 ## @ELF_C_READ
	.comm	_SARMAG,8,3                     ## @SARMAG
	.comm	_ELF_K_ELF,8,3                  ## @ELF_K_ELF
	.comm	_EI_NIDENT,8,3                  ## @EI_NIDENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_elf_getident                   ; -- Begin function elf_getident
	.p2align	2
_elf_getident:                          ; @elf_getident
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ELF_C_WRITE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ELF_C_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_7
LBB0_3:
	ldr	x9, [x20, #8]
Lloh3:
	adrp	x21, _ELF_K_AR@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ELF_K_AR@GOTPAGEOFF]
	ldr	x10, [x21]
	cmp	x9, x10
Lloh5:
	adrp	x9, _ELF_C_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ELF_C_READ@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, eq
	cset	w0, eq
	bl	_assert
	cbz	x19, LBB0_5
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
Lloh8:
	adrp	x10, _ELF_K_ELF@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ELF_K_ELF@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	add	x11, x20, #16
Lloh11:
	adrp	x12, _EI_NIDENT@GOTPAGE
Lloh12:
	ldr	x12, [x12, _EI_NIDENT@GOTPAGEOFF]
	cmp	x8, x10
	csel	x10, x12, x11, eq
Lloh13:
	adrp	x11, _SARMAG@GOTPAGE
Lloh14:
	ldr	x11, [x11, _SARMAG@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_5:
	ldr	x0, [x20, #24]
	b	LBB0_10
LBB0_6:
Lloh15:
	adrp	x8, _ARGUMENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ARGUMENT@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _SEQUENCE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SEQUENCE@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_LIBELF_SET_ERROR
	mov	x0, #0
	cbz	x19, LBB0_10
; %bb.9:
	str	xzr, [x19]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_ARGUMENT,4,2                   ; @ARGUMENT
	.comm	_ELF_C_WRITE,8,3                ; @ELF_C_WRITE
	.comm	_SEQUENCE,4,2                   ; @SEQUENCE
	.comm	_ELF_K_AR,8,3                   ; @ELF_K_AR
	.comm	_ELF_C_READ,8,3                 ; @ELF_C_READ
	.comm	_SARMAG,8,3                     ; @SARMAG
	.comm	_ELF_K_ELF,8,3                  ; @ELF_K_ELF
	.comm	_EI_NIDENT,8,3                  ; @EI_NIDENT
.subsections_via_symbols
