	.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, %r12
	movq	%rdx, %r13
	movq	%rdi, %r14
	callq	_to_i2c_adapter
	movq	%rax, %r15
	leaq	-56(%rbp), %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	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_5
## %bb.4:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	movl	-52(%rbp), %edi
	movq	%r13, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	incq	%rbx
	leaq	L_.str.3(%rip), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-41(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_sscanf
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:
	cmpl	$1, %eax
	je	LBB0_10
## %bb.8:
	cmpb	$10, -41(%rbp)
	je	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_2
LBB0_6:
	leaq	L_.str.4(%rip), %rsi
LBB0_2:
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subq	(%rax), %r12
LBB0_17:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	-56(%rbp), %eax
	movq	_I2C_ADDR_OFFSET_TEN_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edx
	notl	%edx
	testl	%edx, %ecx
	jne	LBB0_12
## %bb.11:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, -56(%rbp)
	movq	_I2C_CLIENT_TEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, -48(%rbp)
LBB0_12:
	movq	_I2C_ADDR_OFFSET_SLAVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_14
## %bb.13:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, -56(%rbp)
	movq	_I2C_CLIENT_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -48(%rbp)
LBB0_14:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_i2c_new_client_device
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movq	%rax, %r12
	jmp	LBB0_17
LBB0_16:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rsi
	addq	$4, %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.6(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_dev_info
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Missing parameters\n"

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

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

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

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

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

	.comm	_I2C_ADDR_OFFSET_TEN_BIT,4,2    ## @I2C_ADDR_OFFSET_TEN_BIT
	.comm	_I2C_CLIENT_TEN,4,2             ## @I2C_CLIENT_TEN
	.comm	_I2C_ADDR_OFFSET_SLAVE,4,2      ## @I2C_ADDR_OFFSET_SLAVE
	.comm	_I2C_CLIENT_SLAVE,4,2           ## @I2C_CLIENT_SLAVE
L_.str.6:                               ## @.str.6
	.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
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	mov	x0, x22
	mov	w1, #32
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.1:
	mov	x23, x0
Lloh0:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	sub	x8, x8, #1
	sub	x2, x0, x22
	cmp	x2, x8
	b.le	LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_3:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_4:
	ldr	w0, [sp, #20]
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	add	x0, x23, #1
Lloh7:
	adrp	x1, l_.str.3@PAGE
Lloh8:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x2, sp, #16
	add	x3, sp, #15
	bl	_sscanf
	cmp	w0, #0
	b.le	LBB0_8
; %bb.5:
	cmp	w0, #1
	b.eq	LBB0_11
; %bb.6:
	ldrb	w8, [sp, #15]
	cmp	w8, #10
	b.eq	LBB0_11
; %bb.7:
Lloh9:
	adrp	x1, l_.str.5@PAGE
Lloh10:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_9:
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_10:
	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_11:
	ldr	w8, [sp, #16]
Lloh18:
	adrp	x9, _I2C_ADDR_OFFSET_TEN_BIT@GOTPAGE
Lloh19:
	ldr	x9, [x9, _I2C_ADDR_OFFSET_TEN_BIT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	bics	wzr, w9, w8
	b.ne	LBB0_13
; %bb.12:
Lloh21:
	adrp	x10, _I2C_CLIENT_TEN@GOTPAGE
Lloh22:
	ldr	x10, [x10, _I2C_CLIENT_TEN@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh23:
	ldr	w9, [x10]
	ldr	w10, [sp, #24]
	orr	w9, w10, w9
	str	w8, [sp, #16]
	str	w9, [sp, #24]
LBB0_13:
Lloh24:
	adrp	x9, _I2C_ADDR_OFFSET_SLAVE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _I2C_ADDR_OFFSET_SLAVE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
Lloh27:
	adrp	x10, _I2C_CLIENT_SLAVE@GOTPAGE
Lloh28:
	ldr	x10, [x10, _I2C_CLIENT_SLAVE@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh29:
	ldr	w9, [x10]
	ldr	w10, [sp, #24]
	orr	w9, w10, w9
	str	w8, [sp, #16]
	str	w9, [sp, #24]
LBB0_15:
	add	x1, sp, #16
	mov	x0, x21
	bl	_i2c_new_client_device
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.16:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x19, x0
	b	LBB0_10
LBB0_17:
	mov	x0, x21
	bl	_mutex_lock
	add	x1, x21, #4
	mov	x0, x22
	bl	_list_add_tail
	mov	x0, x21
	bl	_mutex_unlock
	ldp	w4, w3, [sp, #16]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
Lloh32:
	adrp	x2, l_.str.1@PAGE
Lloh33:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Missing parameters\n"

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

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

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

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

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

	.comm	_I2C_ADDR_OFFSET_TEN_BIT,4,2    ; @I2C_ADDR_OFFSET_TEN_BIT
	.comm	_I2C_CLIENT_TEN,4,2             ; @I2C_CLIENT_TEN
	.comm	_I2C_ADDR_OFFSET_SLAVE,4,2      ; @I2C_ADDR_OFFSET_SLAVE
	.comm	_I2C_CLIENT_SLAVE,4,2           ; @I2C_CLIENT_SLAVE
l_.str.6:                               ; @.str.6
	.asciz	"%s: Instantiated device %s at 0x%02hx\n"

	.no_dead_strip	_i2c_sysfs_new_device
.subsections_via_symbols
