	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ASE_KeyMAP_DIFFUSE
_ASE_KeyMAP_DIFFUSE:                    ## @ASE_KeyMAP_DIFFUSE
	.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	%rbx
	subq	$3080, %rsp                     ## imm = 0xC08
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_20
## %bb.1:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ASE_GetToken
	movq	_s_token@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	leaq	-1056(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strcpy
	movq	%rbx, %rdi
	movl	$34, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	-1056(%rbp), %rdi
	movl	$34, %esi
	callq	_strchr
	movq	$0, (%rax)
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movb	$47, (%rbx)
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	cmpb	$92, %al
	je	LBB0_17
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	%al, %al
	jne	LBB0_18
## %bb.5:
	movq	_gamedir@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movb	1(%r15), %cl
	movb	-1055(%rbp), %al
	cmpb	$58, %cl
	jne	LBB0_8
## %bb.6:
	cmpb	$47, -1056(%rbp)
	jne	LBB0_8
## %bb.7:
	cmpb	$47, %al
	jne	LBB0_8
LBB0_11:
	movq	%r15, %rsi
	addq	$2, %rsi
	cmpb	$58, %al
	leaq	-1054(%rbp), %rax
	movq	%rax, %r15
	cmoveq	%rsi, %r15
	cmoveq	%rax, %rsi
	movb	(%r15), %al
	testb	%al, %al
	je	LBB0_15
## %bb.12:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	cmpb	$47, %al
	sete	%bl
	movzbl	1(%r15), %eax
	incq	%r15
	testb	%al, %al
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movb	%bl, %dl
	addl	%edx, %ecx
	cmpl	$2, %ecx
	jb	LBB0_13
	jmp	LBB0_15
LBB0_8:
	leaq	-1056(%rbp), %rsi
	cmpb	$58, %al
	jne	LBB0_15
## %bb.9:
	cmpb	$47, (%r15)
	jne	LBB0_15
## %bb.10:
	cmpb	$47, %cl
	je	LBB0_11
LBB0_15:
	leaq	-2080(%rbp), %r14
	movq	%r14, %rdi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_strlwr
	leaq	-3104(%rbp), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_strlwr
	leaq	-2078(%rbp), %rsi
	movq	%r14, %rdi
	callq	_strstr
	movq	%rax, %rbx
	movq	_ase@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rax,%rcx,8), %r14
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.16:
	leaq	-2080(%rbp), %rdi
	callq	_strlen
	cltq
	leaq	(%rbx,%rax), %rsi
	addq	$-2, %rsi
	movq	%r14, %rdi
	callq	_strcpy
	jmp	LBB0_20
LBB0_19:
	leaq	L_.str.1(%rip), %rsi
	leaq	-1056(%rbp), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rdx
	callq	_sprintf
	leaq	L_.str.2(%rip), %rdi
	movq	%rbx, %rsi
	callq	_printf
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	addq	$3080, %rsp                     ## imm = 0xC08
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"*BITMAP"

	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_s_token,8,3                    ## @s_token
	.comm	_gamedir,8,3                    ## @gamedir
	.comm	_ase,16,3                       ## @ase
L_.str.1:                               ## @.str.1
	.asciz	"(not converted: '%s')"

L_.str.2:                               ## @.str.2
	.asciz	"WARNING: illegal material name '%s'\n"

	.no_dead_strip	_ASE_KeyMAP_DIFFUSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ASE_KeyMAP_DIFFUSE
_ASE_KeyMAP_DIFFUSE:                    ; @ASE_KeyMAP_DIFFUSE
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #3088
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	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_20
; %bb.1:
Lloh5:
	adrp	x8, _qfalse@GOTPAGE
Lloh6:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_ASE_GetToken
Lloh8:
	adrp	x8, _s_token@GOTPAGE
Lloh9:
	ldr	x8, [x8, _s_token@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	add	x1, x8, #1
	add	x0, sp, #2056
	bl	_strcpy
	add	x0, sp, #2056
	mov	w1, #34
	bl	_strchr
	cbz	x0, LBB0_3
; %bb.2:
	add	x0, sp, #2056
	mov	w1, #34
	bl	_strchr
	str	xzr, [x0]
LBB0_3:
	add	x8, sp, #2056
	mov	w9, #47
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	strb	w9, [x8]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w10, [x8]
	cmp	w10, #92
	b.eq	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w10, LBB0_5
; %bb.8:
Lloh11:
	adrp	x8, _gamedir@GOTPAGE
Lloh12:
	ldr	x8, [x8, _gamedir@GOTPAGEOFF]
Lloh13:
	ldr	x19, [x8]
	ldrb	w9, [x19, #1]
	ldrb	w8, [sp, #2057]
	cmp	w9, #58
	b.ne	LBB0_14
; %bb.9:
	ldrb	w10, [sp, #2056]
	cmp	w10, #47
	b.ne	LBB0_14
; %bb.10:
	cmp	w8, #47
	b.ne	LBB0_14
LBB0_11:
	add	x9, x19, #2
	add	x10, sp, #2056
	add	x10, x10, #2
	cmp	w8, #58
	csel	x19, x9, x10, eq
	csel	x1, x10, x9, eq
	ldrb	w8, [x19]
	cbz	w8, LBB0_17
; %bb.12:
	mov	w9, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	cmp	w8, #47
	cinc	w9, w9, eq
	ldrb	w8, [x19, #1]!
	cmp	w8, #0
	ccmp	w9, #2, #2, ne
	b.lo	LBB0_13
	b	LBB0_17
LBB0_14:
	add	x1, sp, #2056
	cmp	w8, #58
	b.ne	LBB0_17
; %bb.15:
	ldrb	w10, [x19]
	cmp	w10, #47
	b.ne	LBB0_17
; %bb.16:
	cmp	w9, #47
	b.eq	LBB0_11
LBB0_17:
	add	x20, sp, #1032
	add	x0, sp, #1032
	bl	_strcpy
	add	x0, sp, #1032
	bl	_strlwr
	add	x0, sp, #8
	mov	x1, x19
	bl	_strcpy
	add	x0, sp, #8
	bl	_strlwr
	add	x1, x20, #2
	add	x0, sp, #8
	bl	_strstr
Lloh14:
	adrp	x8, _ase@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ase@GOTPAGEOFF]
	ldp	x8, x9, [x8]
	ldr	x19, [x9, x8, lsl #3]
	cbz	x0, LBB0_19
; %bb.18:
	mov	x20, x0
	add	x0, sp, #1032
	bl	_strlen
	add	x8, x20, w0, sxtw
	sub	x1, x8, #2
	mov	x0, x19
	bl	_strcpy
	b	LBB0_20
LBB0_19:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #2056
	mov	x0, x19
	bl	_sprintf
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #2056
	bl	_printf
LBB0_20:
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	add	sp, sp, #3088
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"*BITMAP"

	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_s_token,8,3                    ; @s_token
	.comm	_gamedir,8,3                    ; @gamedir
	.comm	_ase,16,3                       ; @ase
l_.str.1:                               ; @.str.1
	.asciz	"(not converted: '%s')"

l_.str.2:                               ; @.str.2
	.asciz	"WARNING: illegal material name '%s'\n"

	.no_dead_strip	_ASE_KeyMAP_DIFFUSE
.subsections_via_symbols
