	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_image_get_aout_params  ## -- Begin function pmcstat_image_get_aout_params
	.p2align	4, 0x90
_pmcstat_image_get_aout_params:         ## @pmcstat_image_get_aout_params
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movl	16(%r15), %edi
	callq	_pmcstat_string_unintern
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_assert
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	_EX_SOFTWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_errx
LBB0_2:
	movq	(%r14), %rcx
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	movl	%ebx, %esi
	movq	%r12, %r8
	callq	_snprintf
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_read
	testq	%rax, %rax
	js	LBB0_4
## %bb.8:
	movq	%rax, %r13
	movl	%ebx, %edi
	callq	_close
	cmpl	$4, %r13d
	jne	LBB0_11
## %bb.9:
	movl	-56(%rbp), %edi
	callq	_N_BADMAG
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:
	movq	_PMCSTAT_IMAGE_AOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	jmp	LBB0_11
LBB0_4:
	cmpl	$2, 8(%r14)
	jl	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	%r12, %rsi
	callq	_warn
LBB0_6:
	movq	_PMCSTAT_IMAGE_INDETERMINABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	cmpl	$-1, %ebx
	je	LBB0_11
## %bb.7:
	movl	%ebx, %edi
	callq	_close
LBB0_11:
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_EX_SOFTWARE,4,2                ## @EX_SOFTWARE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERROR: a.out kernel modules are unsupported \"%s\""

L_.str.1:                               ## @.str.1
	.asciz	"%s%s"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: Cannot determine type of \"%s\""

	.comm	_PMCSTAT_IMAGE_INDETERMINABLE,4,2 ## @PMCSTAT_IMAGE_INDETERMINABLE
	.comm	_PMCSTAT_IMAGE_AOUT,4,2         ## @PMCSTAT_IMAGE_AOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmcstat_image_get_aout_params  ; -- Begin function pmcstat_image_get_aout_params
	.p2align	2
_pmcstat_image_get_aout_params:         ; @pmcstat_image_get_aout_params
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
	mov	x24, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	mov	x9, x23
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	ldr	w0, [x0, #16]
	bl	_pmcstat_string_unintern
	mov	x21, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _EX_SOFTWARE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EX_SOFTWARE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_errx
LBB0_2:
	ldr	x3, [x20]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x1, x23
	mov	x4, x21
	bl	_snprintf
Lloh15:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_open
	mov	x22, x0
	tbnz	w0, #31, LBB0_7
; %bb.3:
	sub	x1, x29, #64
	mov	x0, x22
	mov	w2, #4
	bl	_read
	tbnz	x0, #63, LBB0_7
; %bb.4:
	mov	x23, x0
	mov	x0, x22
	bl	_close
	cmp	w23, #4
	b.ne	LBB0_11
; %bb.5:
	ldur	w0, [x29, #-64]
	bl	_N_BADMAG
	cbnz	x0, LBB0_11
; %bb.6:
Lloh18:
	adrp	x8, _PMCSTAT_IMAGE_AOUT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PMCSTAT_IMAGE_AOUT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_11
LBB0_7:
	ldr	w8, [x20, #8]
	cmp	w8, #2
	b.lt	LBB0_9
; %bb.8:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_warn
LBB0_9:
Lloh23:
	adrp	x8, _PMCSTAT_IMAGE_INDETERMINABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PMCSTAT_IMAGE_INDETERMINABLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19]
	cmn	w22, #1
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x22
	bl	_close
LBB0_11:
	mov	sp, x24
	ldur	x8, [x29, #-56]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_EX_SOFTWARE,4,2                ; @EX_SOFTWARE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERROR: a.out kernel modules are unsupported \"%s\""

l_.str.1:                               ; @.str.1
	.asciz	"%s%s"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: Cannot determine type of \"%s\""

	.comm	_PMCSTAT_IMAGE_INDETERMINABLE,4,2 ; @PMCSTAT_IMAGE_INDETERMINABLE
	.comm	_PMCSTAT_IMAGE_AOUT,4,2         ; @PMCSTAT_IMAGE_AOUT
.subsections_via_symbols
