	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_console                    ## -- Begin function osm_console
	.p2align	4, 0x90
_osm_console:                           ## @osm_console
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	%rax, -80(%rbp)
	movq	_POLLIN@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%ecx, -72(%rbp)
	movl	$0, -68(%rbp)
	movslq	16(%rdi), %rdx
	leaq	-64(%rbp), %rsi
	movq	%rdx, -64(%rbp)
	movl	%ecx, -56(%rbp)
	movl	$0, -52(%rbp)
	orq	%rax, %rdx
	testq	%rax, %rax
	leaq	-80(%rbp), %r14
	cmovsq	%rsi, %r14
	shrq	$63, %rdx
	movl	$2, %ebx
	subl	%edx, %ebx
	movq	_loop_command@GOTPCREL(%rip), %r12
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.1:
	xorl	%eax, %eax
	callq	_loop_command_check_time
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	24(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	*%rax
	movq	24(%r15), %rdi
	callq	_fflush
	jmp	LBB0_6
LBB0_5:
	movq	$0, (%r12)
LBB0_6:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_poll
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jle	LBB0_15
## %bb.7:
	movl	-52(%rbp), %eax
	testl	%eax, (%r13)
	je	LBB0_14
## %bb.8:
	movq	$0, -88(%rbp)
	movl	32(%r15), %edx
	leaq	-88(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	callq	_getline
	testq	%rax, %rax
	jle	LBB0_11
## %bb.9:
	movq	-88(%rbp), %rdi
	movq	%r15, %rsi
	callq	_parse_cmd_line
	cmpq	$0, (%r12)
	jne	LBB0_12
## %bb.10:
	movq	24(%r15), %rdi
	callq	_osm_console_prompt
	jmp	LBB0_12
LBB0_14:
	movq	_POLLHUP@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	xorl	%r14d, %r14d
	negl	%eax
	sbbl	%r14d, %r14d
	jmp	LBB0_15
LBB0_11:
	leaq	8(%r15), %rdi
	movq	%r15, %rsi
	callq	_cio_close
LBB0_12:
	movq	-88(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.13:
	callq	_free
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_loop_command,16,3              ## @loop_command
	.comm	_POLLHUP,4,2                    ## @POLLHUP
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_console                    ; -- Begin function osm_console
	.p2align	2
_osm_console:                           ; @osm_console
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	mov	x20, x0
	ldr	x8, [x20, #8]!
	str	x8, [sp, #24]
Lloh3:
	adrp	x24, _POLLIN@GOTPAGE
Lloh4:
	ldr	x24, [x24, _POLLIN@GOTPAGEOFF]
	ldr	w9, [x24]
	stp	w9, wzr, [sp, #32]
	ldrsw	x10, [x20, #8]
	add	x11, sp, #24
	add	x12, x11, #16
	str	x10, [sp, #40]
	stp	w9, wzr, [sp, #48]
	orr	x9, x8, x10
	cmp	x8, #0
	csel	x21, x12, x11, lt
	cmp	x9, #0
	mov	w8, #1
	cinc	w22, w8, ge
Lloh5:
	adrp	x23, _loop_command@GOTPAGE
Lloh6:
	ldr	x23, [x23, _loop_command@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.1:
	bl	_loop_command_check_time
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	x1, [x19, #24]
	cbz	x1, LBB0_5
; %bb.4:
	mov	x0, x19
	blr	x8
	ldr	x0, [x19, #24]
	bl	_fflush
	b	LBB0_6
LBB0_5:
	str	xzr, [x23]
LBB0_6:
	mov	x0, x21
	mov	x1, x22
	mov	w2, #1000
	bl	_poll
	cmp	x0, #1
	b.lt	LBB0_15
; %bb.7:
	ldr	w8, [sp, #52]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	str	xzr, [sp, #16]
	ldr	w2, [x19, #32]
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_getline
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.9:
	ldr	x0, [sp, #16]
	mov	x1, x19
	bl	_parse_cmd_line
	ldr	x8, [x23]
	cbnz	x8, LBB0_13
; %bb.10:
	ldr	x0, [x19, #24]
	bl	_osm_console_prompt
	b	LBB0_13
LBB0_11:
Lloh7:
	adrp	x9, _POLLHUP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _POLLHUP@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	csetm	w0, ne
	b	LBB0_16
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	bl	_cio_close
LBB0_13:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_16
; %bb.14:
	bl	_free
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldr	x8, [sp, #56]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_loop_command,16,3              ; @loop_command
	.comm	_POLLHUP,4,2                    ; @POLLHUP
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
