	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readelfheaderident
_readelfheaderident:                    ## @readelfheaderident
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_EI_NIDENT@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	callq	_read
	cmpq	(%r14), %rax
	jne	LBB0_12
## %bb.1:
	movq	(%rbx), %rax
	movq	_EI_MAG0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_ELFMAG0@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.2:
	movq	_EI_MAG1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_ELFMAG1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.3:
	movq	_EI_MAG2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_ELFMAG2@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	movq	_EI_MAG3@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rcx
	movq	_ELFMAG3@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.7:
	movq	_EI_DATA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdx
	movq	_ELFDATA2LSB@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpq	(%rsi), %rdx
	je	LBB0_10
## %bb.8:
	movq	_ELFDATA2MSB@GOTPCREL(%rip), %rsi
	movl	$1, %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_9
LBB0_10:
	movq	_do_reverse_endian@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_EI_CLASS@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,8), %eax
	jmp	LBB0_11
LBB0_12:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ferr                           ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
LBB0_6:
	callq	_err
	movl	$-1, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_EI_NIDENT,8,3                  ## @EI_NIDENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing or incomplete ELF header."

	.comm	_EI_MAG0,8,3                    ## @EI_MAG0
	.comm	_ELFMAG0,8,3                    ## @ELFMAG0
	.comm	_EI_MAG1,8,3                    ## @EI_MAG1
	.comm	_ELFMAG1,8,3                    ## @ELFMAG1
	.comm	_EI_MAG2,8,3                    ## @EI_MAG2
	.comm	_ELFMAG2,8,3                    ## @ELFMAG2
	.comm	_EI_MAG3,8,3                    ## @EI_MAG3
	.comm	_ELFMAG3,8,3                    ## @ELFMAG3
L_.str.1:                               ## @.str.1
	.asciz	"missing ELF signature."

	.comm	_EI_DATA,8,3                    ## @EI_DATA
	.comm	_ELFDATA2LSB,8,3                ## @ELFDATA2LSB
	.comm	_do_reverse_endian,4,2          ## @do_reverse_endian
	.comm	_ELFDATA2MSB,8,3                ## @ELFDATA2MSB
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported endianness"

	.comm	_EI_CLASS,8,3                   ## @EI_CLASS
	.no_dead_strip	_readelfheaderident
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readelfheaderident
_readelfheaderident:                    ; @readelfheaderident
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x20, _EI_NIDENT@GOTPAGE
Lloh4:
	ldr	x20, [x20, _EI_NIDENT@GOTPAGEOFF]
	ldr	x2, [x20]
	bl	_read
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _EI_MAG0@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EI_MAG0@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh8:
	adrp	x10, _ELFMAG0@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ELFMAG0@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.2:
Lloh11:
	adrp	x9, _EI_MAG1@GOTPAGE
Lloh12:
	ldr	x9, [x9, _EI_MAG1@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh14:
	adrp	x10, _ELFMAG1@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ELFMAG1@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.3:
Lloh17:
	adrp	x9, _EI_MAG2@GOTPAGE
Lloh18:
	ldr	x9, [x9, _EI_MAG2@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh20:
	adrp	x10, _ELFMAG2@GOTPAGE
Lloh21:
	ldr	x10, [x10, _ELFMAG2@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.4:
Lloh23:
	adrp	x9, _EI_MAG3@GOTPAGE
Lloh24:
	ldr	x9, [x9, _EI_MAG3@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh26:
	adrp	x10, _ELFMAG3@GOTPAGE
Lloh27:
	ldr	x10, [x10, _ELFMAG3@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.5:
Lloh29:
	adrp	x9, _EI_DATA@GOTPAGE
Lloh30:
	ldr	x9, [x9, _EI_DATA@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	ldr	x9, [x8, x9, lsl #3]
Lloh32:
	adrp	x10, _ELFDATA2LSB@GOTPAGE
Lloh33:
	ldr	x10, [x10, _ELFDATA2LSB@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_11
; %bb.6:
	mov	w9, #0
	b	LBB0_13
LBB0_7:
Lloh35:
	adrp	x0, l_.str@PAGE
Lloh36:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ferr
LBB0_8:
Lloh37:
	adrp	x0, l_.str.1@PAGE
Lloh38:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_err
	mov	w0, #-1
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh39:
	adrp	x10, _ELFDATA2MSB@GOTPAGE
Lloh40:
	ldr	x10, [x10, _ELFDATA2MSB@GOTPAGEOFF]
Lloh41:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_14
; %bb.12:
	mov	w9, #1
LBB0_13:
Lloh42:
	adrp	x10, _do_reverse_endian@GOTPAGE
Lloh43:
	ldr	x10, [x10, _do_reverse_endian@GOTPAGEOFF]
Lloh44:
	str	w9, [x10]
Lloh45:
	adrp	x9, _EI_CLASS@GOTPAGE
Lloh46:
	ldr	x9, [x9, _EI_CLASS@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	b	LBB0_10
LBB0_14:
Lloh48:
	adrp	x0, l_.str.2@PAGE
Lloh49:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_9
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotStr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_EI_NIDENT,8,3                  ; @EI_NIDENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing or incomplete ELF header."

	.comm	_EI_MAG0,8,3                    ; @EI_MAG0
	.comm	_ELFMAG0,8,3                    ; @ELFMAG0
	.comm	_EI_MAG1,8,3                    ; @EI_MAG1
	.comm	_ELFMAG1,8,3                    ; @ELFMAG1
	.comm	_EI_MAG2,8,3                    ; @EI_MAG2
	.comm	_ELFMAG2,8,3                    ; @ELFMAG2
	.comm	_EI_MAG3,8,3                    ; @EI_MAG3
	.comm	_ELFMAG3,8,3                    ; @ELFMAG3
l_.str.1:                               ; @.str.1
	.asciz	"missing ELF signature."

	.comm	_EI_DATA,8,3                    ; @EI_DATA
	.comm	_ELFDATA2LSB,8,3                ; @ELFDATA2LSB
	.comm	_do_reverse_endian,4,2          ; @do_reverse_endian
	.comm	_ELFDATA2MSB,8,3                ; @ELFDATA2MSB
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported endianness"

	.comm	_EI_CLASS,8,3                   ; @EI_CLASS
	.no_dead_strip	_readelfheaderident
.subsections_via_symbols
