	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_opal_send_request
_i2c_opal_send_request:                 ## @i2c_opal_send_request
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	xorl	%eax, %eax
	callq	_opal_async_get_token_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%ebx, %edi
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_opal_i2c_request
	movq	_OPAL_ASYNC_COMPLETION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.5:
	leaq	-32(%rbp), %rsi
	movl	%ebx, %edi
	callq	_opal_async_wait_response
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movl	-32(%rbp), %edi
	callq	_opal_get_async_rc
	movl	%eax, %r14d
	movq	_OPAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	je	LBB0_9
## %bb.7:
	movl	%r14d, %edi
	jmp	LBB0_8
LBB0_1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_10
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_10
LBB0_4:
	movl	%eax, %edi
LBB0_8:
	callq	_i2c_opal_translate_error
	movl	%eax, %r14d
LBB0_9:
	movl	%ebx, %edi
	callq	_opal_async_release_token
	movl	%r14d, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get the async token\n"

	.comm	_OPAL_ASYNC_COMPLETION,4,2      ## @OPAL_ASYNC_COMPLETION
	.comm	_OPAL_SUCCESS,4,2               ## @OPAL_SUCCESS
	.no_dead_strip	_i2c_opal_send_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_opal_send_request
_i2c_opal_send_request:                 ; @i2c_opal_send_request
	.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, x1
	mov	x21, x0
	bl	_opal_async_get_token_interruptible
	mov	x19, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_opal_i2c_request
Lloh0:
	adrp	x8, _OPAL_ASYNC_COMPLETION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPAL_ASYNC_COMPLETION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.2:
	add	x1, sp, #8
	mov	x0, x19
	bl	_opal_async_wait_response
	mov	x20, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w0, [sp, #8]
	bl	_opal_get_async_rc
	mov	x20, x0
Lloh3:
	adrp	x8, _OPAL_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPAL_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x20
LBB0_5:
	bl	_i2c_opal_translate_error
	mov	x20, x0
LBB0_6:
	mov	x0, x19
	bl	_opal_async_release_token
	mov	x19, x20
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmn	w19, w8
	b.eq	LBB0_9
; %bb.8:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_9:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get the async token\n"

	.comm	_OPAL_ASYNC_COMPLETION,4,2      ; @OPAL_ASYNC_COMPLETION
	.comm	_OPAL_SUCCESS,4,2               ; @OPAL_SUCCESS
	.no_dead_strip	_i2c_opal_send_request
.subsections_via_symbols
