	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scard_get_record_len
_scard_get_record_len:                  ## @scard_get_record_len
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$288, %rsp                      ## imm = 0x120
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_SIM_CMD_READ_RECORD@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -293(%rbp)
	movl	$-16777216, -292(%rbp)          ## imm = 0xFF000000
	movq	(%rdi), %rax
	movq	_SCARD_USIM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_USIM_CLA@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, -293(%rbp)
LBB0_2:
	movb	%bl, -291(%rbp)
	movb	%dl, -290(%rbp)
	movq	$255, -304(%rbp)
	leaq	-293(%rbp), %rsi
	leaq	-288(%rbp), %rcx
	leaq	-304(%rbp), %r8
	movl	$5, %edx
	callq	_scard_transmit
	movq	_SCARD_S_SUCCESS@GOTPCREL(%rip), %rcx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.3:
	movq	-304(%rbp), %rcx
	leaq	L_.str.1(%rip), %rsi
	leaq	-288(%rbp), %rdx
	callq	_wpa_hexdump
	cmpq	$2, -304(%rbp)
	jb	LBB0_8
## %bb.4:
	movb	-288(%rbp), %al
	cmpb	$103, %al
	je	LBB0_6
## %bb.5:
	cmpb	$108, %al
	jne	LBB0_8
LBB0_6:
	movzbl	-287(%rbp), %eax
	jmp	LBB0_10
LBB0_7:
	movzbl	%bl, %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_9
LBB0_8:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_9:
	movl	$-1, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-24(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$288, %rsp                      ## imm = 0x120
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIM_CMD_READ_RECORD,1,0        ## @SIM_CMD_READ_RECORD
	.comm	_SCARD_USIM,8,3                 ## @SCARD_USIM
	.comm	_USIM_CLA,1,0                   ## @USIM_CLA
	.comm	_SCARD_S_SUCCESS,8,3            ## @SCARD_S_SUCCESS
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCARD: failed to determine file length for record %d"

L_.str.1:                               ## @.str.1
	.asciz	"SCARD: file length determination response"

L_.str.2:                               ## @.str.2
	.asciz	"SCARD: unexpected response to file length determination"

	.no_dead_strip	_scard_get_record_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scard_get_record_len
_scard_get_record_len:                  ; @scard_get_record_len
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #336
	.cfi_def_cfa_offset 336
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #304]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #320]            ; 16-byte Folded Spill
	add	x29, sp, #320
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _SIM_CMD_READ_RECORD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIM_CMD_READ_RECORD@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #20]
	mov	w8, #-16777216
	stur	w8, [sp, #21]
	ldr	x8, [x0]
Lloh5:
	adrp	x9, _SCARD_USIM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SCARD_USIM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _USIM_CLA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _USIM_CLA@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [sp, #20]
LBB0_2:
	strb	w19, [sp, #22]
	strb	w2, [sp, #23]
	mov	w8, #255
	str	x8, [sp, #8]
	add	x1, sp, #20
	add	x3, sp, #25
	add	x4, sp, #8
	mov	w2, #5
	bl	_scard_transmit
	mov	x8, x0
Lloh10:
	adrp	x9, _SCARD_S_SUCCESS@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SCARD_S_SUCCESS@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x20, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x20, [x20, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x20]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.3:
	ldr	x3, [sp, #8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #25
	bl	_wpa_hexdump
	ldr	x8, [sp, #8]
	cmp	x8, #2
	b.lo	LBB0_8
; %bb.4:
	ldrb	w8, [sp, #25]
	cmp	w8, #103
	b.eq	LBB0_6
; %bb.5:
	cmp	w8, #108
	b.ne	LBB0_8
LBB0_6:
	ldrb	w0, [sp, #26]
	b	LBB0_10
LBB0_7:
	mov	w8, w19
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	bl	_wpa_printf
	mov	w0, #-1
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #320]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #336
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SIM_CMD_READ_RECORD,1,0        ; @SIM_CMD_READ_RECORD
	.comm	_SCARD_USIM,8,3                 ; @SCARD_USIM
	.comm	_USIM_CLA,1,0                   ; @USIM_CLA
	.comm	_SCARD_S_SUCCESS,8,3            ; @SCARD_S_SUCCESS
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCARD: failed to determine file length for record %d"

l_.str.1:                               ; @.str.1
	.asciz	"SCARD: file length determination response"

l_.str.2:                               ; @.str.2
	.asciz	"SCARD: unexpected response to file length determination"

	.no_dead_strip	_scard_get_record_len
.subsections_via_symbols
