	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_gth_assign
_intel_th_gth_assign:                   ## @intel_th_gth_assign
	.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, %r15
	movq	%rdi, %rbx
	addq	$40, %rdi
	callq	_dev_get_drvdata
	cmpq	$0, 32(%rbx)
	je	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	%rax, %r14
	movq	(%r15), %rax
	movq	_INTEL_TH_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	movq	_TH_POSSIBLE_OUTPUTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.5:
	movq	8(%r14), %rcx
	leaq	16(%r15), %r12
	movq	16(%r15), %rdx
	shlq	$4, %rax
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$16, %rbx
	incl	%r13d
	cmpq	%rbx, %rax
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rcx,%rbx)
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r15), %edi
	cmpl	$-1, %edi
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%esi, %edi
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	incl	%esi
	jmp	LBB0_10
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_11:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_lock
	movl	%r13d, 24(%r15)
	movl	$0, 28(%r15)
	movq	8(%r14), %rax
	movq	%r12, 8(%rax,%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_INTEL_TH_OUTPUT,8,3            ## @INTEL_TH_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TH_POSSIBLE_OUTPUTS,4,2        ## @TH_POSSIBLE_OUTPUTS
	.comm	_ENOENT,4,2                     ## @ENOENT
	.no_dead_strip	_intel_th_gth_assign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_th_gth_assign
_intel_th_gth_assign:                   ; @intel_th_gth_assign
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	add	x0, x0, #40
	bl	_dev_get_drvdata
	ldr	x8, [x21, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_2:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _INTEL_TH_OUTPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _INTEL_TH_OUTPUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
Lloh5:
	adrp	x8, _TH_POSSIBLE_OUTPUTS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TH_POSSIBLE_OUTPUTS@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x8]
	cmp	w11, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x20, x0
	mov	w23, #0
	mov	x21, #0
	mov	w8, #0
	ldr	x9, [x0, #8]
	mov	x22, x19
	ldr	x10, [x22, #16]!
	lsl	x11, x11, #4
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #16
	add	w23, w23, #1
	cmp	x11, x21
	b.eq	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9, x21]
	cmp	x12, x10
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w12, [x19, #8]
	cmn	w12, #1
	ccmp	w12, w8, #4, ne
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #1
	b	LBB0_5
LBB0_9:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x8, _ENOENT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	bl	_spin_lock
	stp	w23, wzr, [x19, #24]
	ldr	x8, [x20, #8]
	add	x8, x8, x21
	str	x22, [x8, #8]
	mov	x0, x20
	bl	_spin_unlock
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_INTEL_TH_OUTPUT,8,3            ; @INTEL_TH_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TH_POSSIBLE_OUTPUTS,4,2        ; @TH_POSSIBLE_OUTPUTS
	.comm	_ENOENT,4,2                     ; @ENOENT
	.no_dead_strip	_intel_th_gth_assign
.subsections_via_symbols
