	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_output_enable         ## -- Begin function intel_th_output_enable
	.p2align	4, 0x90
_intel_th_output_enable:                ## @intel_th_output_enable
	.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
	cmpl	$0, (%rdi)
	js	LBB0_19
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%r12d, %r12d
	movq	_intel_th_subdevices@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##     Child Loop BB0_11 Depth 2
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r13d
	jge	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r13d, %r13
	movq	%r13, %r14
	shlq	$4, %r14
	orq	$8, %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$16, %r14
	cmpq	%rax, %r13
	jge	LBB0_7
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r15), %rdi
	movq	-8(%rdi,%r14), %rax
	movq	_INTEL_TH_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	%ebx, (%rdi,%r14)
	jne	LBB0_6
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r13d
	je	LBB0_19
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r14), %r8
	cmpl	%r8d, %r12d
	jge	LBB0_17
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_INTEL_TH_OUTPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movslq	%r12d, %rax
	leaq	(,%rax,8), %rdx
	addq	8(%r14), %rdx
	movq	%r8, %rdi
	subq	%rax, %rdi
	xorl	%esi, %esi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=2
	incq	%rsi
	cmpq	%rsi, %rdi
	je	LBB0_14
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdx,%rsi,8), %rax
	cmpq	%rcx, (%rax)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	cmpl	%ebx, 8(%rax)
	jne	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	addl	%esi, %r12d
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r8d, %r12d
	je	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%r13d
	leal	1(%r12), %eax
	cmpl	%r8d, %r12d
	movl	%eax, %r12d
	jl	LBB0_2
LBB0_19:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_14:
	movslq	%r13d, %rsi
	shlq	$4, %rsi
	addq	(%r15), %rsi
	movq	%r14, %rdi
	callq	_intel_th_subdevice_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_20:
	movq	8(%r14), %rax
	movslq	(%r14), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r14)
	movq	%rbx, (%rax,%rcx,8)
	xorl	%eax, %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_intel_th_subdevices,8,3        ## @intel_th_subdevices
	.comm	_INTEL_TH_OUTPUT,8,3            ## @INTEL_TH_OUTPUT
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_output_enable         ; -- Begin function intel_th_output_enable
	.p2align	2
_intel_th_output_enable:                ; @intel_th_output_enable
	.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
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_15
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	w21, #0
	mov	w23, #0
Lloh0:
	adrp	x22, _intel_th_subdevices@GOTPAGE
Lloh1:
	ldr	x22, [x22, _intel_th_subdevices@GOTPAGEOFF]
Lloh2:
	adrp	x24, _INTEL_TH_OUTPUT@GOTPAGE
Lloh3:
	ldr	x24, [x24, _INTEL_TH_OUTPUT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.ge	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	sbfiz	x25, x23, #4, #32
	sxtw	x23, w23
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x23, x23, #1
	bl	_ARRAY_SIZE
	add	x25, x25, #16
	cmp	x23, w0, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x22]
	ldr	x8, [x0, x25]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	add	x8, x0, x25
	ldr	w8, [x8, #8]
	cmp	w8, w20
	b.ne	LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w23, w0
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrsw	x8, [x19]
	cmp	w21, w8
	b.ge	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x10, [x19, #8]
	ldr	x9, [x24]
	add	x10, x10, w21, sxtw #3
	sub	x11, x8, w21, sxtw
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	w21, w21, #1
	add	x10, x10, #8
	subs	x11, x11, #1
	b.eq	LBB0_16
LBB0_11:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x12, [x10]
	ldr	x13, [x12]
	cmp	x13, x9
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	w12, [x12, #8]
	cmp	w12, w20
	b.ne	LBB0_10
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w21, w8
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w23, w23, #1
	add	w9, w21, #1
	cmp	w21, w8
	mov	x21, x9
	b.lt	LBB0_2
LBB0_15:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_19
LBB0_16:
	ldr	x8, [x22]
	add	x1, x8, w23, sxtw #4
	mov	x0, x19
	bl	_intel_th_subdevice_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.17:
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_18:
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	w10, w9, #1
	str	w10, [x19]
	str	x20, [x8, x9, lsl #3]
LBB0_19:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_intel_th_subdevices,8,3        ; @intel_th_subdevices
	.comm	_INTEL_TH_OUTPUT,8,3            ; @INTEL_TH_OUTPUT
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
