	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_sim_db_open_socket
_eap_sim_db_open_socket:                ## @eap_sim_db_open_socket
	.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	%rdi, %rbx
	movq	16(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$5, %edx
	callq	_os_strncmp
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_PF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_os_memset
	movq	_AF_UNIX@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, -40(%rbp)
	movq	-48(%rbp), %r15
	xorl	%eax, %eax
	callq	_getpid
	movl	_eap_sim_db_open_socket.counter(%rip), %r8d
	leal	1(%r8), %ecx
	movl	%ecx, _eap_sim_db_open_socket.counter(%rip)
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movl	$8, %esi
	movl	%eax, %ecx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_os_snprintf
	movq	8(%rbx), %rdi
	callq	_os_free
	movq	-48(%rbp), %rdi
	callq	_os_strdup
	movq	%rax, 8(%rbx)
	movl	(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	-48(%rbp), %rsi
	movl	$16, %edx
	callq	_bind
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_os_memset
	movq	(%r12), %rax
	movq	%rax, -40(%rbp)
	movq	-48(%rbp), %rdi
	movq	16(%rbx), %rsi
	addq	$5, %rsi
	movl	$8, %edx
	callq	_os_strlcpy
	movl	(%rbx), %edi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_connect
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	movl	(%rbx), %edi
	movq	_eap_sim_db_receive@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_eloop_register_read_sock
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_2:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_wpa_printf
	jmp	LBB0_10
LBB0_6:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_wpa_printf
	movl	(%rbx), %edi
LBB0_4:
	callq	_close
	movl	$-1, (%rbx)
	jmp	LBB0_10
LBB0_8:
	movq	_MSG_INFO@GOTPCREL(%rip), %r12
	movl	(%r12), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	callq	_wpa_printf
	movl	(%r12), %r15d
	movq	-48(%rbp), %r12
	movq	%r12, %rdi
	callq	_os_strlen
	leaq	L_.str.5(%rip), %rsi
	movl	%r15d, %edi
	movq	%r12, %rdx
	movl	%eax, %ecx
	callq	_wpa_hexdump_ascii
	movl	(%rbx), %edi
	callq	_close
	movl	$-1, (%rbx)
	movq	8(%rbx), %rdi
	callq	_unlink
	movq	8(%rbx), %rdi
	callq	_os_free
	movq	$0, 8(%rbx)
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_eap_sim_db_open_socket.counter,4,2 ## @eap_sim_db_open_socket.counter
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unix:"

	.comm	_PF_UNIX,4,2                    ## @PF_UNIX
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"socket(eap_sim_db): %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_AF_UNIX,8,3                    ## @AF_UNIX
L_.str.2:                               ## @.str.2
	.asciz	"/tmp/eap_sim_db_%d-%d"

L_.str.3:                               ## @.str.3
	.asciz	"bind(eap_sim_db): %s"

L_.str.4:                               ## @.str.4
	.asciz	"connect(eap_sim_db): %s"

L_.str.5:                               ## @.str.5
	.asciz	"HLR/AuC GW socket"

	.comm	_eap_sim_db_receive,4,2         ## @eap_sim_db_receive
	.no_dead_strip	_eap_sim_db_open_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_sim_db_open_socket
_eap_sim_db_open_socket:                ; @eap_sim_db_open_socket
	.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
	ldr	x0, [x0, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #5
	bl	_os_strncmp
	cbz	x0, LBB0_3
LBB0_1:
	mov	w20, #-1
LBB0_2:
	mov	x0, x20
	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_3:
Lloh2:
	adrp	x8, _PF_UNIX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PF_UNIX@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	str	w0, [x19]
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_os_memset
Lloh8:
	adrp	x21, _AF_UNIX@GOTPAGE
Lloh9:
	ldr	x21, [x21, _AF_UNIX@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [sp, #8]
	ldr	x20, [sp]
	bl	_getpid
	mov	x3, x0
	adrp	x8, _eap_sim_db_open_socket.counter@PAGE
	ldr	w4, [x8, _eap_sim_db_open_socket.counter@PAGEOFF]
	add	w9, w4, #1
	str	w9, [x8, _eap_sim_db_open_socket.counter@PAGEOFF]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w1, #8
	bl	_os_snprintf
	ldr	x0, [x19, #8]
	bl	_os_free
	ldr	x0, [sp]
	bl	_os_strdup
	mov	x8, x0
	str	x0, [x19, #8]
	ldr	w0, [x19]
	cbz	x8, LBB0_10
; %bb.5:
	mov	x1, sp
	mov	w2, #16
	bl	_bind
	tbnz	x0, #63, LBB0_9
; %bb.6:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_os_memset
	ldr	x8, [x21]
	str	x8, [sp, #8]
	ldr	x0, [sp]
	ldr	x8, [x19, #16]
	add	x1, x8, #5
	mov	w2, #8
	bl	_os_strlcpy
	ldr	w0, [x19]
	mov	x1, sp
	mov	w2, #16
	bl	_connect
	tbnz	x0, #63, LBB0_11
; %bb.7:
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _eap_sim_db_receive@GOTPAGE
Lloh13:
	ldr	x8, [x8, _eap_sim_db_receive@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x2, x19
	mov	x3, #0
	bl	_eloop_register_read_sock
	mov	w20, #0
	b	LBB0_2
LBB0_8:
Lloh15:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
Lloh18:
	adrp	x8, _errno@GOTPAGE
Lloh19:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wpa_printf
	b	LBB0_1
LBB0_9:
Lloh23:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
Lloh26:
	adrp	x8, _errno@GOTPAGE
Lloh27:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_wpa_printf
	ldr	w0, [x19]
LBB0_10:
	bl	_close
	mov	w20, #-1
	str	w20, [x19]
	b	LBB0_2
LBB0_11:
Lloh31:
	adrp	x21, _MSG_INFO@GOTPAGE
Lloh32:
	ldr	x21, [x21, _MSG_INFO@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh33:
	adrp	x8, _errno@GOTPAGE
Lloh34:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_wpa_printf
	ldr	w20, [x21]
	ldr	x21, [sp]
	mov	x0, x21
	bl	_os_strlen
	mov	x3, x0
Lloh38:
	adrp	x1, l_.str.5@PAGE
Lloh39:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_wpa_hexdump_ascii
	ldr	w0, [x19]
	bl	_close
	mov	w20, #-1
	str	w20, [x19]
	ldr	x0, [x19, #8]
	bl	_unlink
	ldr	x0, [x19, #8]
	bl	_os_free
	str	xzr, [x19, #8]
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_eap_sim_db_open_socket.counter,4,2 ; @eap_sim_db_open_socket.counter
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unix:"

	.comm	_PF_UNIX,4,2                    ; @PF_UNIX
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"socket(eap_sim_db): %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_AF_UNIX,8,3                    ; @AF_UNIX
l_.str.2:                               ; @.str.2
	.asciz	"/tmp/eap_sim_db_%d-%d"

l_.str.3:                               ; @.str.3
	.asciz	"bind(eap_sim_db): %s"

l_.str.4:                               ; @.str.4
	.asciz	"connect(eap_sim_db): %s"

l_.str.5:                               ; @.str.5
	.asciz	"HLR/AuC GW socket"

	.comm	_eap_sim_db_receive,4,2         ; @eap_sim_db_receive
	.no_dead_strip	_eap_sim_db_open_socket
.subsections_via_symbols
