	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_db_init                ## -- Begin function eap_sim_db_init
	.p2align	4, 0x90
_eap_sim_db_init:                       ## @eap_sim_db_init
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	$48, %edi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movl	$-1, (%rax)
	movq	%r13, 8(%rax)
	movq	%r15, 40(%rax)
	movl	%r12d, 16(%rax)
	movq	%r14, %rdi
	callq	_os_strdup
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_os_strstr
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movb	$0, (%rax)
LBB0_4:
	movq	24(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$5, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_eap_sim_db_open_socket
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_eap_sim_db_close_socket
	movq	24(%rbx), %rdi
	callq	_os_free
	movq	%rbx, %rdi
	callq	_os_free
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" db="

L_.str.1:                               ## @.str.1
	.asciz	"unix:"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.2:                               ## @.str.2
	.asciz	"EAP-SIM DB: External database connection not available - will retry later"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_eap_sim_db_init                ; -- Begin function eap_sim_db_init
	.p2align	2
_eap_sim_db_init:                       ; @eap_sim_db_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x23, x2
	mov	x22, x1
	mov	x20, x0
	mov	w0, #48
	bl	_os_zalloc
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.1:
	mov	w8, #-1
	str	w8, [x19]
	str	x23, [x19, #8]
	str	x21, [x19, #40]
	str	w22, [x19, #16]
	mov	x0, x20
	bl	_os_strdup
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_os_strstr
	cbz	x0, LBB0_4
; %bb.3:
	strb	wzr, [x0]
LBB0_4:
	ldr	x0, [x19, #24]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #5
	bl	_os_strncmp
	cbnz	x0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_eap_sim_db_open_socket
	cbz	x0, LBB0_8
; %bb.6:
Lloh4:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_eap_sim_db_close_socket
	ldr	x0, [x19, #24]
	bl	_os_free
	mov	x0, x19
	bl	_os_free
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" db="

l_.str.1:                               ; @.str.1
	.asciz	"unix:"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.2:                               ; @.str.2
	.asciz	"EAP-SIM DB: External database connection not available - will retry later"

.subsections_via_symbols
