	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kiconv_lookupconv              ## -- Begin function kiconv_lookupconv
	.p2align	4, 0x90
_kiconv_lookupconv:                     ## @kiconv_lookupconv
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %rdx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.1:
	movq	-32(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.2:
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r14
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %rdx
	movq	%rax, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.4:
	cmpb	$0, (%r14)
	je	LBB0_8
## %bb.5:
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	cmpb	$0, 1(%rax,%rbx)
	leaq	1(%rax,%rbx), %rbx
	jne	LBB0_6
LBB0_8:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	%r14, %rdi
	callq	_free
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r14, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kern.iconv.drvlist"

	.comm	_errno,4,2                      ## @errno
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kiconv_lookupconv              ; -- Begin function kiconv_lookupconv
	.p2align	2
_kiconv_lookupconv:                     ; @kiconv_lookupconv
	.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	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x1, #0
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.1:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_8
; %bb.2:
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x1, x20
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cmn	w0, #1
	b.eq	LBB0_10
; %bb.4:
	ldrb	w8, [x20]
	cbz	w8, LBB0_8
; %bb.5:
	mov	x21, x20
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_strcmp
	cbz	x0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x21
	bl	_strlen
	add	x21, x0, x21
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_6
LBB0_8:
Lloh4:
	adrp	x8, _ENOENT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
	mov	x0, x20
	bl	_free
LBB0_11:
Lloh8:
	adrp	x8, _errno@GOTPAGE
Lloh9:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
LBB0_13:
	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
LBB0_14:
	mov	x0, x20
	bl	_free
	mov	w0, #0
	b	LBB0_13
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kern.iconv.drvlist"

	.comm	_errno,4,2                      ; @errno
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
