	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applespi_check_write_status
_applespi_check_write_status:           ## @applespi_check_write_status
	.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
	testl	%esi, %esi
	js	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	movq	_APPLESPI_STATUS_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	_applespi_check_write_status.status_ok(%rip), %rsi
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	8(%rbx), %rdi
	movl	(%r14), %edx
	movl	(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_5
LBB0_1:
	movl	%esi, %edx
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_5
LBB0_3:
	movl	$1, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @applespi_check_write_status.status_ok
_applespi_check_write_status.status_ok:
	.long	172                             ## 0xac
	.long	39                              ## 0x27
	.long	104                             ## 0x68
	.long	213                             ## 0xd5

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error writing to device: %d\n"

	.comm	_APPLESPI_STATUS_SIZE,4,2       ## @APPLESPI_STATUS_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Error writing to device: %*ph\n"

	.no_dead_strip	_applespi_check_write_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applespi_check_write_status
_applespi_check_write_status:           ; @applespi_check_write_status
	.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, x0
	tbnz	w1, #31, LBB0_3
; %bb.1:
	ldr	w0, [x19]
Lloh0:
	adrp	x20, _APPLESPI_STATUS_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _APPLESPI_STATUS_SIZE@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh2:
	adrp	x1, _applespi_check_write_status.status_ok@PAGE
Lloh3:
	add	x1, x1, _applespi_check_write_status.status_ok@PAGEOFF
	bl	_memcmp
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x0, [x19, #8]
	ldr	w2, [x20]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	mov	x2, x1
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_warn
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	w0, #1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @applespi_check_write_status.status_ok
_applespi_check_write_status.status_ok:
	.long	172                             ; 0xac
	.long	39                              ; 0x27
	.long	104                             ; 0x68
	.long	213                             ; 0xd5

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error writing to device: %d\n"

	.comm	_APPLESPI_STATUS_SIZE,4,2       ; @APPLESPI_STATUS_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Error writing to device: %*ph\n"

	.no_dead_strip	_applespi_check_write_status
.subsections_via_symbols
