	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_atr_header
_write_atr_header:                      ## @write_atr_header
	.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	$64, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	(%rdi), %eax
	leal	(,%rax,8), %ecx
	movl	%eax, %ebx
	shll	$4, %ebx
	addl	$-24, %ebx
	cmpl	$4, %eax
	cmovll	%ecx, %ebx
	movslq	4(%rdi), %r12
	cmpq	$256, %r12                      ## imm = 0x100
	cmovnel	%ecx, %ebx
	leaq	-88(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	_AFILE_ATR_MAGIC1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movq	_AFILE_ATR_MAGIC2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	%r12, -48(%rbp)
	sarl	$8, %r12d
	movslq	%r12d, %rax
	movq	%rax, -56(%rbp)
	movslq	%ebx, %rax
	movq	%rax, -64(%rbp)
	movl	%eax, %ecx
	sarl	$8, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -72(%rbp)
	movl	%eax, %ecx
	sarl	$16, %ecx
	movslq	%ecx, %rcx
	movq	%rcx, -80(%rbp)
	sarl	$24, %eax
	cltq
	movq	%rax, -88(%rbp)
	movl	8(%r15), %edx
	movq	%r14, %rdi
	movl	$56, %esi
	callq	_fsave
	addq	$64, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AFILE_ATR_MAGIC1,4,2           ## @AFILE_ATR_MAGIC1
	.comm	_AFILE_ATR_MAGIC2,4,2           ## @AFILE_ATR_MAGIC2
	.no_dead_strip	_write_atr_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_atr_header
_write_atr_header:                      ; @write_atr_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldp	w8, w20, [x0]
                                        ; kill: def $w20 killed $w20 def $x20
	sxtw	x20, w20
	mov	x21, x20
	lsl	w9, w8, #4
	sub	w9, w9, #24
	cmp	w8, #4
	mov	w10, #256
	ccmp	x20, x10, #0, ge
	lsl	w8, w8, #3
	csel	w22, w8, w9, ne
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #56
	bl	_memset
Lloh0:
	adrp	x8, _AFILE_ATR_MAGIC1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AFILE_ATR_MAGIC1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _AFILE_ATR_MAGIC2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AFILE_ATR_MAGIC2@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #56]
	sbfx	x8, x21, #8, #24
	stp	x8, x20, [sp, #40]
	sxtw	x8, w22
	sbfx	x9, x22, #8, #24
	stp	x9, x8, [sp, #24]
	sbfx	x8, x22, #16, #16
	sbfx	x9, x22, #24, #8
	stp	x9, x8, [sp, #8]
	ldr	w2, [x19, #8]
	add	x0, sp, #8
	mov	w1, #56
	bl	_fsave
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AFILE_ATR_MAGIC1,4,2           ; @AFILE_ATR_MAGIC1
	.comm	_AFILE_ATR_MAGIC2,4,2           ; @AFILE_ATR_MAGIC2
	.no_dead_strip	_write_atr_header
.subsections_via_symbols
