	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_device_create              ## -- Begin function ddb_device_create
	.p2align	4, 0x90
_ddb_device_create:                     ## @ddb_device_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_ddb_num@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_DDB_MAX_ADAPTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_8
LBB0_2:
	movq	%rdi, %rbx
	movq	_ddb_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	(%r12), %rsi
	movq	%rsi, (%rbx)
	movq	_ddbs@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rbx, (%rax,%rsi,8)
	movl	12(%rbx), %r14d
	movq	_ddb_major@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_MKDEV
	movq	(%rbx), %r9
	movq	_ddb_class@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %r8
	movl	%r14d, %esi
	movl	%eax, %edx
	movq	%rbx, %rcx
	callq	_device_create
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	movl	12(%rbx), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	callq	_ddb_device_attrs_add
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_ddb_device_attrs_del
	movl	(%r13), %edi
	movq	(%rbx), %rsi
	callq	_MKDEV
	movq	_ddb_class@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_device_destroy
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movl	%eax, 8(%rbx)
	jmp	LBB0_7
LBB0_6:
	incq	(%r12)
	xorl	%r14d, %r14d
LBB0_7:
	movq	_ddb_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ddb_num,8,3                    ## @ddb_num
	.comm	_DDB_MAX_ADAPTER,8,3            ## @DDB_MAX_ADAPTER
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ddb_mutex,4,2                  ## @ddb_mutex
	.comm	_ddbs,8,3                       ## @ddbs
	.comm	_ddb_class,4,2                  ## @ddb_class
	.comm	_ddb_major,4,2                  ## @ddb_major
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ddbridge%d"

L_.str.1:                               ## @.str.1
	.asciz	"Could not create ddbridge%d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ddb_device_create              ; -- Begin function ddb_device_create
	.p2align	2
_ddb_device_create:                     ; @ddb_device_create
	.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
Lloh0:
	adrp	x22, _ddb_num@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ddb_num@GOTPAGEOFF]
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _DDB_MAX_ADAPTER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DDB_MAX_ADAPTER@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_2:
	mov	x19, x0
Lloh8:
	adrp	x0, _ddb_mutex@GOTPAGE
Lloh9:
	ldr	x0, [x0, _ddb_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	x1, [x22]
	str	x1, [x19]
Lloh10:
	adrp	x21, _ddbs@GOTPAGE
Lloh11:
	ldr	x21, [x21, _ddbs@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x19, [x8, x1, lsl #3]
	ldr	w20, [x19, #12]
Lloh12:
	adrp	x23, _ddb_major@GOTPAGE
Lloh13:
	ldr	x23, [x23, _ddb_major@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_MKDEV
	mov	x2, x0
	ldr	x5, [x19]
Lloh14:
	adrp	x0, _ddb_class@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ddb_class@GOTPAGEOFF]
Lloh16:
	adrp	x4, l_.str@PAGE
Lloh17:
	add	x4, x4, l_.str@PAGEOFF
	mov	x1, x20
	mov	x3, x19
	bl	_device_create
	str	w0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19, #8]
	bl	_PTR_ERR
	mov	x20, x0
	ldr	w0, [x19, #12]
	ldr	x2, [x19]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	b	LBB0_7
LBB0_4:
	mov	x0, x19
	bl	_ddb_device_attrs_add
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_ddb_device_attrs_del
	ldr	w0, [x23]
	ldr	x1, [x19]
	bl	_MKDEV
	mov	x1, x0
Lloh20:
	adrp	x0, _ddb_class@GOTPAGE
Lloh21:
	ldr	x0, [x0, _ddb_class@GOTPAGEOFF]
	bl	_device_destroy
	ldr	x8, [x21]
	ldr	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	str	w0, [x19, #8]
	b	LBB0_7
LBB0_6:
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
LBB0_7:
Lloh25:
	adrp	x0, _ddb_mutex@GOTPAGE
Lloh26:
	ldr	x0, [x0, _ddb_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_ddb_num,8,3                    ; @ddb_num
	.comm	_DDB_MAX_ADAPTER,8,3            ; @DDB_MAX_ADAPTER
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ddb_mutex,4,2                  ; @ddb_mutex
	.comm	_ddbs,8,3                       ; @ddbs
	.comm	_ddb_class,4,2                  ; @ddb_class
	.comm	_ddb_major,4,2                  ; @ddb_major
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ddbridge%d"

l_.str.1:                               ; @.str.1
	.asciz	"Could not create ddbridge%d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
