	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msg_open                       ## -- Begin function msg_open
	.p2align	4, 0x90
_msg_open:                              ## @msg_open
	.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
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	movl	$47, %esi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpb	$0, 1(%rax)
	je	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	jmp	LBB0_4
LBB0_3:
	movq	_LC_MESSAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_setlocale
	movq	%rbx, %rdi
	movq	%rax, %rsi
LBB0_4:
	callq	_join
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	_NL_CAT_LOCALE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_catopen
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.6:
	movl	%eax, %ebx
	movb	$1, _msg_open.first(%rip)
	movq	(%r14), %rdi
	callq	_msg_close
	movq	(%r14), %rax
	movl	%ebx, (%rax)
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_7:
	movq	_M_SYSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_msgq
	movl	$1, %ebx
	jmp	LBB0_17
LBB0_8:
	cmpb	$0, _msg_open.first(%rip)
	je	LBB0_12
## %bb.9:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	_EFTYPE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.11:
	movq	_M_SYSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_14
LBB0_12:
	movb	$1, _msg_open.first(%rip)
	jmp	LBB0_15
LBB0_13:
	movq	_M_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rcx
LBB0_14:
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_msgq_str
LBB0_15:
	movl	$1, %ebx
LBB0_16:
	movq	%r15, %rdi
	callq	_free
LBB0_17:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_msg_open.first,1,2 ## @msg_open.first
	.comm	_LC_MESSAGES,4,2                ## @LC_MESSAGES
	.comm	_M_SYSERR,4,2                   ## @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_errno,8,3                      ## @errno
	.comm	_NL_CAT_LOCALE,4,2              ## @NL_CAT_LOCALE
	.comm	_EFTYPE,8,3                     ## @EFTYPE
	.comm	_M_ERR,4,2                      ## @M_ERR
L_.str.1:                               ## @.str.1
	.asciz	"030|The file %s is not a message catalog"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_msg_open                       ; -- Begin function msg_open
	.p2align	2
_msg_open:                              ; @msg_open
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	w1, #47
	bl	_strrchr
	cbz	x0, LBB0_2
; %bb.1:
	ldrb	w8, [x0, #1]
	cbz	w8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x8, _LC_MESSAGES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LC_MESSAGES@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_setlocale
	mov	x1, x0
	mov	x0, x20
LBB0_4:
	bl	_join
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.5:
Lloh5:
	adrp	x21, _errno@GOTPAGE
Lloh6:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	str	xzr, [x21]
Lloh7:
	adrp	x8, _NL_CAT_LOCALE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NL_CAT_LOCALE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_catopen
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.6:
	mov	x22, x0
	mov	w8, #1
	adrp	x9, _msg_open.first@PAGE
	strb	w8, [x9, _msg_open.first@PAGEOFF]
	ldr	x0, [x19]
	bl	_msg_close
	mov	w21, #0
	ldr	x8, [x19]
	str	w22, [x8]
	b	LBB0_14
LBB0_7:
Lloh10:
	adrp	x8, _M_SYSERR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _M_SYSERR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_msgq
	mov	w21, #1
	b	LBB0_15
LBB0_8:
	adrp	x8, _msg_open.first@PAGE
	ldrb	w9, [x8, _msg_open.first@PAGEOFF]
	tbz	w9, #0, LBB0_11
; %bb.9:
	ldr	x8, [x21]
Lloh13:
	adrp	x9, _EFTYPE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EFTYPE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, #0
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_12
; %bb.10:
Lloh16:
	adrp	x8, _M_ERR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _M_ERR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x3, l_.str.1@PAGE
Lloh20:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_11:
	mov	w21, #1
	strb	w21, [x8, _msg_open.first@PAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh21:
	adrp	x8, _M_SYSERR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _M_SYSERR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x3, l_.str.2@PAGE
Lloh25:
	add	x3, x3, l_.str.2@PAGEOFF
LBB0_13:
	mov	x0, x19
	mov	x2, x20
	bl	_msgq_str
	mov	w21, #1
LBB0_14:
	mov	x0, x20
	bl	_free
LBB0_15:
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_msg_open.first,1,2 ; @msg_open.first
	.comm	_LC_MESSAGES,4,2                ; @LC_MESSAGES
	.comm	_M_SYSERR,4,2                   ; @M_SYSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_errno,8,3                      ; @errno
	.comm	_NL_CAT_LOCALE,4,2              ; @NL_CAT_LOCALE
	.comm	_EFTYPE,8,3                     ; @EFTYPE
	.comm	_M_ERR,4,2                      ; @M_ERR
l_.str.1:                               ; @.str.1
	.asciz	"030|The file %s is not a message catalog"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

.subsections_via_symbols
