	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gets_s                         ## -- Begin function gets_s
	.p2align	4, 0x90
_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	_RSIZE_MAX@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jge	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_6
LBB0_4:
	testq	%r14, %r14
	je	LBB0_5
## %bb.8:
	movq	%rdi, %rbx
	movq	_stdin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FLOCKFILE_CANCELSAFE
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	__gets_s
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_FUNLOCKFILE_CANCELSAFE
	movq	%rbx, %rax
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
LBB0_6:
	callq	___throw_constraint_handler_s
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gets_s : str is NULL"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RSIZE_MAX,8,3                  ## @RSIZE_MAX
L_.str.1:                               ## @.str.1
	.asciz	"gets_s : n > RSIZE_MAX"

L_.str.2:                               ## @.str.2
	.asciz	"gets_s : n == 0"

	.comm	_stdin,4,2                      ## @stdin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gets_s                         ; -- Begin function gets_s
	.p2align	2
_gets_s:                                ; @gets_s
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x8, _RSIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RSIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ge	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
	cbz	x19, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh13:
	adrp	x8, _stdin@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_FLOCKFILE_CANCELSAFE
	mov	x0, x20
	mov	x1, x19
	bl	__gets_s
	mov	x19, x0
	bl	_FUNLOCKFILE_CANCELSAFE
	mov	x0, x19
	b	LBB0_8
LBB0_6:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	___throw_constraint_handler_s
	mov	x0, #0
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gets_s : str is NULL"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RSIZE_MAX,8,3                  ; @RSIZE_MAX
l_.str.1:                               ; @.str.1
	.asciz	"gets_s : n > RSIZE_MAX"

l_.str.2:                               ; @.str.2
	.asciz	"gets_s : n == 0"

	.comm	_stdin,4,2                      ; @stdin
.subsections_via_symbols
