	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_elf_hints
_read_elf_hints:                        ## @read_elf_hints
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.1:
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.2:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, (%rax)
	je	LBB0_18
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_4:
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	callq	_fstat
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_6:
	movq	-40(%rbp), %rbx
	movq	_MAXFILESIZE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jle	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_8:
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movl	%r14d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_err
LBB0_10:
	movl	%r14d, %edi
	callq	_close
	movq	(%rbx), %rax
	movq	_ELFHINTS_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_12:
	movl	8(%rbx), %ecx
	cmpl	$1, %ecx
	je	LBB0_14
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_errx
LBB0_14:
	movslq	16(%rbx), %rax
	movq	%rbx, %rcx
	addq	%rax, %rcx
	movslq	12(%rbx), %rax
	leaq	(%rcx,%rax), %rdx
	movq	%rdx, -32(%rbp)
	cmpb	$0, (%rax,%rcx)
	je	LBB0_18
## %bb.15:
	leaq	L_.str.6(%rip), %rsi
	leaq	-32(%rbp), %rdi
	callq	_strsep
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	leaq	L_.str.6(%rip), %r14
	leaq	-32(%rbp), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_add_dir
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strsep
	testq	%rax, %rax
	jne	LBB0_17
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot open \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"Cannot stat \"%s\""

	.comm	_MAXFILESIZE,8,3                ## @MAXFILESIZE
L_.str.2:                               ## @.str.2
	.asciz	"\"%s\" is unreasonably large"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.3:                               ## @.str.3
	.asciz	"Cannot mmap \"%s\""

	.comm	_ELFHINTS_MAGIC,8,3             ## @ELFHINTS_MAGIC
L_.str.4:                               ## @.str.4
	.asciz	"\"%s\": invalid file format"

L_.str.5:                               ## @.str.5
	.asciz	"\"%s\": unrecognized file version (%d)"

L_.str.6:                               ## @.str.6
	.asciz	":"

	.no_dead_strip	_read_elf_hints
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_elf_hints
_read_elf_hints:                        ; @read_elf_hints
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_open
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.1:
	cbnz	w21, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _ENOENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_18
LBB0_3:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_4:
	add	x1, sp, #24
	mov	x0, x20
	bl	_fstat
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.5:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_6:
	ldr	x21, [sp, #24]
Lloh13:
	adrp	x8, _MAXFILESIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAXFILESIZE@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x21, x8
	b.le	LBB0_8
; %bb.7:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_8:
Lloh18:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh20:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh24:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x21
	mov	x4, x20
	mov	w5, #0
	bl	_mmap
	mov	x21, x0
Lloh27:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.9:
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_err
LBB0_10:
	mov	x0, x20
	bl	_close
	ldr	x8, [x21]
Lloh32:
	adrp	x9, _ELFHINTS_MAGIC@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ELFHINTS_MAGIC@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_12:
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.eq	LBB0_14
; %bb.13:
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_errx
LBB0_14:
	ldpsw	x9, x8, [x21, #12]
	add	x8, x21, x8
	add	x10, x8, x9
	str	x10, [sp, #16]
	ldrb	w8, [x8, x9]
	cbz	w8, LBB0_18
; %bb.15:
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	add	x0, sp, #16
	bl	_strsep
	cbz	x0, LBB0_18
; %bb.16:
	mov	x1, x0
Lloh41:
	adrp	x20, l_.str.6@PAGE
Lloh42:
	add	x20, x20, l_.str.6@PAGEOFF
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w2, #1
	bl	_add_dir
	add	x0, sp, #16
	mov	x1, x20
	bl	_strsep
	mov	x1, x0
	cbnz	x0, LBB0_17
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot open \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"Cannot stat \"%s\""

	.comm	_MAXFILESIZE,8,3                ; @MAXFILESIZE
l_.str.2:                               ; @.str.2
	.asciz	"\"%s\" is unreasonably large"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.3:                               ; @.str.3
	.asciz	"Cannot mmap \"%s\""

	.comm	_ELFHINTS_MAGIC,8,3             ; @ELFHINTS_MAGIC
l_.str.4:                               ; @.str.4
	.asciz	"\"%s\": invalid file format"

l_.str.5:                               ; @.str.5
	.asciz	"\"%s\": unrecognized file version (%d)"

l_.str.6:                               ; @.str.6
	.asciz	":"

	.no_dead_strip	_read_elf_hints
.subsections_via_symbols
