// File: /workspace/github_c_makefile_star2_O1/stetre[P]moonglfw/src/utils.c
// Function: moonglfw_pushgamepadbuttons
int pushgamepadbuttons(lua_State *L, const GLFWgamepadstate *state)
    {
    lua_newtable(L);
#define Setfield(x, name) do {  \
    lua_pushstring(L, state->buttons[GLFW_GAMEPAD_BUTTON_##x]==GLFW_PRESS ? "press" : "release"); \
    lua_setfield(L, -2, name);  \
} while(0)
    Setfield(A, "a");
    Setfield(A, "a");
    Setfield(B, "b");
    Setfield(X, "x");
    Setfield(Y, "y");
    Setfield(LEFT_BUMPER, "left_bumper");
    Setfield(RIGHT_BUMPER, "right_bumper");
    Setfield(BACK, "back");
    Setfield(START, "start");
    Setfield(GUIDE, "guide");
    Setfield(LEFT_THUMB, "left_thumb");
    Setfield(RIGHT_THUMB, "right_thumb");
    Setfield(DPAD_UP, "dpad_up");
    Setfield(DPAD_RIGHT, "dpad_right");
    Setfield(DPAD_DOWN, "dpad_down");
    Setfield(DPAD_LEFT, "dpad_left");
#undef Setfield
    return 1;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x5210
cmpb $0x1, (%r14)
leaq 0x3763(%rip), %r13      # 0x133c5
leaq 0x3769(%rip), %r15      # 0x133d2
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x49af(%rip), %r12      # 0x1462e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x52d0
cmpb $0x1, (%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movq %r12, %rdx
callq 0x52d0
cmpb $0x1, 0x1(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x37c4(%rip), %rdx      # 0x13491
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x2(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x3b67(%rip), %rdx      # 0x1385c
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x3(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x3b4a(%rip), %rdx      # 0x13867
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x4(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x6034(%rip), %rdx      # 0x15d79
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x5(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x6018(%rip), %rdx      # 0x15d85
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x6(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x49ad(%rip), %rdx      # 0x14742
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x7(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5fd5(%rip), %rdx      # 0x15d92
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x8(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5fb3(%rip), %rdx      # 0x15d98
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0x9(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5f91(%rip), %rdx      # 0x15d9e
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0xa(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5f74(%rip), %rdx      # 0x15da9
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0xb(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5f58(%rip), %rdx      # 0x15db5
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0xc(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5f38(%rip), %rdx      # 0x15dbd
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0xd(%r14)
movq %r15, %rsi
cmoveq %r13, %rsi
movq %rbx, %rdi
callq 0x5680
leaq 0x5f1b(%rip), %rdx      # 0x15dc8
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
cmpb $0x1, 0xe(%r14)
cmoveq %r13, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5680
leaq 0x5efd(%rip), %rdx      # 0x15dd2
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x52d0
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq