	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2port_device_register         ## -- Begin function c2port_device_register
	.p2align	4, 0x90
_c2port_device_register:                ## @c2port_device_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	%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, %rbx
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%rsi, %rsi
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	xorl	%edi, %edi
	cmpl	$0, 28(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.3:
	xorl	%edi, %edi
	cmpl	$0, 24(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	xorl	%edi, %edi
	cmpl	$0, 20(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	cmpl	$0, 16(%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_9:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$48, %edi
	callq	_kmalloc
	movq	%rax, %r15
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	movl	(%r12), %edi
	callq	_idr_preload
	movq	_c2port_idr_lock@GOTPCREL(%rip), %r13
	movq	%r13, %rdi
	callq	_spin_lock_irq
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_c2port_idr@GOTPCREL(%rip), %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_spin_unlock_irq
	xorl	%eax, %eax
	callq	_idr_preload_end
	testl	%r12d, %r12d
	js	LBB0_14
## %bb.12:
	movl	%r12d, (%r15)
	movl	4(%rbx), %eax
	imull	(%rbx), %eax
	movq	_bin_attr_flash_data@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_c2port_class@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %r8
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	movl	%r12d, %r9d
	callq	_device_create
	movl	%eax, 4(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	4(%r15), %edi
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	callq	_PTR_ERR
	movl	%eax, %r12d
	movq	_c2port_idr_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irq
	movl	(%r15), %esi
	movq	_c2port_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
	movq	%rbx, %rdi
	callq	_spin_unlock_irq
LBB0_14:
	movq	%r15, %rdi
	callq	_kfree
	movl	%r12d, %edi
	jmp	LBB0_8
LBB0_15:
	movq	%r15, %rsi
	callq	_dev_set_drvdata
	movl	40(%r15), %edi
	movq	_C2PORT_NAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_strncpy
	movq	%rbx, 32(%r15)
	movq	%r15, %rdi
	addq	$24, %rdi
	callq	_mutex_init
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	*8(%rbx)
	movl	4(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_info
	movl	4(%r15), %edi
	movl	(%rbx), %ecx
	movl	4(%rbx), %r8d
	movl	%r8d, %r9d
	imull	%ecx, %r9d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_c2port_idr_lock,4,2            ## @c2port_idr_lock
	.comm	_c2port_idr,4,2                 ## @c2port_idr
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.comm	_bin_attr_flash_data,4,2        ## @bin_attr_flash_data
	.comm	_c2port_class,4,2               ## @c2port_class
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"c2port%d"

	.comm	_C2PORT_NAME_LEN,4,2            ## @C2PORT_NAME_LEN
L_.str.1:                               ## @.str.1
	.asciz	"C2 port %s added\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s flash has %d blocks x %d bytes (%d bytes total)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_c2port_device_register         ; -- Begin function c2port_device_register
	.p2align	2
_c2port_device_register:                ; @c2port_device_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
	cmp	x1, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.1:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x20, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.3:
	ldr	w8, [x20, #24]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	w8, [x20, #20]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x20, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_9
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_ERR_PTR
LBB0_9:
Lloh2:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #48
	bl	_kmalloc
	mov	x21, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_11
; %bb.10:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_11:
	ldr	w0, [x22]
	bl	_idr_preload
Lloh6:
	adrp	x23, _c2port_idr_lock@GOTPAGE
Lloh7:
	ldr	x23, [x23, _c2port_idr_lock@GOTPAGEOFF]
	mov	x0, x23
	bl	_spin_lock_irq
Lloh8:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
Lloh11:
	adrp	x0, _c2port_idr@GOTPAGE
Lloh12:
	ldr	x0, [x0, _c2port_idr@GOTPAGEOFF]
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_idr_alloc
	mov	x22, x0
	mov	x0, x23
	bl	_spin_unlock_irq
	bl	_idr_preload_end
	tbnz	w22, #31, LBB0_14
; %bb.12:
	str	w22, [x21]
	ldp	w8, w9, [x20]
	mul	w8, w9, w8
Lloh13:
	adrp	x9, _bin_attr_flash_data@GOTPAGE
Lloh14:
	ldr	x9, [x9, _bin_attr_flash_data@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
Lloh16:
	adrp	x8, _c2port_class@GOTPAGE
Lloh17:
	ldr	x8, [x8, _c2port_class@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x4, l_.str@PAGE
Lloh20:
	add	x4, x4, l_.str@PAGEOFF
	mov	x1, #0
	mov	w2, #0
	mov	x3, x21
	mov	x5, x22
	bl	_device_create
	str	w0, [x21, #4]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x21, #4]
	cbz	x8, LBB0_15
; %bb.13:
	bl	_PTR_ERR
	mov	x22, x0
Lloh21:
	adrp	x19, _c2port_idr_lock@GOTPAGE
Lloh22:
	ldr	x19, [x19, _c2port_idr_lock@GOTPAGEOFF]
	mov	x0, x19
	bl	_spin_lock_irq
	ldr	w1, [x21]
Lloh23:
	adrp	x0, _c2port_idr@GOTPAGE
Lloh24:
	ldr	x0, [x0, _c2port_idr@GOTPAGEOFF]
	bl	_idr_remove
	mov	x0, x19
	bl	_spin_unlock_irq
LBB0_14:
	mov	x0, x21
	bl	_kfree
	mov	x0, x22
	b	LBB0_8
LBB0_15:
	mov	x1, x21
	bl	_dev_set_drvdata
	ldr	w0, [x21, #40]
Lloh25:
	adrp	x8, _C2PORT_NAME_LEN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _C2PORT_NAME_LEN@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_strncpy
	str	x20, [x21, #32]
	add	x0, x21, #24
	bl	_mutex_init
	stp	xzr, xzr, [x21, #8]
	ldr	x8, [x20, #8]
	mov	x0, x21
	mov	w1, #0
	blr	x8
	ldr	w0, [x21, #4]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_info
	ldr	w0, [x21, #4]
	ldp	w8, w9, [x20]
	mul	w10, w9, w8
	stp	x8, x9, [sp]
	str	x10, [sp, #16]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_dev_info
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_c2port_idr_lock,4,2            ; @c2port_idr_lock
	.comm	_c2port_idr,4,2                 ; @c2port_idr
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.comm	_bin_attr_flash_data,4,2        ; @bin_attr_flash_data
	.comm	_c2port_class,4,2               ; @c2port_class
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"c2port%d"

	.comm	_C2PORT_NAME_LEN,4,2            ; @C2PORT_NAME_LEN
l_.str.1:                               ; @.str.1
	.asciz	"C2 port %s added\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s flash has %d blocks x %d bytes (%d bytes total)\n"

.subsections_via_symbols
