	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zx2967_i2c_reset_hardware
_zx2967_i2c_reset_hardware:             ## @zx2967_i2c_reset_hardware
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_I2C_MASTER@GOTPCREL(%rip), %rax
	movq	_I2C_IRQ_MSK_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_REG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_zx2967_i2c_writel
	movl	4(%rbx), %edi
	callq	_clk_get_rate
	cltd
	idivl	(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %r14d
	movq	_REG_CLK_DIV_FS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_zx2967_i2c_writel
	movq	_REG_CLK_DIV_HS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_zx2967_i2c_writel
	movq	_I2C_FIFO_MAX@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	decl	%esi
	movq	_REG_WRCONF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_zx2967_i2c_writel
	movl	(%r14), %esi
	decl	%esi
	movq	_REG_RDCONF@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_zx2967_i2c_writel
	movl	(%r14), %edx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_zx2967_i2c_writel
	movq	%rbx, %rdi
	callq	_zx2967_i2c_flush_fifos
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_MASTER,4,2                 ## @I2C_MASTER
	.comm	_I2C_IRQ_MSK_ENABLE,4,2         ## @I2C_IRQ_MSK_ENABLE
	.comm	_REG_CMD,4,2                    ## @REG_CMD
	.comm	_REG_CLK_DIV_FS,4,2             ## @REG_CLK_DIV_FS
	.comm	_REG_CLK_DIV_HS,4,2             ## @REG_CLK_DIV_HS
	.comm	_I2C_FIFO_MAX,4,2               ## @I2C_FIFO_MAX
	.comm	_REG_WRCONF,4,2                 ## @REG_WRCONF
	.comm	_REG_RDCONF,4,2                 ## @REG_RDCONF
	.no_dead_strip	_zx2967_i2c_reset_hardware
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zx2967_i2c_reset_hardware
_zx2967_i2c_reset_hardware:             ; @zx2967_i2c_reset_hardware
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _I2C_MASTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_MASTER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _I2C_IRQ_MSK_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _I2C_IRQ_MSK_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh6:
	adrp	x8, _REG_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_zx2967_i2c_writel
	ldr	w0, [x19, #4]
	bl	_clk_get_rate
	ldr	w8, [x19]
	sdiv	w8, w0, w8
	sub	w20, w8, #1
Lloh9:
	adrp	x8, _REG_CLK_DIV_FS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _REG_CLK_DIV_FS@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_zx2967_i2c_writel
Lloh12:
	adrp	x8, _REG_CLK_DIV_HS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _REG_CLK_DIV_HS@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_zx2967_i2c_writel
Lloh15:
	adrp	x20, _I2C_FIFO_MAX@GOTPAGE
Lloh16:
	ldr	x20, [x20, _I2C_FIFO_MAX@GOTPAGEOFF]
	ldr	w8, [x20]
	sub	w1, w8, #1
Lloh17:
	adrp	x8, _REG_WRCONF@GOTPAGE
Lloh18:
	ldr	x8, [x8, _REG_WRCONF@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_zx2967_i2c_writel
	ldr	w8, [x20]
	sub	w1, w8, #1
Lloh20:
	adrp	x20, _REG_RDCONF@GOTPAGE
Lloh21:
	ldr	x20, [x20, _REG_RDCONF@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_zx2967_i2c_writel
	ldr	w2, [x20]
	mov	x0, x19
	mov	w1, #1
	bl	_zx2967_i2c_writel
	mov	x0, x19
	bl	_zx2967_i2c_flush_fifos
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_MASTER,4,2                 ; @I2C_MASTER
	.comm	_I2C_IRQ_MSK_ENABLE,4,2         ; @I2C_IRQ_MSK_ENABLE
	.comm	_REG_CMD,4,2                    ; @REG_CMD
	.comm	_REG_CLK_DIV_FS,4,2             ; @REG_CLK_DIV_FS
	.comm	_REG_CLK_DIV_HS,4,2             ; @REG_CLK_DIV_HS
	.comm	_I2C_FIFO_MAX,4,2               ; @I2C_FIFO_MAX
	.comm	_REG_WRCONF,4,2                 ; @REG_WRCONF
	.comm	_REG_RDCONF,4,2                 ; @REG_RDCONF
	.no_dead_strip	_zx2967_i2c_reset_hardware
.subsections_via_symbols
