	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_catgets                        ## -- Begin function catgets
	.p2align	4, 0x90
_catgets:                               ## @catgets
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rax
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movq	_NLERR@GOTPCREL(%rip), %rcx
	cmpq	%rdi, (%rcx)
	je	LBB0_2
## %bb.3:
	movl	%esi, %r12d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rax), %edi
	callq	_ntohl
	testl	%eax, %eax
	jle	LBB0_18
## %bb.4:
	movl	%eax, %r15d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	decl	%r15d
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%ebx
	movl	%ebx, %r14d
	cmpl	%r15d, %r14d
	jg	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r14), %eax
	movl	%eax, %ebx
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax,%r13,8), %edi
	callq	_ntohl
	cmpl	%r12d, %eax
	je	LBB0_6
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	jle	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	decl	%ebx
	movl	%ebx, %r15d
	cmpl	%r15d, %r14d
	jle	LBB0_5
	jmp	LBB0_18
LBB0_2:
	movq	_EBADF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%edx, (%rcx)
	jmp	LBB0_19
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	callq	_ntohl
	movl	%eax, %r15d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	8(%rbx,%r13,8), %edi
	callq	_ntohl
	movl	%eax, %r12d
	movl	(%rbx,%r13,8), %edi
	callq	_ntohl
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r12,%rax), %r14d
	decl	%r14d
	cmpl	%r14d, %r12d
	jle	LBB0_7
LBB0_18:
	movq	_ENOMSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_19:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movslq	%r15d, %r13
	addq	-48(%rbp), %r13                 ## 8-byte Folded Reload
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	incl	%r15d
	movl	%r15d, %r12d
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r14d, %r12d
	jg	LBB0_18
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%r12), %eax
	movl	%eax, %r15d
	shrl	$31, %r15d
	addl	%eax, %r15d
	sarl	%r15d
	movslq	%r15d, %rbx
	shlq	$4, %rbx
	movl	8(%r13,%rbx), %edi
	callq	_ntohl
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	jle	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_8 Depth=1
	decl	%r15d
	movl	%r15d, %r14d
	jmp	LBB0_13
LBB0_9:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_ntohl
	cltq
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	addq	%rax, %r14
	movl	(%r13,%rbx), %edi
	callq	_ntohl
	cltq
	addq	%r14, %rax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_NLERR,8,3                      ## @NLERR
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOMSG,4,2                     ## @ENOMSG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_catgets                        ; -- Begin function catgets
	.p2align	2
_catgets:                               ; @catgets
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _NLERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NLERR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_6
; %bb.2:
	mov	x20, x2
	mov	x21, x1
	ldr	x23, [x0]
	ldr	w0, [x23, #16]
	bl	_ntohl
	subs	w22, w0, #1
	b.lt	LBB0_11
; %bb.3:
	mov	w25, #0
	add	x24, x23, #24
	mov	w26, #24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w22, w25
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w9, w8, #1
	sbfx	x27, x8, #1, #31
	smaddl	x8, w9, w26, x24
	ldr	w0, [x8, #16]
	bl	_ntohl
	cmp	w0, w21
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w8, w27, #1
	cmp	w0, w21
	csel	w22, w8, w22, gt
	csinc	w25, w25, w27, gt
	cmp	w25, w22
	b.le	LBB0_4
	b	LBB0_11
LBB0_6:
Lloh3:
	adrp	x8, _EBADF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	ldr	w0, [x23, #8]
	bl	_ntohl
	mov	x22, x0
	mov	w8, #24
	madd	x25, x27, x8, x24
	ldr	w0, [x25, #8]
	bl	_ntohl
	mov	x21, x0
	ldr	w0, [x25]
	bl	_ntohl
	add	w8, w21, w0
	sub	w25, w8, #1
	cmp	w21, w25
	b.gt	LBB0_11
; %bb.8:
	add	x22, x24, w22, sxtw
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w25, w21
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w9, w8, #1
	sbfx	x26, x8, #1, #31
	add	x8, x22, w9, sxtw #4
	ldr	w0, [x8, #8]
	bl	_ntohl
	cmp	w0, w20
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	w8, w26, #1
	cmp	w0, w20
	csel	w25, w8, w25, gt
	csinc	w21, w21, w26, gt
	cmp	w21, w25
	b.le	LBB0_9
LBB0_11:
Lloh5:
	adrp	x8, _ENOMSG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMSG@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_14:
	ldr	w0, [x23]
	bl	_ntohl
	add	x19, x24, w0, sxtw
	lsl	x8, x26, #4
	ldr	w0, [x22, x8]
	bl	_ntohl
	add	x19, x19, w0, sxtw
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_NLERR,8,3                      ; @NLERR
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOMSG,4,2                     ; @ENOMSG
.subsections_via_symbols
