	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function texture2d_upload_data
_texture2d_upload_data:                 ## @texture2d_upload_data
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r11d
	movq	%r8, %r10
	movq	%rdx, %r8
	movl	%esi, %r13d
	movq	%rdi, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, -96(%rbp)
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	movq	16(%rcx), %rdx
	movq	(%rcx), %r12
	movq	8(%rcx), %rax
	movq	24(%rcx), %r14
	subq	%rdx, %r14
	subq	%r12, %rax
	jmp	LBB0_3
LBB0_2:
	xorl	%r12d, %r12d
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	(%rbx)
	movl	%edx, %r15d
	movq	%rbx, %rdi
	movl	%edx, %esi
	movq	%r10, -64(%rbp)                 ## 8-byte Spill
	movl	%r11d, -44(%rbp)                ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	callq	_wined3d_texture_get_level_width
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_wined3d_texture_get_level_height
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	-44(%rbp), %r11d                ## 4-byte Reload
	movq	-64(%rbp), %r10                 ## 8-byte Reload
	xorl	%edx, %edx
LBB0_3:
	movq	%r12, -80(%rbp)
	movq	%rdx, -72(%rbp)
	movq	%r14, -104(%rbp)
	movq	%rax, -112(%rbp)
	movq	8(%rbx), %rax
	movl	%r13d, %ecx
	movl	(%rax,%rcx,4), %edi
	movl	(%r8), %esi
	movl	4(%rbx), %edx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	-112(%rbp), %rcx
	leaq	-80(%rbp), %r9
	movl	%r11d, %r8d
	pushq	%r10
	pushq	%rax
	callq	_wined3d_surface_upload_data
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.no_dead_strip	_texture2d_upload_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function texture2d_upload_data
_texture2d_upload_data:                 ; @texture2d_upload_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x5
	mov	x19, x4
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
	stp	xzr, xzr, [sp, #16]
	cbz	x3, LBB0_2
; %bb.1:
	ldp	x8, x9, [x3, #16]
	sub	x24, x9, x8
	ldp	x9, x10, [x3]
	sub	x0, x10, x9
	b	LBB0_3
LBB0_2:
	ldr	w8, [x22]
	udiv	w9, w23, w8
	msub	w25, w9, w8, w23
	mov	x0, x22
	mov	x1, x25
	bl	_wined3d_texture_get_level_width
	mov	x24, x0
	mov	x0, x22
	mov	x1, x25
	bl	_wined3d_texture_get_level_height
	mov	x9, #0
	mov	x8, #0
LBB0_3:
	stp	x9, x8, [sp, #32]
	stp	x0, x24, [sp]
	ldr	x8, [x22, #8]
	ldr	w0, [x8, w23, uxtw #2]
	ldr	w1, [x21]
	ldr	w2, [x22, #4]
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w6, [x8]
	mov	x3, sp
	add	x5, sp, #32
	mov	x4, x20
	mov	x7, x19
	bl	_wined3d_surface_upload_data
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.no_dead_strip	_texture2d_upload_data
.subsections_via_symbols
