	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coresight_alloc_device_name    ## -- Begin function coresight_alloc_device_name
	.p2align	4, 0x90
_coresight_alloc_device_name:           ## @coresight_alloc_device_name
	.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
	pushq	%rax
	.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	_coresight_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_dev_fwnode
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_coresight_search_device_idx
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%ebx, %r8d
	callq	_devm_kasprintf
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_1:
	movl	(%r15), %ebx
	movq	8(%r15), %rdi
	leal	8(,%rbx,8), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_krealloc
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ZERO_OR_NULL_PTR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_coresight_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movslq	%ebx, %r13
	leal	1(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_dev_fwnode
	movq	%rax, (%r12,%r13,8)
	movq	%r12, 8(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r15)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_coresight_mutex,4,2            ## @coresight_mutex
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_coresight_alloc_device_name    ; -- Begin function coresight_alloc_device_name
	.p2align	2
_coresight_alloc_device_name:           ; @coresight_alloc_device_name
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _coresight_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _coresight_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x19
	bl	_dev_fwnode
	mov	x1, x0
	mov	x0, x20
	bl	_coresight_search_device_idx
	mov	x21, x0
Lloh2:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_2
LBB0_1:
	ldr	w1, [x23]
	ldr	w3, [x20, #4]
Lloh4:
	adrp	x2, l_.str@PAGE
Lloh5:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	x4, x21
	bl	_devm_kasprintf
	mov	x19, x0
	b	LBB0_4
LBB0_2:
	ldr	w21, [x20]
	ldr	x0, [x20, #8]
	add	w24, w21, #1
	lsl	w1, w24, #3
	ldr	w2, [x23]
	bl	_krealloc
	mov	x22, x0
	bl	_ZERO_OR_NULL_PTR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x19, #0
LBB0_4:
Lloh6:
	adrp	x0, _coresight_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _coresight_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	sxtw	x25, w21
	mov	x0, x19
	bl	_dev_fwnode
	str	x0, [x22, x25, lsl #3]
	str	x22, [x20, #8]
	str	w24, [x20]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_coresight_mutex,4,2            ; @coresight_mutex
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

.subsections_via_symbols
