	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gs_put_char                    ## -- Begin function gs_put_char
	.p2align	4, 0x90
_gs_put_char:                           ## @gs_put_char
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_func_enter
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	movq	_ASYNC_INITIALIZED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rbx)
	je	LBB0_5
## %bb.2:
	leaq	20(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_SERIAL_XMIT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%ecx
	cmpl	%ecx, (%rbx)
	jge	LBB0_3
## %bb.4:
	movq	8(%rbx), %rcx
	movslq	16(%rbx), %rdx
	leal	1(%rdx), %esi
	movl	%esi, 16(%rbx)
	movb	%r14b, (%rcx,%rdx)
	movl	(%rax), %eax
	decl	%eax
	andl	%eax, 16(%rbx)
	incl	(%rbx)
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	callq	_func_exit
	movl	$1, %r12d
	jmp	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_5:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ## @ASYNC_INITIALIZED
	.comm	_SERIAL_XMIT_SIZE,4,2           ## @SERIAL_XMIT_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gs_put_char                    ; -- Begin function gs_put_char
	.p2align	2
_gs_put_char:                           ; @gs_put_char
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
	bl	_func_enter
	ldr	x21, [x20]
	cbz	x21, LBB0_5
; %bb.1:
	ldr	w8, [x21, #24]
Lloh0:
	adrp	x9, _ASYNC_INITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ASYNC_INITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.2:
	add	x20, x21, #20
	mov	x0, x20
	bl	_mutex_lock
	ldr	w9, [x21]
Lloh3:
	adrp	x8, _SERIAL_XMIT_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SERIAL_XMIT_SIZE@GOTPAGEOFF]
	ldr	w10, [x8]
	sub	w10, w10, #1
	cmp	w9, w10
	b.ge	LBB0_4
; %bb.3:
	ldr	x9, [x21, #8]
	ldrsw	x10, [x21, #16]
	add	w11, w10, #1
	str	w11, [x21, #16]
	strb	w19, [x9, x10]
	ldr	w8, [x8]
	sub	w8, w8, #1
	ldr	w9, [x21, #16]
	and	w8, w9, w8
	str	w8, [x21, #16]
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	mov	x0, x20
	bl	_mutex_unlock
	bl	_func_exit
	mov	w0, #1
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_ASYNC_INITIALIZED,4,2          ; @ASYNC_INITIALIZED
	.comm	_SERIAL_XMIT_SIZE,4,2           ; @SERIAL_XMIT_SIZE
.subsections_via_symbols
