	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_swi
_handle_swi:                            ## @handle_swi
	.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	%r12
	pushq	%rbx
	subq	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	callq	_get_word
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_get_byte
	movq	%rax, %r12
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %r15
	movl	%r12d, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_error
	sarl	$2, %ebx
	cmpl	$3, %r12d
	movl	%ebx, %r12d
	ja	LBB0_2
LBB0_3:
	leaq	-96(%rbp), %rsi
	movl	%r14d, %edi
	callq	_exec_swi
	movq	_RDP_OSOpReply@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_RDP_OSOpWord@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	-96(%rbp), %ecx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_send_rdp
	jmp	LBB0_6
LBB0_5:
	movq	_RDP_OSOpNothing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_send_rdp
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unimplemented SWI argument"

L_.str.1:                               ## @.str.1
	.asciz	"bbw-"

	.comm	_RDP_OSOpReply,4,2              ## @RDP_OSOpReply
	.comm	_RDP_OSOpWord,4,2               ## @RDP_OSOpWord
L_.str.2:                               ## @.str.2
	.asciz	"bb-"

	.comm	_RDP_OSOpNothing,4,2            ## @RDP_OSOpNothing
	.no_dead_strip	_handle_swi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_swi
_handle_swi:                            ; @handle_swi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_get_word
	mov	x19, x0
	bl	_get_byte
	mov	x20, x0
	cbz	w20, LBB0_3
; %bb.1:
Lloh3:
	adrp	x21, l_.str@PAGE
Lloh4:
	add	x21, x21, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_error
	asr	w8, w20, #2
	cmp	w20, #3
	mov	x20, x8
	b.hi	LBB0_2
LBB0_3:
	add	x1, sp, #8
	mov	x0, x19
	bl	_exec_swi
Lloh5:
	adrp	x8, _RDP_OSOpReply@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RDP_OSOpReply@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	cbz	x0, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _RDP_OSOpWord@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RDP_OSOpWord@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	ldr	w8, [sp, #8]
	str	x8, [sp]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x8, _RDP_OSOpNothing@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RDP_OSOpNothing@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x0, l_.str.2@PAGE
Lloh17:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_6:
	bl	_send_rdp
	ldur	x8, [x29, #-40]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	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
	add	sp, sp, #112
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unimplemented SWI argument"

l_.str.1:                               ; @.str.1
	.asciz	"bbw-"

	.comm	_RDP_OSOpReply,4,2              ; @RDP_OSOpReply
	.comm	_RDP_OSOpWord,4,2               ; @RDP_OSOpWord
l_.str.2:                               ; @.str.2
	.asciz	"bb-"

	.comm	_RDP_OSOpNothing,4,2            ; @RDP_OSOpNothing
	.no_dead_strip	_handle_swi
.subsections_via_symbols
