	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_sysfs_new_device
_i2c_sysfs_new_device:                  ## @i2c_sysfs_new_device
	.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
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rdi, %r12
	callq	_to_i2c_adapter
	movq	%rax, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_warn
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdx
	subq	%r13, %rdx
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	decq	%rax
	cmpq	%rax, %rdx
	jle	LBB0_4
## %bb.2:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_4:
	movl	-52(%rbp), %edi
	movq	%r13, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	incq	%rbx
	leaq	L_.str.4(%rip), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-41(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_sscanf
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	cmpl	$1, %eax
	je	LBB0_13
## %bb.6:
	cmpb	$10, -41(%rbp)
	je	LBB0_13
## %bb.7:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.5(%rip), %rsi
LBB0_9:
	leaq	L_.str.2(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	subq	(%rax), %r14
LBB0_12:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	-56(%rbp), %ecx
	leal	-120(%rcx), %eax
	cmpl	$-118, %eax
	ja	LBB0_15
## %bb.14:
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r12, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_15:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_i2c_new_device
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%rax, %rbx
	movq	_core_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_userspace_devices@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	-56(%rbp), %r8d
	movl	-52(%rbp), %ecx
	leaq	L_.str.8(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	callq	_dev_info
	jmp	LBB0_12
LBB0_17:
	movq	_EEXIST@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"The new_device interface is still experimental and may change in a near future\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: Missing parameters\n"

L_.str.2:                               ## @.str.2
	.asciz	"new_device"

	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"%s: Invalid device name\n"

L_.str.4:                               ## @.str.4
	.asciz	"%hi%c"

L_.str.5:                               ## @.str.5
	.asciz	"%s: Can't parse I2C address\n"

L_.str.6:                               ## @.str.6
	.asciz	"%s: Extra parameters\n"

L_.str.7:                               ## @.str.7
	.asciz	"%s: Invalid I2C address 0x%hx\n"

	.comm	_EEXIST,8,3                     ## @EEXIST
	.comm	_core_lock,4,2                  ## @core_lock
	.comm	_userspace_devices,4,2          ## @userspace_devices
L_.str.8:                               ## @.str.8
	.asciz	"%s: Instantiated device %s at 0x%02hx\n"

	.no_dead_strip	_i2c_sysfs_new_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_sysfs_new_device
_i2c_sysfs_new_device:                  ; @i2c_sysfs_new_device
	.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	x19, x3
	mov	x22, x2
	mov	x20, x0
	bl	_to_i2c_adapter
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	x0, x22
	mov	w1, #32
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
Lloh2:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	sub	x2, x0, x22
	cmp	x2, x8
	b.le	LBB0_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str.3@PAGE
Lloh6:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_3:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_4:
	ldr	w0, [sp, #28]
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	add	x0, x23, #1
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #24
	add	x3, sp, #23
	bl	_sscanf
	cmp	w0, #0
	b.le	LBB0_8
; %bb.5:
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.6:
	ldrb	w8, [sp, #23]
	cmp	w8, #10
	b.eq	LBB0_9
; %bb.7:
Lloh11:
	adrp	x1, l_.str.6@PAGE
Lloh12:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_11
LBB0_8:
Lloh13:
	adrp	x1, l_.str.5@PAGE
Lloh14:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_11
LBB0_9:
	ldr	w8, [sp, #24]
	sub	w9, w8, #120
	cmn	w9, #118
	b.hi	LBB0_14
; %bb.10:
Lloh15:
	adrp	x1, l_.str.7@PAGE
Lloh16:
	add	x1, x1, l_.str.7@PAGEOFF
	str	x8, [sp]
LBB0_11:
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_13:
	mov	x0, x19
	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
LBB0_14:
	add	x1, sp, #24
	mov	x0, x21
	bl	_i2c_new_device
	cbz	x0, LBB0_16
; %bb.15:
	mov	x21, x0
Lloh21:
	adrp	x22, _core_lock@GOTPAGE
Lloh22:
	ldr	x22, [x22, _core_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
Lloh23:
	adrp	x1, _userspace_devices@GOTPAGE
Lloh24:
	ldr	x1, [x1, _userspace_devices@GOTPAGEOFF]
	mov	x0, x21
	bl	_list_add_tail
	mov	x0, x22
	bl	_mutex_unlock
	ldp	w4, w3, [sp, #24]
Lloh25:
	adrp	x1, l_.str.8@PAGE
Lloh26:
	add	x1, x1, l_.str.8@PAGEOFF
Lloh27:
	adrp	x2, l_.str.2@PAGE
Lloh28:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	b	LBB0_13
LBB0_16:
Lloh29:
	adrp	x8, _EEXIST@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"The new_device interface is still experimental and may change in a near future\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: Missing parameters\n"

l_.str.2:                               ; @.str.2
	.asciz	"new_device"

	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"%s: Invalid device name\n"

l_.str.4:                               ; @.str.4
	.asciz	"%hi%c"

l_.str.5:                               ; @.str.5
	.asciz	"%s: Can't parse I2C address\n"

l_.str.6:                               ; @.str.6
	.asciz	"%s: Extra parameters\n"

l_.str.7:                               ; @.str.7
	.asciz	"%s: Invalid I2C address 0x%hx\n"

	.comm	_EEXIST,8,3                     ; @EEXIST
	.comm	_core_lock,4,2                  ; @core_lock
	.comm	_userspace_devices,4,2          ; @userspace_devices
l_.str.8:                               ; @.str.8
	.asciz	"%s: Instantiated device %s at 0x%02hx\n"

	.no_dead_strip	_i2c_sysfs_new_device
.subsections_via_symbols
