	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function assign_name
_assign_name:                           ## @assign_name
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	_devices_rwsem@GOTPCREL(%rip), %rdi
	callq	_down_write
	movq	%rbx, %rdi
	movl	$37, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_alloc_name
	jmp	LBB0_3
LBB0_2:
	leaq	4(%r14), %rdi
	movq	%rbx, %rsi
	callq	_dev_set_name
LBB0_3:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	leaq	4(%r14), %rbx
	movq	%rbx, %rdi
	callq	_dev_name
	movl	%eax, %edi
	callq	___ib_device_get_by_name
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_ENFILE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movl	8(%r14), %r15d
	movq	%rbx, %rdi
	callq	_dev_name
	movq	_IB_DEVICE_NAME_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_strlcpy
	movq	_xa_limit_31b@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_devices@GOTPCREL(%rip), %rdi
	leaq	_assign_name.last_id(%rip), %r8
	movq	%r14, %rsi
	movq	%r14, %rdx
	callq	_xa_alloc_cyclic
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	%eax, %ebx
LBB0_7:
	movq	_devices_rwsem@GOTPCREL(%rip), %rdi
	callq	_up_write
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_assign_name.last_id,4,2 ## @assign_name.last_id
	.comm	_devices_rwsem,4,2              ## @devices_rwsem
	.comm	_ENFILE,4,2                     ## @ENFILE
	.comm	_IB_DEVICE_NAME_MAX,4,2         ## @IB_DEVICE_NAME_MAX
	.comm	_devices,4,2                    ## @devices
	.comm	_xa_limit_31b,4,2               ## @xa_limit_31b
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_assign_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function assign_name
_assign_name:                           ; @assign_name
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _devices_rwsem@GOTPAGE
Lloh1:
	ldr	x0, [x0, _devices_rwsem@GOTPAGEOFF]
	bl	_down_write
	mov	x0, x20
	mov	w1, #37
	bl	_strchr
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x20
	bl	_alloc_name
	mov	x20, x0
	cbnz	w0, LBB0_6
	b	LBB0_3
LBB0_2:
	add	x0, x19, #4
	mov	x1, x20
	bl	_dev_set_name
	mov	x20, x0
	cbnz	w0, LBB0_6
LBB0_3:
	add	x20, x19, #4
	mov	x0, x20
	bl	_dev_name
	bl	___ib_device_get_by_name
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _ENFILE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENFILE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_5:
	ldr	w21, [x19, #8]
	mov	x0, x20
	bl	_dev_name
	mov	x1, x0
Lloh5:
	adrp	x8, _IB_DEVICE_NAME_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IB_DEVICE_NAME_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_strlcpy
Lloh8:
	adrp	x8, _xa_limit_31b@GOTPAGE
Lloh9:
	ldr	x8, [x8, _xa_limit_31b@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh13:
	ldr	w5, [x8]
Lloh14:
	adrp	x0, _devices@GOTPAGE
Lloh15:
	ldr	x0, [x0, _devices@GOTPAGEOFF]
Lloh16:
	adrp	x4, _assign_name.last_id@PAGE
Lloh17:
	add	x4, x4, _assign_name.last_id@PAGEOFF
	mov	x1, x19
	mov	x2, x19
	bl	_xa_alloc_cyclic
	cmp	w0, #0
	csel	w20, w0, wzr, lt
LBB0_6:
Lloh18:
	adrp	x0, _devices_rwsem@GOTPAGE
Lloh19:
	ldr	x0, [x0, _devices_rwsem@GOTPAGEOFF]
	bl	_up_write
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_assign_name.last_id,4,2 ; @assign_name.last_id
	.comm	_devices_rwsem,4,2              ; @devices_rwsem
	.comm	_ENFILE,4,2                     ; @ENFILE
	.comm	_IB_DEVICE_NAME_MAX,4,2         ; @IB_DEVICE_NAME_MAX
	.comm	_devices,4,2                    ; @devices
	.comm	_xa_limit_31b,4,2               ; @xa_limit_31b
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_assign_name
.subsections_via_symbols
