	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gsm_auth_req
_gsm_auth_req:                          ## @gsm_auth_req
	.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
	subq	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movb	$0, (%rsi)
	movl	$32, %esi
	callq	_os_strchr
	movl	$-1, %ecx
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r13
	movb	$0, (%rax)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_os_snprintf
	movl	%eax, %r15d
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_os_snprintf_error
	movl	$-1, %ecx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.2:
	addq	%r14, %r12
	movslq	%r15d, %r15
	addq	%r14, %r15
	movq	%rbx, %rdi
	callq	_get_milenage
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%r12, -168(%rbp)                ## 8-byte Spill
	movq	_EAP_SIM_MAX_CHAL@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_9
## %bb.4:
	incq	%r13
	xorl	%r14d, %r14d
	leaq	-112(%rbp), %rbx
	movq	-168(%rbp), %r12                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-176(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %esi
	movl	4(%rax), %edi
	movq	%rbx, %rdx
	leaq	-128(%rbp), %rcx
	leaq	-160(%rbp), %rbx
	movq	%rbx, %r8
	callq	_gsm_milenage
	testl	%r14d, %r14d
	movl	$58, %eax
	movl	$32, %ecx
	cmovel	%ecx, %eax
	leaq	1(%r15), %rdi
	movb	%al, (%r15)
	movl	%r12d, %esi
	subl	%edi, %esi
	movq	%rbx, %rdx
	movl	$8, %ecx
	callq	_wpa_snprintf_hex
	cltq
	leaq	(%r15,%rax), %rbx
	incq	%rbx
	leaq	(%r15,%rax), %rdi
	addq	$2, %rdi
	movb	$58, 1(%r15,%rax)
	movl	%r12d, %esi
	subl	%edi, %esi
	leaq	-128(%rbp), %rdx
	movl	$4, %ecx
	callq	_wpa_snprintf_hex
	cltq
	leaq	(%rax,%rbx), %r15
	incq	%r15
	cmpb	$58, 32(%r13)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r14d
	addq	$33, %r13
	movq	_EAP_SIM_MAX_CHAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	leaq	-112(%rbp), %rbx
	jl	LBB0_5
LBB0_9:
	movb	$0, (%r15)
	xorl	%ecx, %ecx
	jmp	LBB0_11
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_printf
	subl	%r15d, %r12d
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_os_snprintf
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_os_snprintf_error
	xorl	%ecx, %ecx
	negq	%rax
	sbbl	%ecx, %ecx
	jmp	LBB0_11
LBB0_6:
	movl	$-1, %ecx
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ecx, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GSM-AUTH-RESP %s"

	.comm	_EAP_SIM_MAX_CHAL,4,2           ## @EAP_SIM_MAX_CHAL
L_.str.1:                               ## @.str.1
	.asciz	"No GSM triplets found for %s\n"

L_.str.2:                               ## @.str.2
	.asciz	" FAILURE"

	.no_dead_strip	_gsm_auth_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gsm_auth_req
_gsm_auth_req:                          ; @gsm_auth_req
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	strb	wzr, [x1]
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	strb	wzr, [x19], #1
	str	x22, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_os_snprintf
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	bl	_os_snprintf_error
	cbz	x0, LBB0_5
LBB0_2:
	mov	w0, #-1
LBB0_3:
	ldur	x8, [x29, #-72]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.4:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_5:
	add	x24, x20, x21
	add	x20, x20, w23, sxtw
	mov	x0, x22
	bl	_get_milenage
	cbz	x0, LBB0_12
; %bb.6:
Lloh8:
	adrp	x22, _EAP_SIM_MAX_CHAL@GOTPAGE
Lloh9:
	ldr	x22, [x22, _EAP_SIM_MAX_CHAL@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	x21, x0
	mov	w23, #0
	mov	w25, #58
	mov	w26, #32
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #56
	mov	x0, x19
	mov	w2, #16
	bl	_hexstr2bin
	cbnz	x0, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldp	w1, w0, [x21]
	add	x2, sp, #56
	add	x3, sp, #40
	add	x4, sp, #8
	bl	_gsm_milenage
	cmp	w23, #0
	csel	w8, w26, w25, eq
	strb	w8, [x20], #1
	sub	w1, w24, w20
	add	x2, sp, #8
	mov	x0, x20
	mov	w3, #8
	bl	_wpa_snprintf_hex
	add	x20, x20, w0, sxtw
	strb	w25, [x20], #1
	sub	w1, w24, w20
	add	x2, sp, #40
	mov	x0, x20
	mov	w3, #4
	bl	_wpa_snprintf_hex
	add	x20, x20, w0, sxtw
	ldrb	w8, [x19, #32]
	cmp	w8, #58
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	w23, w23, #1
	ldr	w8, [x22]
	add	x19, x19, #33
	cmp	w23, w8
	b.lt	LBB0_8
LBB0_11:
	mov	w0, #0
	strb	wzr, [x20]
	b	LBB0_3
LBB0_12:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x22
	bl	_printf
	sub	w19, w24, w20
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_os_snprintf
	mov	x1, x0
	mov	x0, x19
	bl	_os_snprintf_error
	cmp	x0, #0
	csetm	w0, ne
	b	LBB0_3
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GSM-AUTH-RESP %s"

	.comm	_EAP_SIM_MAX_CHAL,4,2           ; @EAP_SIM_MAX_CHAL
l_.str.1:                               ; @.str.1
	.asciz	"No GSM triplets found for %s\n"

l_.str.2:                               ; @.str.2
	.asciz	" FAILURE"

	.no_dead_strip	_gsm_auth_req
.subsections_via_symbols
