	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_alloc                 ## -- Begin function intel_th_alloc
	.p2align	4, 0x90
_intel_th_alloc:                        ## @intel_th_alloc
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %ecx
	movq	_intel_th_ida@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ida_simple_get
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	testl	%ebx, %ebx
	js	LBB0_20
## %bb.3:
	movq	_TH_POSSIBLE_OUTPUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	_intel_th_output_fops@GOTPCREL(%rip), %r8
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	___register_chrdev
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, 4(%rax)
	testl	%ebx, %ebx
	js	LBB0_19
## %bb.4:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$-1, 8(%rcx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%rcx)
	movq	%r15, 24(%rcx)
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.5:
	movl	%r12d, %r12d
	xorl	%r15d, %r15d
	movq	_IORESOURCE_TYPE_BITS@GOTPCREL(%rip), %rbx
	xorl	%r14d, %r14d
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r15
	cmpq	%r15, %r12
	je	LBB0_16
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15,8), %edx
	movl	(%rbx), %eax
	andl	%edx, %eax
	cmpl	$129, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$128, %eax
	jne	LBB0_14
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rax
	movslq	%r14d, %rcx
	incl	%r14d
	movq	(%r13,%r15,8), %rdx
	movq	%rdx, (%rax,%rcx,8)
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	%r14d, %r12d
	movq	%r13, %r14
	movl	4(%r13,%r15,8), %ebx
	movq	_intel_th_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_dev_name
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%eax, %r8d
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	callq	_devm_request_irq
	testl	%eax, %eax
	jne	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$-1, 8(%rax)
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %r13
	jmp	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%r15,%r15), %rax
	movq	%r14, %r13
	movl	4(%r14,%rax,4), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 8(%rcx)
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%r12d, %r14d
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	_IORESOURCE_TYPE_BITS@GOTPCREL(%rip), %rbx
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_16:
	movl	%r14d, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	%eax, 12(%r14)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dev_set_drvdata
	movq	%rbx, %rdi
	callq	_pm_runtime_no_callbacks
	movq	%rbx, %rdi
	callq	_pm_runtime_put
	movq	%rbx, %rdi
	callq	_pm_runtime_allow
	movq	%r14, %rdi
	callq	_intel_th_populate
	testl	%eax, %eax
	je	LBB0_22
## %bb.17:
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_th_free
	jmp	LBB0_21
LBB0_22:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movq	_TH_POSSIBLE_OUTPUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	xorl	%esi, %esi
	callq	___unregister_chrdev
LBB0_19:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_intel_th_ida@GOTPCREL(%rip), %rdi
	callq	_ida_simple_remove
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_21:
	movl	%ebx, %edi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_intel_th_ida,4,2               ## @intel_th_ida
	.comm	_TH_POSSIBLE_OUTPUTS,4,2        ## @TH_POSSIBLE_OUTPUTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"intel_th/output"

	.comm	_intel_th_output_fops,4,2       ## @intel_th_output_fops
	.comm	_IORESOURCE_TYPE_BITS,4,2       ## @IORESOURCE_TYPE_BITS
	.comm	_intel_th_irq,4,2               ## @intel_th_irq
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.1:                               ## @.str.1
	.asciz	"Unknown resource type %lx\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_th_alloc                 ; -- Begin function intel_th_alloc
	.p2align	2
_intel_th_alloc:                        ; @intel_th_alloc
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x3
	mov	x21, x2
	mov	x24, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	w3, [x22]
Lloh2:
	adrp	x0, _intel_th_ida@GOTPAGE
Lloh3:
	ldr	x0, [x0, _intel_th_ida@GOTPAGEOFF]
	mov	w1, #0
	mov	w2, #0
	bl	_ida_simple_get
	str	w0, [x19]
	tbnz	w0, #31, LBB0_14
; %bb.2:
Lloh4:
	adrp	x8, _TH_POSSIBLE_OUTPUTS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TH_POSSIBLE_OUTPUTS@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
Lloh7:
	adrp	x3, l_.str@PAGE
Lloh8:
	add	x3, x3, l_.str@PAGEOFF
Lloh9:
	adrp	x4, _intel_th_output_fops@GOTPAGE
Lloh10:
	ldr	x4, [x4, _intel_th_output_fops@GOTPAGEOFF]
	mov	w0, #0
	mov	w1, #0
	bl	___register_chrdev
	str	w0, [x19, #4]
	tbnz	w0, #31, LBB0_17
; %bb.3:
	mov	w8, #-1
	str	w8, [x19, #8]
	stp	x24, x20, [x19, #24]
	mov	w26, #0
	cbz	w23, LBB0_15
; %bb.4:
	mov	w27, w23
	add	x28, x21, #4
Lloh11:
	adrp	x25, _IORESOURCE_TYPE_BITS@GOTPAGE
Lloh12:
	ldr	x25, [x25, _IORESOURCE_TYPE_BITS@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str.1@PAGE
Lloh14:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_dev_warn
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x28, x28, #8
	subs	x27, x27, #1
	b.eq	LBB0_15
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w2, [x28, #-4]
	ldr	w8, [x25]
	and	w8, w8, w2
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #16]
	ldur	x9, [x28, #-4]
	str	x9, [x8, w26, sxtw #3]
	add	w26, w26, #1
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w22, [x28]
Lloh15:
	adrp	x8, _intel_th_irq@GOTPAGE
Lloh16:
	ldr	x8, [x8, _intel_th_irq@GOTPAGEOFF]
Lloh17:
	ldr	w23, [x8]
Lloh18:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh20:
	ldr	w24, [x8]
	mov	x0, x20
	bl	_dev_name
	mov	x4, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x5, x19
	bl	_devm_request_irq
	cbnz	w0, LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19, #8]
	cmn	w8, #1
	b.ne	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x28]
	str	w8, [x19, #8]
	b	LBB0_6
LBB0_13:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_20
LBB0_14:
	mov	x22, x0
	b	LBB0_19
LBB0_15:
	str	w26, [x19, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	mov	x0, x20
	bl	_pm_runtime_no_callbacks
	mov	x0, x20
	bl	_pm_runtime_put
	mov	x0, x20
	bl	_pm_runtime_allow
	mov	x0, x19
	bl	_intel_th_populate
	cbz	w0, LBB0_21
; %bb.16:
	mov	x22, x0
	mov	x0, x19
	bl	_intel_th_free
	b	LBB0_20
LBB0_17:
	mov	x22, x0
LBB0_18:
	ldr	w1, [x19]
Lloh24:
	adrp	x0, _intel_th_ida@GOTPAGE
Lloh25:
	ldr	x0, [x0, _intel_th_ida@GOTPAGEOFF]
	bl	_ida_simple_remove
LBB0_19:
	mov	x0, x19
	bl	_kfree
LBB0_20:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_21:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	mov	x22, x0
	ldr	w0, [x19, #4]
Lloh26:
	adrp	x8, _TH_POSSIBLE_OUTPUTS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _TH_POSSIBLE_OUTPUTS@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x3, l_.str@PAGE
Lloh30:
	add	x3, x3, l_.str@PAGEOFF
	mov	w1, #0
	bl	___unregister_chrdev
	b	LBB0_18
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_intel_th_ida,4,2               ; @intel_th_ida
	.comm	_TH_POSSIBLE_OUTPUTS,4,2        ; @TH_POSSIBLE_OUTPUTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"intel_th/output"

	.comm	_intel_th_output_fops,4,2       ; @intel_th_output_fops
	.comm	_IORESOURCE_TYPE_BITS,4,2       ; @IORESOURCE_TYPE_BITS
	.comm	_intel_th_irq,4,2               ; @intel_th_irq
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.1:                               ; @.str.1
	.asciz	"Unknown resource type %lx\n"

.subsections_via_symbols
