	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_bus
_reset_bus:                             ## @reset_bus
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, -24(%rbp)
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_I2CRSTCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_close
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	xorl	%eax, %eax
	callq	_printf
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%r14, %rdx
	movq	%rax, %rcx
	callq	_fprintf
	movq	_EX_NOINPUT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movq	_EX_OK@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error opening I2C controller (%s) for resetting: %s\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_EX_NOINPUT,4,2                 ## @EX_NOINPUT
L_.str.1:                               ## @.str.1
	.asciz	"Resetting I2C controller on %s: "

	.comm	_I2CRSTCARD,4,2                 ## @I2CRSTCARD
L_.str.2:                               ## @.str.2
	.asciz	"error: %s\n"

	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
	.comm	_EX_OK,4,2                      ## @EX_OK
L_str:                                  ## @str
	.asciz	"OK"

	.no_dead_strip	_reset_bus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_bus
_reset_bus:                             ; @reset_bus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	str	w0, [sp, #8]
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x0
	str	x19, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
Lloh5:
	adrp	x8, _I2CRSTCARD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _I2CRSTCARD@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	mov	x19, x0
	mov	x0, x20
	bl	_close
	cbz	w19, LBB0_4
; %bb.2:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_strerror
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
Lloh13:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh15:
	adrp	x8, _stderr@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_strerror
	mov	x3, x0
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_fprintf
Lloh23:
	adrp	x8, _EX_NOINPUT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EX_NOINPUT@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh25:
	adrp	x0, l_str@PAGE
Lloh26:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
Lloh27:
	adrp	x8, _EX_OK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EX_OK@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error opening I2C controller (%s) for resetting: %s\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_EX_NOINPUT,4,2                 ; @EX_NOINPUT
l_.str.1:                               ; @.str.1
	.asciz	"Resetting I2C controller on %s: "

	.comm	_I2CRSTCARD,4,2                 ; @I2CRSTCARD
l_.str.2:                               ; @.str.2
	.asciz	"error: %s\n"

	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
	.comm	_EX_OK,4,2                      ; @EX_OK
l_str:                                  ; @str
	.asciz	"OK"

	.no_dead_strip	_reset_bus
.subsections_via_symbols
