	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_capi20_get_profile             ## -- Begin function capi20_get_profile
	.p2align	4, 0x90
_capi20_get_profile:                    ## @capi20_get_profile
	.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, %r14
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	movq	_capi_controller_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_get_capi_ctr_by_nr
	movq	_CAPI_REGNOTINSTALLED@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rax), %rdx
	movq	_CAPI_CTR_RUNNING@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_5
## %bb.4:
	addq	$8, %rax
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	_CAPI_NOERROR@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ebx
	movq	_capi_controller_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_1:
	movq	_ncontrollers@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	_CAPI_NOERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ncontrollers,4,2               ## @ncontrollers
	.comm	_CAPI_NOERROR,4,2               ## @CAPI_NOERROR
	.comm	_capi_controller_lock,4,2       ## @capi_controller_lock
	.comm	_CAPI_CTR_RUNNING,8,3           ## @CAPI_CTR_RUNNING
	.comm	_CAPI_REGNOTINSTALLED,4,2       ## @CAPI_REGNOTINSTALLED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_capi20_get_profile             ; -- Begin function capi20_get_profile
	.p2align	2
_capi20_get_profile:                    ; @capi20_get_profile
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x0, _capi_controller_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _capi_controller_lock@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, x20
	bl	_get_capi_ctr_by_nr
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _CAPI_CTR_RUNNING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CAPI_CTR_RUNNING@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x1, x0, #8
	mov	x0, x19
	mov	w2, #4
	bl	_memcpy
Lloh5:
	adrp	x8, _CAPI_NOERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CAPI_NOERROR@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x8, _CAPI_REGNOTINSTALLED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CAPI_REGNOTINSTALLED@GOTPAGEOFF]
LBB0_5:
	ldr	w19, [x8]
Lloh9:
	adrp	x0, _capi_controller_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _capi_controller_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _ncontrollers@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ncontrollers@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh14:
	adrp	x8, _CAPI_NOERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CAPI_NOERROR@GOTPAGEOFF]
Lloh16:
	ldr	w19, [x8]
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ncontrollers,4,2               ; @ncontrollers
	.comm	_CAPI_NOERROR,4,2               ; @CAPI_NOERROR
	.comm	_capi_controller_lock,4,2       ; @capi_controller_lock
	.comm	_CAPI_CTR_RUNNING,8,3           ; @CAPI_CTR_RUNNING
	.comm	_CAPI_REGNOTINSTALLED,4,2       ; @CAPI_REGNOTINSTALLED
.subsections_via_symbols
