	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __bsd___iconv_open
___bsd___iconv_open:                    ## @__bsd___iconv_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rdx, -40(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_strstr
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	subl	%r15d, %eax
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_strndup
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r12
	leaq	-40(%rbp), %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	__citrus_iconv_open
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_free
	testl	%ebx, %ebx
	je	LBB0_7
LBB0_3:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_5
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	jmp	LBB0_9
LBB0_6:
	leaq	-40(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	__citrus_iconv_open
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jne	LBB0_3
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_strcasestr
	movl	%eax, %ecx
	movq	-40(%rbp), %rax
	movq	(%rax), %rdx
	movl	%ecx, 16(%rdx)
	movl	$0, (%rdx)
	movq	$0, 8(%rdx)
	jmp	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	movl	$-1, %eax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"//"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"//IGNORE"

	.no_dead_strip	___bsd___iconv_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __bsd___iconv_open
___bsd___iconv_open:                    ; @__bsd___iconv_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	str	x2, [sp, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strstr
	cbz	x0, LBB0_4
; %bb.1:
	sub	w1, w0, w19
	mov	x0, x19
	bl	_strndup
	cbz	x0, LBB0_6
; %bb.2:
	mov	x21, x0
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x21
	bl	__citrus_iconv_open
	mov	x20, x0
	mov	x0, x21
	bl	_free
	cbz	w20, LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _ENOENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _EINVAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w20, w8
	csel	w8, w9, w20, eq
	b	LBB0_7
LBB0_4:
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x19
	bl	__citrus_iconv_open
	mov	x20, x0
	cbnz	w20, LBB0_3
LBB0_5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_strcasestr
	mov	x8, x0
	ldr	x0, [sp, #8]
	ldr	x9, [x0]
	str	w8, [x9, #16]
	str	wzr, [x9]
	str	xzr, [x9, #8]
	b	LBB0_8
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
LBB0_7:
Lloh13:
	adrp	x9, _errno@GOTPAGE
Lloh14:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
	mov	w0, #-1
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"//"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"//IGNORE"

	.no_dead_strip	___bsd___iconv_open
.subsections_via_symbols
