	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xenbusb_write_ivar             ## -- Begin function xenbusb_write_ivar
	.p2align	4, 0x90
_xenbusb_write_ivar:                    ## @xenbusb_write_ivar
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movl	%edx, %ebx
	movl	%edi, %r15d
	movl	%esi, %edi
	callq	_device_get_ivars
	movq	%rax, %r13
	leal	-130(%rbx), %eax
	cmpl	$3, %eax
	jb	LBB0_17
## %bb.1:
	cmpl	$128, %ebx
	je	LBB0_17
## %bb.2:
	cmpl	$129, %ebx
	jne	LBB0_18
## %bb.3:
	movq	%r13, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_sx_xlock
	xorl	%ebx, %ebx
	cmpl	%r12d, (%r13)
	je	LBB0_16
## %bb.4:
	movq	_XST_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %esi
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.1(%rip), %r8
	leaq	-60(%rbp), %r9
	xorl	%ecx, %ecx
	callq	_xs_scanf
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %r15
	movq	_EAGAIN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_XST_NIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%r13), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rcx
	movl	%r12d, %r8d
	callq	_xs_printf
	cmpl	(%r14), %eax
	je	LBB0_6
## %bb.7:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movq	_XenbusStateClosing@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	je	LBB0_15
## %bb.9:
	leaq	L_.str.2(%rip), %rdx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_xenbus_dev_fatal
	jmp	LBB0_15
LBB0_17:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_18:
	movq	_ENOENT@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%r12d, (%r13)
	movl	4(%r13), %eax
	movq	_XDF_CONNECTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_14
## %bb.11:
	movq	_XenbusStateClosed@GOTPCREL(%rip), %rdx
	cmpl	%r12d, (%rdx)
	je	LBB0_13
## %bb.12:
	movq	_XenbusStateConnected@GOTPCREL(%rip), %rdx
	cmpl	%r12d, (%rdx)
	jne	LBB0_14
LBB0_13:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%r13)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_device_get_softc
	movq	%rax, %rdi
	callq	_xenbusb_release_confighook
LBB0_14:
	movq	%r13, %rdi
	callq	_wakeup
	xorl	%ebx, %ebx
LBB0_15:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_16:
	movq	%r14, %rdi
	callq	_sx_xunlock
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_XST_NIL,4,2                    ## @XST_NIL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"state"

L_.str.1:                               ## @.str.1
	.asciz	"%d"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_XenbusStateClosing,4,2         ## @XenbusStateClosing
L_.str.2:                               ## @.str.2
	.asciz	"writing new state"

	.comm	_XDF_CONNECTING,4,2             ## @XDF_CONNECTING
	.comm	_XenbusStateClosed,4,2          ## @XenbusStateClosed
	.comm	_XenbusStateConnected,4,2       ## @XenbusStateConnected
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xenbusb_write_ivar             ; -- Begin function xenbusb_write_ivar
	.p2align	2
_xenbusb_write_ivar:                    ; @xenbusb_write_ivar
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x19, x2
	mov	x20, x0
	mov	x0, x1
	bl	_device_get_ivars
	sub	w8, w19, #130
	cmp	w8, #3
	b.lo	LBB0_5
; %bb.1:
	cmp	w19, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w19, #129
	b.ne	LBB0_6
; %bb.3:
	mov	x21, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_sx_xlock
	ldr	w8, [x21]
	cmp	w8, w22
	b.ne	LBB0_9
LBB0_4:
	mov	w23, #0
	b	LBB0_10
LBB0_5:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
LBB0_7:
	ldr	w23, [x8]
LBB0_8:
	mov	x0, x23
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_9:
Lloh4:
	adrp	x26, _XST_NIL@GOTPAGE
Lloh5:
	ldr	x26, [x26, _XST_NIL@GOTPAGEOFF]
	ldr	w0, [x26]
	ldr	w1, [x21, #12]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
Lloh8:
	adrp	x4, l_.str.1@PAGE
Lloh9:
	add	x4, x4, l_.str.1@PAGEOFF
	add	x5, sp, #12
	mov	x3, #0
	bl	_xs_scanf
	mov	x23, x0
	cbz	w0, LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_sx_xunlock
	b	LBB0_8
LBB0_11:
Lloh10:
	adrp	x24, l_.str@PAGE
Lloh11:
	add	x24, x24, l_.str@PAGEOFF
Lloh12:
	adrp	x27, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x27, [x27, _EAGAIN@GOTPAGEOFF]
Lloh14:
	adrp	x25, l_.str.1@PAGE
Lloh15:
	add	x25, x25, l_.str.1@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x26]
	ldr	w1, [x21, #12]
	mov	x2, x24
	mov	x3, x25
	mov	x4, x22
	bl	_xs_printf
	ldr	w8, [x27]
	cmp	w0, w8
	b.eq	LBB0_12
; %bb.13:
	mov	x23, x0
	cbz	w0, LBB0_16
; %bb.14:
Lloh16:
	adrp	x8, _XenbusStateClosing@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XenbusStateClosing@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w8, w22
	b.eq	LBB0_10
; %bb.15:
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	bl	_xenbus_dev_fatal
	b	LBB0_10
LBB0_16:
	str	w22, [x21]
	ldr	w8, [x21, #4]
Lloh21:
	adrp	x9, _XDF_CONNECTING@GOTPAGE
Lloh22:
	ldr	x9, [x9, _XDF_CONNECTING@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
; %bb.17:
Lloh24:
	adrp	x10, _XenbusStateClosed@GOTPAGE
Lloh25:
	ldr	x10, [x10, _XenbusStateClosed@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	adrp	x11, _XenbusStateConnected@GOTPAGE
Lloh28:
	ldr	x11, [x11, _XenbusStateConnected@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	cmp	w10, w22
	ccmp	w11, w22, #4, ne
	b.ne	LBB0_19
; %bb.18:
	bic	w8, w8, w9
	str	w8, [x21, #4]
	mov	x0, x20
	bl	_device_get_softc
	bl	_xenbusb_release_confighook
LBB0_19:
	mov	x0, x21
	bl	_wakeup
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_XST_NIL,4,2                    ; @XST_NIL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"state"

l_.str.1:                               ; @.str.1
	.asciz	"%d"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_XenbusStateClosing,4,2         ; @XenbusStateClosing
l_.str.2:                               ; @.str.2
	.asciz	"writing new state"

	.comm	_XDF_CONNECTING,4,2             ; @XDF_CONNECTING
	.comm	_XenbusStateClosed,4,2          ; @XenbusStateClosed
	.comm	_XenbusStateConnected,4,2       ; @XenbusStateConnected
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
