	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hl_debugfs_i2c_write
_hl_debugfs_i2c_write:                  ## @hl_debugfs_i2c_write
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_hl_device_disabled_or_in_reset
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	leaq	-88(%rbp), %rdi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_ARMCP_PACKET_I2C_WR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edi
	callq	_cpu_to_le32
	movl	%eax, -56(%rbp)
	movq	%r15, -64(%rbp)
	movq	%r13, -72(%rbp)
	movq	%r12, -80(%rbp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le64
	movl	%eax, -88(%rbp)
	movq	8(%r14), %rax
	movq	_HL_DEVICE_TIMEOUT_USEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	leaq	-88(%rbp), %rsi
	movl	$40, %edx
	xorl	%r8d, %r8d
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%r15d, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ARMCP_PACKET_I2C_WR,4,2        ## @ARMCP_PACKET_I2C_WR
	.comm	_ARMCP_PKT_CTL_OPCODE_SHIFT,4,2 ## @ARMCP_PKT_CTL_OPCODE_SHIFT
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ## @HL_DEVICE_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write to I2C, error %d\n"

	.no_dead_strip	_hl_debugfs_i2c_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hl_debugfs_i2c_write
_hl_debugfs_i2c_write:                  ; @hl_debugfs_i2c_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	bl	_hl_device_disabled_or_in_reset
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh3:
	adrp	x8, _ARMCP_PACKET_I2C_WR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ARMCP_PACKET_I2C_WR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ARMCP_PKT_CTL_OPCODE_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	lsl	w0, w8, w9
	bl	_cpu_to_le32
	str	w0, [sp, #40]
	stp	x22, x23, [sp, #24]
	str	x21, [sp, #16]
	mov	x0, x20
	bl	_cpu_to_le64
	str	w0, [sp, #8]
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _HL_DEVICE_TIMEOUT_USEC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HL_DEVICE_TIMEOUT_USEC@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #40
	mov	x4, #0
	blr	x8
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ARMCP_PACKET_I2C_WR,4,2        ; @ARMCP_PACKET_I2C_WR
	.comm	_ARMCP_PKT_CTL_OPCODE_SHIFT,4,2 ; @ARMCP_PKT_CTL_OPCODE_SHIFT
	.comm	_HL_DEVICE_TIMEOUT_USEC,4,2     ; @HL_DEVICE_TIMEOUT_USEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write to I2C, error %d\n"

	.no_dead_strip	_hl_debugfs_i2c_write
.subsections_via_symbols
