	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function math_max
_math_max:                              ## @math_max
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_lua_gettop
	movl	%eax, %r15d
	xorl	%esi, %esi
	testl	%eax, %eax
	setg	%sil
	leaq	L_.str(%rip), %rcx
	movl	$1, %r12d
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_luaL_argcheck
	cmpl	$2, %r15d
	jge	LBB0_1
LBB0_5:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_lua_pushvalue
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	negl	%r15d
	movl	$1, %r12d
	movl	$2, %ebx
	movq	_LUA_OPLT@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leal	(%r15,%rbx), %eax
	incl	%eax
	movl	%ebx, %ecx
	incl	%ecx
	movl	%ecx, %ebx
	cmpl	$1, %eax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ecx
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_lua_compare
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r12d
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"value expected"

	.comm	_LUA_OPLT,4,2                   ## @LUA_OPLT
	.no_dead_strip	_math_max
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function math_max
_math_max:                              ; @math_max
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_lua_gettop
	mov	x20, x0
	cmp	w0, #0
	cset	w1, gt
Lloh0:
	adrp	x3, l_.str@PAGE
Lloh1:
	add	x3, x3, l_.str@PAGEOFF
	mov	w21, #1
	mov	x0, x19
	mov	w2, #1
	bl	_luaL_argcheck
	cmp	w20, #2
	b.lt	LBB0_3
; %bb.1:
	mov	w24, #1
Lloh2:
	adrp	x23, _LUA_OPLT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _LUA_OPLT@GOTPAGEOFF]
	mov	w21, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w24, #1
	ldr	w3, [x23]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_lua_compare
	cmp	x0, #0
	csinc	w21, w21, w24, eq
	mov	x24, x22
	cmp	w20, w22
	b.ne	LBB0_2
LBB0_3:
	mov	x0, x19
	mov	x1, x21
	bl	_lua_pushvalue
	mov	w0, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"value expected"

	.comm	_LUA_OPLT,4,2                   ; @LUA_OPLT
	.no_dead_strip	_math_max
.subsections_via_symbols
