	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tx2_uncore_pmu_add
_tx2_uncore_pmu_add:                    ## @tx2_uncore_pmu_add
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%edi, %ebx
	leaq	-32(%rbp), %rsi
	callq	_acpi_bus_get_device
	movq	_AE_OK@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	-32(%rbp), %rdi
	callq	_acpi_bus_get_status
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-32(%rbp), %rdi
	cmpl	$0, (%rdi)
	je	LBB0_2
## %bb.4:
	callq	_get_tx2_pmu_type
	movq	_PMU_TYPE_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
## %bb.5:
	movq	-32(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	callq	_tx2_uncore_pmu_init_dev
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %rdi
	callq	_tx2_uncore_pmu_add_dev
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movq	_AE_OK@GOTPCREL(%rip), %r15
	jmp	LBB0_2
LBB0_9:
	movq	_AE_ERROR@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_PMU_TYPE_INVALID,4,2           ## @PMU_TYPE_INVALID
	.comm	_AE_ERROR,4,2                   ## @AE_ERROR
	.no_dead_strip	_tx2_uncore_pmu_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tx2_uncore_pmu_add
_tx2_uncore_pmu_add:                    ; @tx2_uncore_pmu_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x2
	mov	x19, x0
	add	x1, sp, #8
	bl	_acpi_bus_get_device
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_acpi_bus_get_status
	cbz	x0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x21, _AE_OK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AE_OK@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x21]
	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
	add	sp, sp, #64
	ret
LBB0_4:
	ldr	x0, [sp, #8]
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.5:
	bl	_get_tx2_pmu_type
Lloh2:
	adrp	x8, _PMU_TYPE_INVALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PMU_TYPE_INVALID@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x21, _AE_OK@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AE_OK@GOTPAGEOFF]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.6:
	mov	x3, x0
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_tx2_uncore_pmu_init_dev
Lloh7:
	adrp	x19, _AE_ERROR@GOTPAGE
Lloh8:
	ldr	x19, [x19, _AE_ERROR@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_tx2_uncore_pmu_add_dev
	cmp	x0, #0
	csel	x21, x21, x19, eq
	b	LBB0_3
LBB0_8:
	mov	x21, x19
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_PMU_TYPE_INVALID,4,2           ; @PMU_TYPE_INVALID
	.comm	_AE_ERROR,4,2                   ; @AE_ERROR
	.no_dead_strip	_tx2_uncore_pmu_add
.subsections_via_symbols
