	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_team_mode_register             ## -- Begin function team_mode_register
	.p2align	4, 0x90
_team_mode_register:                    ## @team_mode_register
	.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	%rdi, %rbx
	movl	8(%rdi), %edi
	callq	_is_good_mode_name
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_TEAM_MODE_PRIV_SIZE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	_mode_list_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movl	8(%rbx), %edi
	callq	___find_mode
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_9
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_8:
	movq	%rbx, 8(%r14)
	movq	_mode_list@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	xorl	%ebx, %ebx
LBB0_9:
	movq	_mode_list_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_TEAM_MODE_PRIV_SIZE,8,3        ## @TEAM_MODE_PRIV_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mode_list_lock,4,2             ## @mode_list_lock
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_mode_list,4,2                  ## @mode_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_team_mode_register             ; -- Begin function team_mode_register
	.p2align	2
_team_mode_register:                    ; @team_mode_register
	.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, x0
	ldr	w0, [x0, #8]
	bl	_is_good_mode_name
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TEAM_MODE_PRIV_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TEAM_MODE_PRIV_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x20, x0
Lloh8:
	adrp	x0, _mode_list_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, _mode_list_lock@GOTPAGEOFF]
	bl	_spin_lock
	ldr	w0, [x19, #8]
	bl	___find_mode
	cbz	x0, LBB0_9
; %bb.7:
Lloh10:
	adrp	x8, _EEXIST@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x0, x20
	bl	_kfree
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_9:
	str	x19, [x20, #8]
Lloh15:
	adrp	x1, _mode_list@GOTPAGE
Lloh16:
	ldr	x1, [x1, _mode_list@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add_tail
	mov	w19, #0
LBB0_10:
Lloh17:
	adrp	x0, _mode_list_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _mode_list_lock@GOTPAGEOFF]
	bl	_spin_unlock
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TEAM_MODE_PRIV_SIZE,8,3        ; @TEAM_MODE_PRIV_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mode_list_lock,4,2             ; @mode_list_lock
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_mode_list,4,2                  ; @mode_list
.subsections_via_symbols
