	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _gets_s
__gets_s:                               ## @_gets_s
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_stdin@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	$-1, %esi
	callq	_ORIENT
	leaq	-1(%r12), %rbx
	movl	(%r15), %edi
	callq	___sgetc
	movq	%r14, %r13
	cmpl	$10, %eax
	je	LBB0_9
## %bb.1:
	cmpq	$2, %r12
	jl	LBB0_9
## %bb.2:
	movq	$-1, %rbx
	movq	%r14, %r13
	movq	_EOF@GOTPCREL(%rip), %r14
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%r14), %eax
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	%al, (%r13)
	incq	%r13
	movl	(%r15), %edi
	callq	___sgetc
	leaq	-1(%rbx), %rcx
	cmpl	$10, %eax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%r12, %rbx
	cmpq	$1, %rbx
	movq	%rcx, %rbx
	jg	LBB0_3
LBB0_8:
	addq	%rcx, %r12
	movq	%r12, %rbx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	testq	%rbx, %rbx
	jne	LBB0_14
## %bb.10:
	movq	_EOF@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	___sgetc
	cmpl	$10, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	(%rbx), %eax
	jne	LBB0_11
LBB0_13:
	movq	_E2BIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	___throw_constraint_handler_s
	xorl	%r14d, %r14d
	jmp	LBB0_15
LBB0_4:
	cmpq	$-1, %rbx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_5
LBB0_14:
	movb	$0, (%r13)
LBB0_15:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin,4,2                      ## @stdin
	.comm	_EOF,4,2                        ## @EOF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gets_s : end of buffer"

	.comm	_E2BIG,4,2                      ## @E2BIG
	.no_dead_strip	__gets_s
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _gets_s
__gets_s:                               ; @_gets_s
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _stdin@GOTPAGE
Lloh1:
	ldr	x21, [x21, _stdin@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #-1
	bl	_ORIENT
	sub	x22, x20, #1
	ldr	w0, [x21]
	bl	___sgetc
	cmp	w0, #10
	ccmp	x20, #2, #8, ne
	b.ge	LBB0_2
; %bb.1:
	mov	x8, x19
	mov	x24, x22
	cbnz	x24, LBB0_11
	b	LBB0_6
LBB0_2:
	mov	x20, #0
Lloh2:
	adrp	x23, _EOF@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EOF@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	strb	w0, [x19, x20]
	sub	x24, x22, #1
	ldr	w0, [x21]
	bl	___sgetc
	add	x20, x20, #1
	cmp	w0, #10
	ccmp	x22, #1, #4, ne
	mov	x22, x24
	b.gt	LBB0_3
; %bb.5:
	add	x8, x19, x20
	cbnz	x24, LBB0_11
LBB0_6:
Lloh4:
	adrp	x19, _EOF@GOTPAGE
Lloh5:
	ldr	x19, [x19, _EOF@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	___sgetc
	ldr	w8, [x19]
	cmp	w0, #10
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_7
; %bb.8:
Lloh6:
	adrp	x8, _E2BIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _E2BIG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	___throw_constraint_handler_s
	mov	x19, #0
	b	LBB0_12
LBB0_9:
	cbz	x20, LBB0_13
; %bb.10:
	add	x8, x19, x20
LBB0_11:
	strb	wzr, [x8]
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x19, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin,4,2                      ; @stdin
	.comm	_EOF,4,2                        ; @EOF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gets_s : end of buffer"

	.comm	_E2BIG,4,2                      ; @E2BIG
	.no_dead_strip	__gets_s
.subsections_via_symbols
