	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _gb_connection_create
__gb_connection_create:                 ## @_gb_connection_create
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	16(%rbp), %r14
	movq	_gb_connection_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_gb_connection_cport_in_use
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_3
LBB0_4:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movq	%r14, %rdx
	callq	_gb_hd_cport_allocate
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r13
	movl	%r12d, (%rax)
	movl	%r15d, 4(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 72(%r13)
	movq	%rbx, 64(%r13)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, 56(%r13)
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 52(%r13)
	movq	%r14, 8(%r13)
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.9:
	movq	_GB_INTERFACE_QUIRK_NO_CPORT_FEATURES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_11
## %bb.10:
	movq	_GB_CONNECTION_FLAG_NO_FLOWCTRL@GOTPCREL(%rip), %rax
	orq	(%rax), %r14
	movq	%r14, 8(%r13)
LBB0_11:
	movq	_GB_CONNECTION_STATE_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r13)
	leaq	44(%r13), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	40(%r13), %rdi
	callq	_mutex_init
	leaq	36(%r13), %rdi
	callq	_spin_lock_init
	leaq	32(%r13), %rdi
	callq	_INIT_LIST_HEAD
	movq	_WQ_UNBOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	leaq	4(%r14), %rdi
	callq	_dev_name
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	%eax, %ecx
	movl	%r12d, %r8d
	callq	_alloc_workqueue
	movl	%eax, 28(%r13)
	testl	%eax, %eax
	je	LBB0_12
## %bb.14:
	leaq	24(%r13), %rdi
	callq	_kref_init
	movq	%r13, %rdi
	callq	_gb_connection_init_name
	movq	_gb_connections_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irq
	leaq	20(%r13), %rdi
	movq	%r14, %rsi
	callq	_list_add
	movq	%r13, %rdi
	addq	$16, %rdi
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:
	movq	%r15, %rsi
	callq	_list_add
	jmp	LBB0_17
LBB0_5:
	addq	$4, %r13
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r12d, %edx
	callq	_dev_err
	jmp	LBB0_3
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_kfree
	movq	%r14, %rdi
LBB0_13:
	negl	%ebx
	movl	%r12d, %esi
	callq	_gb_hd_cport_release
	movl	%ebx, %r12d
LBB0_3:
	movq	_gb_connection_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r12d, %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_16:
	callq	_INIT_LIST_HEAD
LBB0_17:
	movq	_gb_connections_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock_irq
	movq	_gb_connection_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_trace_gb_connection_create
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gb_connection_mutex,4,2        ## @gb_connection_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cport %u already in use\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate cport: %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GB_INTERFACE_QUIRK_NO_CPORT_FEATURES,4,2 ## @GB_INTERFACE_QUIRK_NO_CPORT_FEATURES
	.comm	_GB_CONNECTION_FLAG_NO_FLOWCTRL,8,3 ## @GB_CONNECTION_FLAG_NO_FLOWCTRL
	.comm	_GB_CONNECTION_STATE_DISABLED,4,2 ## @GB_CONNECTION_STATE_DISABLED
L_.str.2:                               ## @.str.2
	.asciz	"%s:%d"

	.comm	_WQ_UNBOUND,4,2                 ## @WQ_UNBOUND
	.comm	_gb_connections_lock,4,2        ## @gb_connections_lock
	.no_dead_strip	__gb_connection_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _gb_connection_create
__gb_connection_create:                 ; @_gb_connection_create
	.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
	mov	x23, x6
	mov	x26, x5
	mov	x25, x4
	mov	x20, x3
	mov	x24, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, _gb_connection_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _gb_connection_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	x24, LBB0_3
; %bb.1:
	mov	x0, x24
	mov	x1, x25
	bl	_gb_connection_cport_in_use
	cbz	x0, LBB0_3
; %bb.2:
	add	x0, x24, #4
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_dev_err
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_gb_hd_cport_allocate
	mov	x21, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.5:
	mov	x22, x0
	stp	w21, w25, [x0]
	stp	x24, x19, [x0, #64]
	str	x20, [x0, #56]
	str	w26, [x0, #52]
	str	x23, [x0, #8]
	cbz	x24, LBB0_8
; %bb.6:
	ldr	w8, [x24]
Lloh10:
	adrp	x9, _GB_INTERFACE_QUIRK_NO_CPORT_FEATURES@GOTPAGE
Lloh11:
	ldr	x9, [x9, _GB_INTERFACE_QUIRK_NO_CPORT_FEATURES@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh13:
	adrp	x8, _GB_CONNECTION_FLAG_NO_FLOWCTRL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GB_CONNECTION_FLAG_NO_FLOWCTRL@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	orr	x8, x8, x23
	str	x8, [x22, #8]
LBB0_8:
Lloh16:
	adrp	x8, _GB_CONNECTION_STATE_DISABLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _GB_CONNECTION_STATE_DISABLED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x22, #48]
	add	x0, x22, #44
	mov	w1, #0
	bl	_atomic_set
	add	x0, x22, #40
	bl	_mutex_init
	add	x0, x22, #36
	bl	_spin_lock_init
	add	x0, x22, #32
	bl	_INIT_LIST_HEAD
Lloh19:
	adrp	x8, _WQ_UNBOUND@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WQ_UNBOUND@GOTPAGEOFF]
Lloh21:
	ldr	w23, [x8]
	add	x0, x19, #4
	bl	_dev_name
	mov	x3, x0
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	mov	w2, #1
	mov	x4, x21
	bl	_alloc_workqueue
	str	w0, [x22, #28]
	cbz	w0, LBB0_13
; %bb.9:
	add	x0, x22, #24
	bl	_kref_init
	mov	x0, x22
	bl	_gb_connection_init_name
Lloh24:
	adrp	x0, _gb_connections_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, _gb_connections_lock@GOTPAGEOFF]
	bl	_spin_lock_irq
	add	x0, x22, #20
	mov	x1, x19
	bl	_list_add
	add	x0, x22, #16
	cbz	x20, LBB0_16
; %bb.10:
	mov	x1, x20
	bl	_list_add
	b	LBB0_17
LBB0_11:
	add	x0, x19, #4
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	b	LBB0_15
LBB0_12:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_13:
Lloh31:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
	mov	x0, x22
	bl	_kfree
LBB0_14:
	neg	w20, w20
	mov	x0, x19
	mov	x1, x21
	bl	_gb_hd_cport_release
	mov	x21, x20
LBB0_15:
Lloh34:
	adrp	x0, _gb_connection_mutex@GOTPAGE
Lloh35:
	ldr	x0, [x0, _gb_connection_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x21
	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	_ERR_PTR
LBB0_16:
	bl	_INIT_LIST_HEAD
LBB0_17:
Lloh36:
	adrp	x0, _gb_connections_lock@GOTPAGE
Lloh37:
	ldr	x0, [x0, _gb_connections_lock@GOTPAGEOFF]
	bl	_spin_unlock_irq
Lloh38:
	adrp	x0, _gb_connection_mutex@GOTPAGE
Lloh39:
	ldr	x0, [x0, _gb_connection_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x22
	bl	_trace_gb_connection_create
	mov	x0, x22
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_gb_connection_mutex,4,2        ; @gb_connection_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cport %u already in use\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate cport: %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GB_INTERFACE_QUIRK_NO_CPORT_FEATURES,4,2 ; @GB_INTERFACE_QUIRK_NO_CPORT_FEATURES
	.comm	_GB_CONNECTION_FLAG_NO_FLOWCTRL,8,3 ; @GB_CONNECTION_FLAG_NO_FLOWCTRL
	.comm	_GB_CONNECTION_STATE_DISABLED,4,2 ; @GB_CONNECTION_STATE_DISABLED
l_.str.2:                               ; @.str.2
	.asciz	"%s:%d"

	.comm	_WQ_UNBOUND,4,2                 ; @WQ_UNBOUND
	.comm	_gb_connections_lock,4,2        ; @gb_connections_lock
	.no_dead_strip	__gb_connection_create
.subsections_via_symbols
