	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si2157_attach
_si2157_attach:                         ## @si2157_attach
	.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	%r8, %rbx
	movl	%ecx, %r14d
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, (%r8)
	leaq	-56(%rbp), %r12
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	-52(%rbp), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_strscpy
	movq	%rbx, -48(%rbp)
	sarl	%r14d
	movl	%r14d, -56(%rbp)
	movl	-52(%rbp), %edi
	callq	_request_module
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i2c_new_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	(%rax), %edi
	callq	_try_module_get
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_i2c_unregister_device
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_6:
	subl	(%rax), %r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"si2157"

	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_si2157_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si2157_attach
_si2157_attach:                         ; @si2157_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	x19, x0
	str	x2, [x4]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [sp, #4]
Lloh0:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strscpy
	str	x20, [sp, #8]
	asr	w8, w21, #1
	str	w8, [sp]
	ldr	w0, [sp, #4]
	bl	_request_module
	mov	x1, sp
	mov	x0, x22
	bl	_i2c_new_device
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.2:
	ldr	w0, [x8]
	bl	_try_module_get
	cbz	w0, LBB0_4
; %bb.3:
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_i2c_unregister_device
LBB0_5:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"si2157"

	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_si2157_attach
.subsections_via_symbols
