	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_io_thread                ## -- Begin function start_io_thread
	.p2align	4, 0x90
_start_io_thread:                       ## @start_io_thread
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_os_pipe
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_kernel_fd@GOTPCREL(%rip), %r12
	movl	-48(%rbp), %eax
	movl	-44(%rbp), %edi
	movl	%eax, (%r12)
	movl	%edi, (%r14)
	xorl	%esi, %esi
	callq	_os_set_fd_block
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
LBB0_6:
	movl	-48(%rbp), %edi
	callq	_os_close_file
	movl	-44(%rbp), %edi
	callq	_os_close_file
	movl	$-1, (%r12)
	movl	$-1, (%r14)
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %ebx
	movl	%eax, %esi
	negl	%esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_7
LBB0_4:
	movq	_io_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CLONE_FILES@GOTPCREL(%rip), %rax
	movq	_CLONE_VM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_clone
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, %ebx
	negl	%ebx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printk
	jmp	LBB0_6
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start_io_thread - os_pipe failed, err = %d\n"

	.comm	_kernel_fd,4,2                  ## @kernel_fd
L_.str.1:                               ## @.str.1
	.asciz	"start_io_thread - failed to set nonblocking I/O.\n"

	.comm	_io_thread,4,2                  ## @io_thread
	.comm	_CLONE_FILES,4,2                ## @CLONE_FILES
	.comm	_CLONE_VM,4,2                   ## @CLONE_VM
	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"start_io_thread - clone failed : errno = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_start_io_thread                ; -- Begin function start_io_thread
	.p2align	2
_start_io_thread:                       ; @start_io_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x0, sp, #16
	mov	w1, #1
	mov	w2, #1
	bl	_os_pipe
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh3:
	adrp	x22, _kernel_fd@GOTPAGE
Lloh4:
	ldr	x22, [x22, _kernel_fd@GOTPAGEOFF]
	ldp	w8, w0, [sp, #16]
	str	w8, [x22]
	str	w0, [x19]
	mov	w1, #0
	bl	_os_set_fd_block
	cbz	w0, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_3:
	bl	_printk
	ldr	w0, [sp, #16]
	bl	_os_close_file
	ldr	w0, [sp, #20]
	bl	_os_close_file
	mov	w8, #-1
	str	w8, [x22]
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
	mov	x20, x0
	neg	w8, w0
	str	x8, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _io_thread@GOTPAGE
Lloh10:
	ldr	x8, [x8, _io_thread@GOTPAGEOFF]
Lloh11:
	adrp	x9, _CLONE_FILES@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CLONE_FILES@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	ldr	w8, [x9]
Lloh15:
	adrp	x9, _CLONE_VM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CLONE_VM@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x1, x21
	mov	x3, #0
	bl	_clone
	mov	x20, x0
	tbnz	w0, #31, LBB0_8
LBB0_6:
	ldr	x8, [sp, #24]
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_9
; %bb.7:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
Lloh21:
	adrp	x8, _errno@GOTPAGE
Lloh22:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w20, w8
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start_io_thread - os_pipe failed, err = %d\n"

	.comm	_kernel_fd,4,2                  ; @kernel_fd
l_.str.1:                               ; @.str.1
	.asciz	"start_io_thread - failed to set nonblocking I/O.\n"

	.comm	_io_thread,4,2                  ; @io_thread
	.comm	_CLONE_FILES,4,2                ; @CLONE_FILES
	.comm	_CLONE_VM,4,2                   ; @CLONE_VM
	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"start_io_thread - clone failed : errno = %d\n"

.subsections_via_symbols
